Package com.rvandoosselaer.blocks
Class Cube
- java.lang.Object
-
- com.rvandoosselaer.blocks.Cube
-
- All Implemented Interfaces:
Shape
public class Cube extends java.lang.Object implements Shape
A shape implementation for a cube. Only 4 vertices are used per face, 2 vertices are shared. A face is only added to the resulting mesh if the face is visible. eg. When there is a block above this block, the top face will not be added to the mesh.
-
-
Field Summary
-
Fields inherited from interface com.rvandoosselaer.blocks.Shape
CUBE, DOUBLE_SLAB, PYRAMID, SLAB, STAIR_BACK, STAIR_FRONT, STAIR_LEFT, STAIR_RIGHT, WEDGE_BACK, WEDGE_FRONT, WEDGE_LEFT, WEDGE_RIGHT
-
-
Constructor Summary
Constructors Constructor Description Cube()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
add(com.simsilica.mathd.Vec3i location, Chunk chunk, ChunkMesh chunkMesh)
Adds the shape at the location in the chunk to the chunk mesh.
-