Class DistortedCylinderShape.Factory

java.lang.Object
com.hypixel.hytale.server.worldgen.cave.shape.distorted.DistortedCylinderShape.Factory
All Implemented Interfaces:
DistortedShape.Factory
Enclosing class:
DistortedCylinderShape

public static class DistortedCylinderShape.Factory extends Object implements DistortedShape.Factory
  • Constructor Details

    • Factory

      public Factory()
  • Method Details

    • create

      @Nonnull public DistortedShape create(@Nonnull org.joml.Vector3d origin, @Nonnull org.joml.Vector3d direction, double length, double startWidth, double startHeight, double midWidth, double midHeight, double endWidth, double endHeight, GeneralNoise.InterpolationFunction interpolation)
      Description copied from interface: DistortedShape.Factory
      Creates new instances of a DistortedShape implementation.

      The interpretation of the parameters is determined by the implementing shape. For example, a symmetrical shape such as a sphere might not make use of the direction, and might only use one of the width/height pairs to describe its dimensions. A cylinder on the other hand could make use of all parameters to describe its characteristics.

      Specified by:
      create in interface DistortedShape.Factory
      Parameters:
      origin - the origin or center of the shape
      direction - the direction of the shape
      startWidth - the starting width of the shape
      startHeight - the starting height of the shape
      midWidth - the width half-way along the length of the shape
      midHeight - the height half-way along the length of the shape
      endWidth - the width at the end of the shape
      endHeight - the height at the end of the shape
      interpolation - the interpolation function to be used when calculating the shape
      Returns:
      a new instance of a given DistortedShape implementation