Beispiel #1
0
        // Make a cube without texture coordinates or smoothing.
        public static void AddCube(this MeshGeometry3D mesh)
        {
            // Get the points.
            Point3D A, B, C, D, E, F, G, H;

            G3.CubePoints(out A, out B, out C, out D, out E, out F, out G, out H);

            // Make the faces.
            mesh.AddPolygon(A, B, C, D);
            mesh.AddPolygon(A, D, H, E);
            mesh.AddPolygon(A, E, F, B);
            mesh.AddPolygon(G, C, B, F);
            mesh.AddPolygon(G, F, E, H);
            mesh.AddPolygon(G, H, D, C);
        }
Beispiel #2
0
        public static void VerifyCube()
        {
            // Get the points.
            Point3D A, B, C, D, E, F, G, H;

            G3.CubePoints(out A, out B, out C, out D, out E, out F, out G, out H);

            // Verify the points.
            G3.VerifyPoints(A, B, C, D, E, F, G, H);

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