Class Cylinder

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

public class Cylinder extends Object implements Shape
A shape implementation for a cylinder. The default direction of a cylinder is UP. A direction of NORTH/EAST/SOUTH/WEST will create a horizontal cylinder, with the top face facing the direction. The Direction UP/DOWN will create a vertical cylinder. The top and bottom radius of the cylinder can be configured as the radial samples.
  • Constructor Details

    • Cylinder

      public Cylinder()
    • Cylinder

      public Cylinder(float radius)
    • Cylinder

      public Cylinder(Direction direction, float radius)
    • Cylinder

      public Cylinder(Direction direction, float topRadius, float bottomRadius, int radialSamples)
  • 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