Ejemplo n.º 1
0
        internal override bool TessellateCore(IRenderPackage package)
        {
            if (base.TessellateCore(package))
            {
                return(true);
            }

            Color c = (this.Color == null) ? Color.Yellow : this.Color;

            Point[] vertices = this.Vertices;
            foreach (var item in vertices)
            {
                package.PushLineStripVertex(item.X, item.Y, item.Z);
                package.PushLineStripVertexColor(c.RedValue, c.GreenValue, c.BlueValue, c.AlphaValue);
            }
            //Close the loop
            package.PushLineStripVertex(vertices[0].X, vertices[0].Y, vertices[0].Z);
            package.PushLineStripVertexColor(c.RedValue, c.GreenValue, c.BlueValue, c.AlphaValue);
            package.PushLineStripVertexCount(vertices.Length + 1);
            return(true);
        }
Ejemplo n.º 2
0
        internal override sealed bool TessellateCore(IRenderPackage package)
        {
            if (base.TessellateCore(package))
                return true;

            DSColor c = (this.Color == null) ? DSColor.Yellow : this.Color;
            int nMaxSamples = 16;
            IPointEntity[] samples = GetSamplePoints(nMaxSamples);

            foreach (var item in samples)
            {
                package.PushLineStripVertex(item.X, item.Y, item.Z);
                package.PushLineStripVertexColor(c.RedValue, c.GreenValue, c.BlueValue, c.AlphaValue);
            }

            int nSamples = samples.Length;
            if (this.IsClosed)
            {
                package.PushLineStripVertex(samples[0].X, samples[0].Y, samples[0].Z);
                package.PushLineStripVertexColor(c.RedValue, c.GreenValue, c.BlueValue, c.AlphaValue);
                ++nSamples;
            }
            package.PushLineStripVertexCount(nSamples);
            return true;
        }
Ejemplo n.º 3
0
        internal override bool TessellateCore(IRenderPackage package)
        {
            if (base.TessellateCore(package))
                return true;

            DSColor c = (this.Color == null) ? DSColor.Yellow : this.Color;
            DSPoint[] vertices = this.Vertices;
            foreach (var item in vertices)
            {
                package.PushLineStripVertex(item.X, item.Y, item.Z);
                package.PushLineStripVertexColor(c.RedValue, c.GreenValue, c.BlueValue, c.AlphaValue);
            }
            //Close the loop
            package.PushLineStripVertex(vertices[0].X, vertices[0].Y, vertices[0].Z);
            package.PushLineStripVertexColor(c.RedValue, c.GreenValue, c.BlueValue, c.AlphaValue);
            package.PushLineStripVertexCount(vertices.Length + 1);
            return true;
        }