Class DistortedCylinderShape

All Implemented Interfaces:
DistortedShape, IChunkBounds, IWorldBounds
Direct Known Subclasses:
DistortedPipeShape

public class DistortedCylinderShape extends AbstractDistortedExtrusion
  • Constructor Details

    • DistortedCylinderShape

      public DistortedCylinderShape(@Nonnull org.joml.Vector3d o, @Nonnull org.joml.Vector3d v, double startWidth, double startHeight, double midWidth, double midHeight, double endWidth, double endHeight, GeneralNoise.InterpolationFunction interpolation)
    • DistortedCylinderShape

      public DistortedCylinderShape(@Nonnull org.joml.Vector3d o, @Nonnull org.joml.Vector3d v, double startWidth, double startHeight, double midWidth, double midHeight, double endWidth, double endHeight, double maxWidth, double maxHeight, GeneralNoise.InterpolationFunction interpolation)
  • Method Details

    • getStart

      @Nonnull public org.joml.Vector3d getStart()
      Description copied from interface: DistortedShape
      Get the start point of this Shape
      Returns:
      the start point
    • getEnd

      @Nonnull public org.joml.Vector3d getEnd()
      Description copied from interface: DistortedShape
      Get the end point of this Shape
      Returns:
      the end point
    • getAnchor

      @Nonnull public org.joml.Vector3d getAnchor(@Nonnull org.joml.Vector3d vector, double t, double tv, double th)
      Description copied from interface: DistortedShape
      Get a projected anchor point on this Shape.
      Parameters:
      vector - The vector to assign the point to.
      t - The projection in the x-axis.
      tv - The projection in the y-axis.
      th - The projection in the z-axis.
      Returns:
      The resulting anchor point for the projection.
    • getProjection

      public double getProjection(double x, double z)
      Description copied from interface: DistortedShape
      Get the projection of a point x,z on this Shape
      Parameters:
      x - the x-coordinate to measure from
      z - the z-coordinate to measure from
      Returns:
      the projection
    • isValidProjection

      public boolean isValidProjection(double t)
      Description copied from interface: DistortedShape
      Validate a projection on this Shape
      Parameters:
      t - the project
      Returns:
      True if a valid projection
    • getYAt

      public double getYAt(double t)
      Description copied from interface: DistortedShape
      Get the y-level of the Shape's center at projection t
      Parameters:
      t - the projection
      Returns:
      the y-level of the shape's center
    • getWidthAt

      public double getWidthAt(double t)
      Description copied from interface: DistortedShape
      Get the horizontal radius of the Shape at projection t
      Parameters:
      t - the projection
      Returns:
      the horizontal radius of the Shape
    • getHeightAt

      public double getHeightAt(double t)
      Description copied from interface: DistortedShape
      Get the vertical radius of the Shape at projection t
      Parameters:
      t - the projection
      Returns:
      the vertical radius of the Shape
    • getDistanceSq

      public double getDistanceSq(double x, double z, double t)
    • getHeightComponent

      public double getHeightComponent(double width, double width2, double dist2)
    • toString

      @Nonnull public String toString()
      Overrides:
      toString in class Object