Beispiel #1
0
 internal VectorPathShape(eFillMode fillMode, sPathFigure[] figures, sPathSegment[] segments, float[] data)
 {
     this.fillMode = fillMode;
     this.figures  = figures;
     this.segments = segments;
     this.data     = data;
 }
Beispiel #2
0
 internal VectorPathShape(eFillMode fillMode, IReadOnlyCollection <sPathFigure> figures, IReadOnlyCollection <sPathSegment> segments, IReadOnlyCollection <float> data)
 {
     this.fillMode = fillMode;
     this.figures  = figures.ToArray();
     this.segments = segments.ToArray();
     this.data     = data.ToArray();
 }
Beispiel #3
0
 public UWB_DrawHelper()
 {
     mLod          = eLevelofDetail.lodHigh;
     mShadeMode    = eShadeMode.smGouraud;
     mFillMode     = eFillMode.fmSolid;
     m_TexFileName = null;
     resetAttributes();
     m_MatrixStack = new UWB_MatrixStack();
 }
 public UWB_DrawHelper()
 {
     mLod = eLevelofDetail.lodHigh;
     mShadeMode = eShadeMode.smGouraud;
     mFillMode = eFillMode.fmSolid;
     m_TexFileName = null;
     resetAttributes();
     m_MatrixStack = new UWB_MatrixStack();
 }
Beispiel #5
0
 internal SimpleShape(eSegmentKind segmentKind, Vector2 startingPoint, float[] data, eFillMode fillMode = eFillMode.Winding, byte arcFlags = 0, bool isFilled = true, bool isClosed = true)
 {
     this.startingPoint = startingPoint;
     this.fillMode      = fillMode;
     this.segmentKind   = segmentKind;
     this.isFilled      = isFilled;
     this.isClosed      = isClosed;
     this.arcFlags      = arcFlags;
     pointsCount        = getPointsCount(segmentKind, data.Length);
     this.data          = data;
 }
 public UWB_Primitive()
 {
     mVisible = true;
     mVelocity = Vector3.Zero;
     mFlatColor = Color.Black;
     mShadingColor = Color.White;
     mFillMode = eFillMode.fmSolid;
     mShadeMode = eShadeMode.smGouraud;
     mPointSize = 2f;
     m_bBlendingEnabled = false;
     m_bLightingEnabled = true;
     m_Material = new UWB_Material();
 }
Beispiel #7
0
 public UWB_Primitive()
 {
     mVisible           = true;
     mVelocity          = Vector3.Zero;
     mFlatColor         = Color.Black;
     mShadingColor      = Color.White;
     mFillMode          = eFillMode.fmSolid;
     mShadeMode         = eShadeMode.smGouraud;
     mPointSize         = 2f;
     m_bBlendingEnabled = false;
     m_bLightingEnabled = true;
     m_Material         = new UWB_Material();
 }
Beispiel #8
0
        /// <summary>Clear everything built. This way you can reuse the builder to build multiple paths, saves non-trivial amount of CPU time wasted on GC.</summary>
        public void clear()
        {
            if (fb.isOpen)
            {
                throw new ApplicationException("You must dispose the current figure before calling PathBuilder.clear()");
            }

            data.Clear();
            segments.Clear();
            figures.Clear();
            fillMode = eFillMode.Winding;
            fb       = new FigureBuilder(this);
        }
 public override void setFillMode(eFillMode fillMode)
 {
     GraphicsDevice graphicsDevice = UWB_XNAGraphicsDevice.m_TheAPI.GraphicsDevice;
     bool needToSetMode = false;
     FillMode newMode = FillMode.Solid;
     switch (fillMode)
     {
         case eFillMode.fmWireframe:
         case eFillMode.fmPoint:
             needToSetMode = (graphicsDevice.RasterizerState.FillMode != FillMode.WireFrame);
             newMode = FillMode.WireFrame;
             break;
         case eFillMode.fmSolid:
             needToSetMode = (graphicsDevice.RasterizerState.FillMode != FillMode.Solid);
             break;
     }
     RasterizerState s = new RasterizerState();
     s.CullMode = CullMode.None;
     s.FillMode = newMode;
     graphicsDevice.RasterizerState = s;
 }
Beispiel #10
0
 public virtual void setFillMode(eFillMode fillMode)
 {
     mFillMode = fillMode;
 }
 public void setFillMode(eFillMode fillMode)
 {
     mFillMode = fillMode;
 }
Beispiel #12
0
 public void setFillMode(eFillMode fillMode)
 {
     mFillMode = fillMode;
 }
 public virtual void setFillMode(eFillMode fillMode)
 {
     mFillMode = fillMode;
 }
 public override void setFillMode(eFillMode fillMode)
 {
     GraphicsDevice graphicsDevice = UWB_XNAGraphicsDevice.m_TheAPI.GraphicsDevice;
     bool needToSetMode = false;
     FillMode newMode = FillMode.Solid;
     switch (fillMode)
     {
         case eFillMode.fmWireframe:
         case eFillMode.fmPoint:
             needToSetMode = (graphicsDevice.RasterizerState.FillMode != FillMode.WireFrame);
             newMode = FillMode.WireFrame;
             break;
         case eFillMode.fmSolid:
             needToSetMode = (graphicsDevice.RasterizerState.FillMode != FillMode.Solid);
             break;
     }
     RasterizerState s = new RasterizerState();
     s.CullMode = CullMode.None;
     s.FillMode = newMode;
     graphicsDevice.RasterizerState = s;
 }