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(); }
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)); }
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)); }
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); } }