Esempio n. 1
0
        public static Mesh Triangulate(Polygon p)
        {
            Tesselator <Vertex> tess = new Tesselator <Vertex> (Vertex.Combine);

            Mesh m = Triangulate(tess, p);

            tess.Dispose();
            return(m);
        }
Esempio n. 2
0
        public static Mesh TriangulateVerbose(Polygon p)
        {
            Tesselator <Vertex> tess = new Tesselator <Vertex> (Vertex.Combine);

            tess.BeginEv     += verboseBegin;
            tess.EndEv       += verboseEnd;
            tess.CombineEv   += verboseCombine;
            tess.EdgeFlagsEv += verboseEdgeFlag;
            tess.VertexEv    += verboseVertex;
            tess.ErrorEv     += verboseError;

            Mesh m = Triangulate(tess, p);

            tess.Dispose();
            return(m);
        }