コード例 #1
0
 protected override void SetupDrawAttributes(UWB_DrawHelper drawHelper)
 {
     base.SetupDrawAttributes(drawHelper);
     drawHelper.setColor2(mShadingColor);
     drawHelper.setShadeMode(mShadeMode);
     drawHelper.setFillMode(mFillMode);
 }
コード例 #2
0
 protected override void SetupDrawAttributes(UWB_DrawHelper drawHelper)
 {
     base.SetupDrawAttributes(drawHelper);
     drawHelper.setColor1(mFlatColor);
     drawHelper.setColor2(mShadingColor);
     drawHelper.setShadeMode(mShadeMode);
     drawHelper.setFillMode(mFillMode);
 }
コード例 #3
0
 public void DrawWCWindow(UWB_DrawHelper drawHelper)
 {
     drawHelper.resetAttributes();
     drawHelper.setShadeMode(eShadeMode.smFlat);
     drawHelper.setFillMode(eFillMode.fmWireframe);
     drawHelper.setColor1(new Color(new Vector3(1.0f, 0.0f, 0.0f)));
     drawHelper.drawRectangle(WCWindowMin, WCWindowMax);
 }
コード例 #4
0
 public void drawPivot(UWB_DrawHelper drawHelper, float size)
 {
     drawHelper.resetAttributes();
     drawHelper.setColor1(new Color(new Vector3(1f, 1f, 1f)));
     drawHelper.setColor2(new Color(new Vector3(0, 0, 1f)));
     drawHelper.setFillMode(eFillMode.fmSolid);
     drawHelper.setShadeMode(eShadeMode.smGouraud);
     drawHelper.drawCircle(mPivot, size);
 }
コード例 #5
0
 public void drawPivot(UWB_DrawHelper drawHelper, float size)
 {
     drawHelper.resetAttributes();
     drawHelper.setColor1(new Color(new Vector3(1f, 1f, 1f)));
     drawHelper.setColor2(new Color(new Vector3(0, 0, 1f)));
     drawHelper.setFillMode(eFillMode.fmSolid);
     drawHelper.setShadeMode(eShadeMode.smGouraud);
     drawHelper.drawCircle(mPivot, size);
 }
コード例 #6
0
        public void drawBoundingVolume(eLevelofDetail lod, UWB_DrawHelper drawHelper, Color color)
        {
            UWB_BoundingVolume boundingVolume = getBoundingVolume(lod);

            if (boundingVolume != null && drawHelper != null)
            {
                drawHelper.resetAttributes();
                drawHelper.setColor1(color);
                drawHelper.setShadeMode(eShadeMode.smFlat);
                drawHelper.setFillMode(eFillMode.fmWireframe);
                boundingVolume.Draw(ref drawHelper);
            }
        }
コード例 #7
0
        protected bool GetNodeBoundsHelper(ref UWB_SceneNode pSearchNode,
                                           ref UWB_BoundingBox box,
                                           ref UWB_DrawHelper helper, int level, bool bDraw)
        {
            bool found = false;

            if (Object.ReferenceEquals(this, pSearchNode))
            {
                box   = this.GetBounds(ref helper, bDraw);
                found = true;
            }
            else
            {
                helper.pushModelTransform();
                {
                    level++;
                    this.getXFormInfo().setupModelStack(helper);

                    int count = this.numChildren();
                    for (int i = 0; i < count; i++)
                    {
                        UWB_SceneNode pChildNode = this.getChildNode(i);
                        if (pChildNode.GetNodeBoundsHelper(ref pSearchNode, ref box, ref helper, level, bDraw))
                        {
                            found = true;
                            break;
                        }
                    }
                    level--;
                }
                helper.popModelTransform();
            }
            if (0 == level && found && bDraw)
            {
                helper.resetAttributes();
                helper.setColor1(new Color(0, 0, 255));
                helper.setShadeMode(eShadeMode.smFlat);
                helper.setFillMode(eFillMode.fmWireframe);
                box.Draw(ref helper);
            }

            return(found);
        }
コード例 #8
0
 protected override void SetupDrawAttributes(UWB_DrawHelper drawHelper)
 {
     base.SetupDrawAttributes(drawHelper);
     drawHelper.setShadeMode(eShadeMode.smFlat);
 }
コード例 #9
0
 public void DrawWCWindow(UWB_DrawHelper drawHelper)
 {
     drawHelper.resetAttributes();
     drawHelper.setShadeMode(eShadeMode.smFlat);
     drawHelper.setFillMode(eFillMode.fmWireframe);
     drawHelper.setColor1(new Color(new Vector3(1.0f, 0.0f, 0.0f)));
     drawHelper.drawRectangle(WCWindowMin, WCWindowMax);
 }
コード例 #10
0
 public void drawBoundingVolume(eLevelofDetail lod, UWB_DrawHelper drawHelper, Color color)
 {
     UWB_BoundingVolume boundingVolume = getBoundingVolume(lod);
     if (boundingVolume != null && drawHelper != null)
     {
         drawHelper.resetAttributes();
         drawHelper.setColor1(color);
         drawHelper.setShadeMode(eShadeMode.smFlat);
         drawHelper.setFillMode(eFillMode.fmWireframe);
         boundingVolume.Draw(ref drawHelper);
     }
 }
コード例 #11
0
 protected override void SetupDrawAttributes(UWB_DrawHelper drawHelper)
 {
     base.SetupDrawAttributes(drawHelper);
     drawHelper.setShadeMode(eShadeMode.smFlat);
 }
コード例 #12
0
        protected bool GetNodeBoundsHelper(ref UWB_SceneNode pSearchNode,
                                         ref UWB_BoundingBox box,
                                         ref UWB_DrawHelper helper, int level, bool bDraw)
        {
            bool found = false;
              if( Object.ReferenceEquals(this, pSearchNode))
              {
            box = this.GetBounds( ref helper, bDraw );
            found = true;
              }
              else
              {
            helper.pushModelTransform();
            {
              level++;
              this.getXFormInfo().setupModelStack(helper);

              int count = this.numChildren();
              for(int i=0; i<count; i++)
              {
                UWB_SceneNode pChildNode = this.getChildNode( i );
                if( pChildNode.GetNodeBoundsHelper(  ref pSearchNode, ref box, ref helper, level, bDraw ) )
                {
                  found = true;
                  break;
                }
              }
              level--;
            }
            helper.popModelTransform();
              }
              if (0 == level && found && bDraw)
              {
              helper.resetAttributes();
              helper.setColor1(new Color(0,0,255));
              helper.setShadeMode(eShadeMode.smFlat);
              helper.setFillMode(eFillMode.fmWireframe);
              box.Draw(ref helper);
              }

              return found;
        }