Ejemplo n.º 1
0
        // Make an octahedron without texture coordinates or smoothing.
        public static void AddOctahedron(this MeshGeometry3D mesh)
        {
            // Get the points.
            Point3D A, B, C, D, E, F;

            G3.OctahedronPoints(out A, out B, out C, out D, out E, out F);

            // Make the faces.
            mesh.AddPolygon(A, B, C);
            mesh.AddPolygon(A, C, D);
            mesh.AddPolygon(A, D, E);
            mesh.AddPolygon(A, E, B);
            mesh.AddPolygon(F, B, E);
            mesh.AddPolygon(F, C, B);
            mesh.AddPolygon(F, D, C);
            mesh.AddPolygon(F, E, D);
        }
Ejemplo n.º 2
0
        public static void VerifyOctahedron()
        {
            // Get the points.
            Point3D A, B, C, D, E, F;

            G3.OctahedronPoints(out A, out B, out C, out D, out E, out F);

            // Verify the points.
            G3.VerifyPoints(A, B, C, D);

            // Verify the faces.
            G3.VerifyPolygon(A, B, C);
            G3.VerifyPolygon(A, C, D);
            G3.VerifyPolygon(A, D, E);
            G3.VerifyPolygon(A, E, B);
            G3.VerifyPolygon(F, B, E);
            G3.VerifyPolygon(F, C, B);
            G3.VerifyPolygon(F, D, C);
            G3.VerifyPolygon(F, E, D);
        }