Package jme3utilities.math
Class RectangularSolid
java.lang.Object
jme3utilities.math.RectangularSolid
A rectangular solid whose axes might not be aligned with the world axes.
Immutable.
-
Field Summary
-
Constructor Summary
ConstructorDescriptionInstantiate a zero-extent rectangular solid at the origin.RectangularSolid
(Vector3f halfExtents) Instantiate a centered solid with the specified half extents. -
Method Summary
Modifier and TypeMethodDescriptionhalfExtents
(Vector3f storeResult) Determine the half extents of the solid.localToWorld
(Vector3f local, Vector3f storeResult) Rotate from local coordinates to world coordinates.Copy the maximum coordinate value for each local axis.Copy minimum coordinate value for each local axis.toString()
Represent this solid as a text string.
-
Field Details
-
logger
message logger for this class
-
-
Constructor Details
-
RectangularSolid
public RectangularSolid()Instantiate a zero-extent rectangular solid at the origin. -
RectangularSolid
Instantiate a centered solid with the specified half extents.- Parameters:
halfExtents
- half extents the axis-aligned bounding box (not null, unaffected)
-
-
Method Details
-
halfExtents
Determine the half extents of the solid.- Parameters:
storeResult
- storage for the result (modified if not null)- Returns:
- the half extent of each local axis (either storeResult or a new vector, not null, all components non-negative)
-
localToWorld
Rotate from local coordinates to world coordinates.It is safe for
local
andstoreResult
to be the same object.- Parameters:
local
- the input coordinates (not null, unaffected)storeResult
- storage for the result (modified if not null)- Returns:
- the corresponding world coordinates (either storeResult or a new vector, not null)
-
maxima
Copy the maximum coordinate value for each local axis.- Parameters:
storeResult
- storage for the result (modified if not null)- Returns:
- the maxima (either storeResult or a new vector, not null)
-
minima
Copy minimum coordinate value for each local axis.- Parameters:
storeResult
- storage for the result (modified if not null)- Returns:
- the minima (either storeResult or a new vector, not null)
-
toString
Represent this solid as a text string.
-