Ejemplo n.º 1
0
        public static void basic_tests()
        {
            System.Console.WriteLine("DMesh3:basic_tests() starting");

            DMesh3 tmp = new DMesh3();
            CappedCylinderGenerator cylgen = new CappedCylinderGenerator();

            cylgen.Generate();
            cylgen.MakeMesh(tmp);
            tmp.CheckValidity();

            System.Console.WriteLine("cylinder ok");
        }
Ejemplo n.º 2
0
        public static DMesh3 MakeCappedCylinder(bool bNoSharedVertices, int nSlices = 16, bool bHole = false)
        {
            DMesh3 mesh = new DMesh3(true, false, false, true);
            CappedCylinderGenerator cylgen = new CappedCylinderGenerator()
            {
                NoSharedVertices = bNoSharedVertices, Slices = nSlices
            };

            cylgen.Generate();
            cylgen.MakeMesh(mesh);
            mesh.ReverseOrientation();
            if (bHole)
            {
                mesh.RemoveTriangle(0);
            }
            return(mesh);
        }