Class Pole

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

public class Pole extends Object implements Shape
A shape implementation for a pole. The default direction of a pole is UP. A direction of NORTH/EAST/SOUTH/WEST will create a horizontal pole, with the top face facing the direction. The Direction UP/DOWN will create a vertical pole. The depth/width of the pole can be configured with the widthExtend.
  • Constructor Details

    • Pole

      public Pole()
    • Pole

      public Pole(Direction direction, float widthExtend)
  • 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
    • map

      public static float map(float value, float startRangeIn, float endRangeIn, float startRangeOut, float endRangeOut)
      Function that scales an input value in a given range to a given output range.