예제 #1
0
        public BoxPrimitive(BoxTextureCoords uvs)
        {
            Width  = 1.0f;
            Height = 1.0f;
            UVs    = uvs;
            CreateVerticies();
            BoundingBox = new BoundingBox(Vector3.Zero, Vector3.One);

            VertexClassifications = Vertices.Select(v => GetNearestDelta(v.Position)).ToList();
        }
예제 #2
0
        public BoxPrimitive(GraphicsDevice device, float width, float height, float depth, BoxTextureCoords uvs)
        {
            Width  = width;
            Height = height;
            Depth  = depth;

            UVs = uvs;
            CreateVerticies();
            ResetBuffer(device);
            BoundingBox = new BoundingBox(new Vector3(0.0f, 0.0f, 0.0f), new Vector3(width, height, depth));
        }
예제 #3
0
        public BoxPrimitive(GraphicsDevice device, float width, float height, float depth, BoxTextureCoords uvs)
        {
            Width = width;
            Height = height;
            Depth = depth;

            UVs = uvs;
            CreateVerticies();
            ResetBuffer(device);
            boundingBox = new BoundingBox(new Vector3(0.0f, 0.0f, 0.0f), new Vector3(width, height, depth));
        }
예제 #4
0
 public BoxPrimitive(GraphicsDevice device, float width, float height, float depth, BoxTextureCoords uvs)
 {
     Width  = width;
     Height = height;
     Depth  = depth;
     Deltas = new VoxelVertex[NumVertices];
     UVs    = uvs;
     CreateVerticies();
     BoundingBox = new BoundingBox(new Vector3(0.0f, 0.0f, 0.0f), new Vector3(width, height, depth));
     for (int i = 0; i < NumVertices; i++)
     {
         Deltas[i] = GetNearestDelta(Vertices[i].Position);
     }
 }