Contents
- Description
- Nested Class Summary
- Method Summary
- Method Details
- getStart()
- getEnd()
- getAnchor(Vector3d, double, double, double)
- getProjection(double, double)
- isValidProjection(double)
- getYAt(double)
- getWidthAt(double)
- getHeightAt(double)
- getHeightAtProjection(int, double, double, double, double, CaveType, ShapeDistortion)
- getCeiling(double, double, double, double)
- getFloor(double, double, double, double)
Interface DistortedShape
- All Superinterfaces:
IChunkBounds, IWorldBounds
- All Known Implementing Classes:
AbstractDistortedBody, AbstractDistortedExtrusion, AbstractDistortedShape, DistortedCylinderShape, DistortedEllipsoidShape, DistortedPipeShape
-
Nested Class Summary
Nested Classes -
Method Summary
Modifier and TypeMethodDescriptionorg.joml.Vector3dgetAnchor(org.joml.Vector3d vector, double tx, double ty, double tz) Get a projected anchor point on this Shape.default doublegetCeiling(double x, double z, double centerY, double height) org.joml.Vector3dgetEnd()Get the end point of this Shapedefault doublegetFloor(double x, double z, double centerY, double height) doublegetHeightAt(double t) Get the vertical radius of the Shape at projection tdoublegetHeightAtProjection(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 tdoublegetProjection(double x, double z) Get the projection of a point x,z on this Shapeorg.joml.Vector3dgetStart()Get the start point of this ShapedoublegetWidthAt(double t) Get the horizontal radius of the Shape at projection tdoublegetYAt(double t) Get the y-level of the Shape's center at projection tbooleanisValidProjection(double t) Validate a projection on this ShapeMethods inherited from interface IChunkBounds
fractionX, fractionZ, getHighBoundX, getHighBoundX, getHighBoundZ, getHighBoundZ, getHighChunkX, getHighChunkZ, getLowBoundX, getLowBoundX, getLowBoundZ, getLowBoundZ, getLowChunkX, getLowChunkZ, intersectsChunk, randomX, randomZMethods inherited from interface IWorldBounds
fractionY, getHighBoundY, getLowBoundY, intersectsChunk, isValid, randomY
-
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 fromz- 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 seedx- the x-coordinate to get the height forz- the z-coordinate to get the height fort- the projection to get the height forcenterY- the y-coordinate at the center of this Shape at projection tcaveType- the CaveTypedistortion- 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)
-