Package net.risingworld.api.utils
Klasse Bounds
java.lang.Object
net.risingworld.api.utils.Bounds
- Alle implementierten Schnittstellen:
Serializable
Describes a bounding volume, represented as an axis-aligned bounding
box (AABB), i.e the extends of the object along the x, y and z axis as well as the
position of the center of the object.
- Siehe auch:
-
Konstruktorübersicht
-
Methodenübersicht
Modifizierer und TypMethodeBeschreibungboolean
Gets the bounds center.float
Gets the (half) extent along the x axis.float
Gets the (half) extent along the y axis.float
Gets the (half) extent along the z axis.int
hashCode()
boolean
isPointInVolume
(Vector3f point) Checks if the given point (represented as aVector3f
) is inside the bounds.toString()
Gets a String representation of the bounds.
-
Konstruktordetails
-
Bounds
public Bounds()Creates "empty" bounds. -
Bounds
Creates a new bounds object.- Parameter:
center
- the center of the bounds.xExtent
- the half extent along the x axis.yExtent
- the half extent along the y axis.zExtent
- the half extent along the z axis.
-
Bounds
public Bounds(float x, float y, float z, float xExtent, float yExtent, float zExtent) Creates a new bounds object.- Parameter:
x
- the x position of the bounds center.y
- the x position of the bounds center.z
- the x position of the bounds center.xExtent
- the half extent along the x axis.yExtent
- the half extent along the y axis.zExtent
- the half extent along the z axis.
-
-
Methodendetails
-
getXExtent
public float getXExtent()Gets the (half) extent along the x axis.- Gibt zurück:
- the extent along the x axis.
-
getYExtent
public float getYExtent()Gets the (half) extent along the y axis.- Gibt zurück:
- the extent along the y axis.
-
getZExtent
public float getZExtent()Gets the (half) extent along the z axis.- Gibt zurück:
- the extent along the z axis.
-
getCenter
Gets the bounds center.- Gibt zurück:
- the position of the center.
-
isPointInVolume
Checks if the given point (represented as aVector3f
) is inside the bounds.- Parameter:
point
- the point in 3d space (i.e world position).- Gibt zurück:
- true if the point is inside the bounds, false if not.
-
toString
Gets a String representation of the bounds. -
equals
-
hashCode
public int hashCode()
-