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.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
-