Beispiel #1
0
        public void Tesselate(VertexModel output)
        {
            var firstIdx = output.AddVertexes(Vertexes);
            var lastIdx  = firstIdx + Vertexes.Count;

            // We triangulate a convex poly just by drawing lines from the first point to
            // all the others...
            for (uint i = firstIdx + 2; i < lastIdx; i++)
            {
                var tri = new uint[] {
                    firstIdx, i - 1, i
                };
                output.AddIndices(tri);
            }
        }
Beispiel #2
0
        protected IEnumerable <uint> AddVertexes(IList <LineArtVertex> verts)
        {
            uint start = Output.AddVertexes(verts);

            return(Util.UnsignedRange(start, (uint)(start + verts.Count)));
        }