Interface DistortedShape

All Superinterfaces:
IChunkBounds, IWorldBounds
All Known Implementing Classes:
AbstractDistortedBody, AbstractDistortedExtrusion, AbstractDistortedShape, DistortedCylinderShape, DistortedEllipsoidShape, DistortedPipeShape

public interface DistortedShape extends IWorldBounds
  • Method Details

    • getStart

      org.joml.Vector3d getStart()
      Get the start point of this Shape
      Returns:
      the start point
    • getEnd

      org.joml.Vector3d getEnd()
      Get the end point of this Shape
      Returns:
      the end point
    • getAnchor

      org.joml.Vector3d getAnchor(org.joml.Vector3d vector, double tx, double ty, double tz)
      Get a projected anchor point on this Shape.
      Parameters:
      vector - The vector to assign the point to.
      tx - The projection in the x-axis.
      ty - The projection in the y-axis.
      tz - The projection in the z-axis.
      Returns:
      The resulting anchor point for the projection.
    • getProjection

      double getProjection(double x, double z)
      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

      boolean isValidProjection(double t)
      Validate a projection on this Shape
      Parameters:
      t - the project
      Returns:
      True if a valid projection
    • getYAt

      double getYAt(double t)
      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

      double getWidthAt(double t)
      Get the horizontal radius of the Shape at projection t
      Parameters:
      t - the projection
      Returns:
      the horizontal radius of the Shape
    • getHeightAt

      double getHeightAt(double t)
      Get the vertical radius of the Shape at projection t
      Parameters:
      t - the projection
      Returns:
      the vertical radius of the Shape
    • getHeightAtProjection

      double getHeightAtProjection(int seed, double x, double z, double t, double centerY, CaveType caveType, ShapeDistortion distortion)
      Get the height/vertical-radius of this Shape at a position x,z and corresponding projection t
      Parameters:
      seed - the CaveType seed
      x - the x-coordinate to get the height for
      z - the z-coordinate to get the height for
      t - the projection to get the height for
      centerY - the y-coordinate at the center of this Shape at projection t
      caveType - the CaveType
      distortion - the distortion to be applied to the Shape
      Returns:
      the height/vertical-radius of the Shape at the given position
    • getCeiling

      default double getCeiling(double x, double z, double centerY, double height)
    • getFloor

      default double getFloor(double x, double z, double centerY, double height)