예제 #1
0
 public WpfCube(WpfCube cube)
 {
     width  = cube.width;
     height = cube.height;
     depth  = cube.depth;
     origin = new Point3D(cube.origin.X, cube.origin.Y, cube.origin.Z);
 }
예제 #2
0
        public static void AddCubeToMesh(Point3D p0, double w, double h, double d, MeshGeometry3D mesh)
        {
            WpfCube      cube   = new WpfCube(p0, w, h, d);
            WpfRectangle front  = cube.Front();
            WpfRectangle back   = cube.Back();
            WpfRectangle right  = cube.Right();
            WpfRectangle left   = cube.Left();
            WpfRectangle top    = cube.Top();
            WpfRectangle bottom = cube.Bottom();

            front.AddToMesh(mesh);
            back.AddToMesh(mesh);
            right.AddToMesh(mesh);
            left.AddToMesh(mesh);
            top.AddToMesh(mesh);
            bottom.AddToMesh(mesh);
        }