Esempio n. 1
0
        public static Mesh2f Triangulate(Polygon2f polygon, ConformingCriteria crit = new ConformingCriteria())
        {
            var constructor = new MeshConstructor2f();

            Triangulate(polygon, constructor, crit);
            return(constructor.PopMesh());
        }
Esempio n. 2
0
        public static void Triangulate <MESH>(Polygon2f polygon, IMeshConstructor <MESH> constructor, ConformingCriteria crit = new ConformingCriteria())
        {
            InsertPolygon(polygon);
            InsertSeeds(crit.seeds);

            Box2f bounds = Box2f.CalculateBounds(polygon.Positions);

            CGAL_InsertSeed(bounds.Min - 0.1f);

            MeshDescriptor des = Triangulate(crit.iterations, crit.angBounds, crit.lenBounds);

            CreateMesh(constructor, des);

            CGAL_Clear();
        }