Class Cube

java.lang.Object
com.rvandoosselaer.blocks.shapes.Cube
All Implemented Interfaces:
Shape

public class Cube extends 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. The default cube has a Direction.UP.
  • Constructor Details

    • Cube

      public Cube()
  • Method Details

    • add

      public void add(com.simsilica.mathd.Vec3i location, Chunk chunk, ChunkMesh chunkMesh)
      Description copied from interface: Shape
      Adds the shape at the location in the chunk to the chunk mesh.
      Specified by:
      add in interface Shape
      Parameters:
      location - of the shape in the chunk
      chunk - of the shape
      chunkMesh - to add the shape to