java.lang.Object
com.github.stephengold.joltjni.JoltPhysicsObject
com.github.stephengold.joltjni.Support
- All Implemented Interfaces:
ConstJoltPhysicsObject
,AutoCloseable
,Comparable<JoltPhysicsObject>
Interface to the Gilbert–Johnson–Keerthi (GJK) distance algorithm. (native
type:
ConvexShape::Support
)-
Method Summary
Modifier and TypeMethodDescriptionfloat
Return the convex radius.getSupport
(float dx, float dy, float dz) Calculate a support vector for the specified direction.getSupport
(Vec3Arg direction) Calculate a support vector for the specified direction.void
getSupportBulk
(FloatBuffer directions, FloatBuffer storePoints) Calculate support vectors for the specified directions.Methods inherited from class com.github.stephengold.joltjni.JoltPhysicsObject
close, compareTo, equals, getContainingObject, hasAssignedNativeObject, hashCode, isCleanerStarted, ownsNativeObject, setVirtualAddress, setVirtualAddress, startCleaner, targetVa, toString, va
-
Method Details
-
getConvexRadius
public float getConvexRadius()Return the convex radius.- Returns:
- the added distance (in meters)
-
getSupport
Calculate a support vector for the specified direction.- Parameters:
dx
- the X component of the input directiondy
- the Y component of the input directiondz
- the Z component of the input direction- Returns:
- a new location vector relative to the shape's center of mass
-
getSupport
Calculate a support vector for the specified direction.- Parameters:
direction
- the input direction (not null, unaffected)- Returns:
- a new location vector relative to the shape's center of mass
-
getSupportBulk
Calculate support vectors for the specified directions.- Parameters:
directions
- the input directions (not null, capacity a multiple of 3, unaffected)storePoints
- storage for location vectors relative to the shape's center of mass (not null, same capacity asdirections
)
-