java.lang.Object
com.github.stephengold.joltjni.JoltPhysicsObject
com.github.stephengold.joltjni.OrientedBox
- All Implemented Interfaces:
ConstJoltPhysicsObject
,ConstOrientedBox
,AutoCloseable
,Comparable<JoltPhysicsObject>
A 3-D box that has been rotated and translated.
-
Constructor Summary
ConstructorsConstructorDescriptionInstantiate a default box.OrientedBox
(Mat44Arg orientation, Vec3Arg halfExtents) Instantiate a box with the specified transform and half extents. -
Method Summary
Modifier and TypeMethodDescriptionCopy the (half) extent of the box on each local axis.Copy the transform that translates and rotates the local-space axes to world space.Methods inherited from class com.github.stephengold.joltjni.JoltPhysicsObject
close, compareTo, equals, getContainingObject, hasAssignedNativeObject, hashCode, ownsNativeObject, setVirtualAddress, setVirtualAddress, startCleaner, targetVa, toString, va
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
Methods inherited from interface java.lang.Comparable
compareTo
Methods inherited from interface com.github.stephengold.joltjni.readonly.ConstJoltPhysicsObject
close, hasAssignedNativeObject, ownsNativeObject, targetVa
-
Constructor Details
-
OrientedBox
public OrientedBox()Instantiate a default box. -
OrientedBox
Instantiate a box with the specified transform and half extents.- Parameters:
orientation
- the desired rotation and translation (not null, unaffected)halfExtents
- the desired half-extent on each local axis (not null, unaffected)
-
-
Method Details
-
getHalfExtents
Copy the (half) extent of the box on each local axis. The box is unaffected. (native attribute: mHalfExtents)- Specified by:
getHalfExtents
in interfaceConstOrientedBox
- Returns:
- a new vector
-
getOrientation
Copy the transform that translates and rotates the local-space axes to world space. The box is unaffected. (native attribute: mOrientation)- Specified by:
getOrientation
in interfaceConstOrientedBox
- Returns:
- a new matrix
-