Class SquareCuboid

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

public class SquareCuboid extends Slab
A shape implementation for a square cuboid. A square cuboid is a cube shape with a controllable y (height) value just as a Slab. The main difference between a square cuboid and a slab, is that a square cuboid is considered as a cube in the face visible check algorithm. Even if the y values are different from the default cube (greater then 0 or smaller then 1), the faces between adjacent square cuboids will not be rendered even if they are not shared or touching.
  • Constructor Details

    • SquareCuboid

      public SquareCuboid(float startY, float endY)
  • 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
      Overrides:
      add in class Slab
      Parameters:
      location - of the shape in the chunk
      chunk - of the shape
      chunkMesh - to add the shape to