Package com.github.stephengold.joltjni
Class BoxShape
java.lang.Object
com.github.stephengold.joltjni.JoltPhysicsObject
com.github.stephengold.joltjni.NonCopyable
com.github.stephengold.joltjni.Shape
com.github.stephengold.joltjni.ConvexShape
com.github.stephengold.joltjni.BoxShape
- All Implemented Interfaces:
ConstJoltPhysicsObject,ConstShape,RefTarget,AutoCloseable,Comparable<ConstJoltPhysicsObject>
A
Shape to represent centered, axis-aligned rectangular solids.-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionfloatReturn the convex radius.Copy the half extents.Methods inherited from class com.github.stephengold.joltjni.Shape
copyDebugTriangles, countDebugTriangles, draw, getCenterOfMass, getInnerRadius, getLocalBounds, getMassProperties, getRefCount, getSubType, getType, getUserData, getWorldSpaceBounds, mustBeStatic, setEmbedded, setUserData, toRef, toRefCMethods inherited from class com.github.stephengold.joltjni.JoltPhysicsObject
close, compareTo, equals, hasAssignedNativeObject, hashCode, ownsNativeObject, setVirtualAddress, startCleaner, toString, vaMethods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, waitMethods inherited from interface java.lang.Comparable
compareToMethods inherited from interface com.github.stephengold.joltjni.readonly.ConstJoltPhysicsObject
close, hasAssignedNativeObject, ownsNativeObject, va
-
Constructor Details
-
BoxShape
Instantiate a shape with the specified half extents.- Parameters:
halfExtents- the desired half extents on each local axis (not null, all components ≥0, unaffected)
-
BoxShape
Instantiate a shape with the specified half extents and convex radius.- Parameters:
halfExtents- the desired half extents on each local axis (not null, all components ≥0, unaffected)convexRadius- the desired convex radius (default=0.05)
-
-
Method Details
-
getConvexRadius
public float getConvexRadius()Return the convex radius. The shape is unaffected.- Returns:
- the radius (≥0)
-
getHalfExtent
Copy the half extents. The shape is unaffected.- Returns:
- a new vector
-