Package com.github.stephengold.joltjni
Class CollideSettingsBase
java.lang.Object
com.github.stephengold.joltjni.JoltPhysicsObject
com.github.stephengold.joltjni.CollideSettingsBase
- All Implemented Interfaces:
ConstJoltPhysicsObject,AutoCloseable,Comparable<JoltPhysicsObject>
- Direct Known Subclasses:
CollideShapeSettings,ShapeCastSettings
Configurable options for a shape-oriented collision query.
-
Method Summary
Modifier and TypeMethodDescriptionReturn how edge collisions should be handled.Copy the movement direction for inactive edges.Return how face information should be handled.floatReturn the collision tolerance for the GJK algorithm.floatReturn the termination tolerance for calculating penetration depth.voidAlter how edge collisions should be handled.voidsetActiveEdgeMovementDirection(Vec3Arg direction) Alter the movement direction for inactive edges.voidAlter how face information should be handled.voidsetCollisionTolerance(float tolerance) Alter the collision tolerance for the GJK algorithm.voidsetPenetrationTolerance(float tolerance) Alter the termination tolerance for calculating penetration depth.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
-
getActiveEdgeMode
Return how edge collisions should be handled. The settings are unaffected. (native attribute: mActiveEdgeMode)- Returns:
- an enum value (not null)
-
getActiveEdgeMovementDirection
Copy the movement direction for inactive edges. The settings are unaffected. (native attribute: mActiveEdgeMovementDirection)- Returns:
- a new direction vector
-
getCollectFacesMode
Return how face information should be handled. The settings are unaffected. (native attribute: mCollectFacesMode)- Returns:
- an enum value (not null)
-
getCollisionTolerance
public float getCollisionTolerance()Return the collision tolerance for the GJK algorithm. The settings are unaffected. (native attribute: mCollisionTolerance)- Returns:
- an enum value (not null)
-
getPenetrationTolerance
public float getPenetrationTolerance()Return the termination tolerance for calculating penetration depth. The settings are unaffected. (native attribute: mPenetrationTolerance)- Returns:
- the tolerance
-
setActiveEdgeMode
Alter how edge collisions should be handled. (native attribute: mActiveEdgeMode)- Parameters:
mode- the desired mode (not null, default=CollideOnlyWithActive)
-
setActiveEdgeMovementDirection
Alter the movement direction for inactive edges. (native attribute: mActiveEdgeMovementDirection)- Parameters:
direction- the desired direction (not null, unaffected, default=(0,0,0))
-
setCollectFacesMode
Alter how face information should be handled. (native attribute: mCollectFacesMode)- Parameters:
mode- the desired mode (not null, default=NoFaces)
-
setCollisionTolerance
public void setCollisionTolerance(float tolerance) Alter the collision tolerance for the GJK algorithm. (native attribute: mCollisionTolerance)- Parameters:
tolerance- the desired tolerance (in meters, default=cDefaultCollisionTolerance)
-
setPenetrationTolerance
public void setPenetrationTolerance(float tolerance) Alter the termination tolerance for calculating penetration depth. (native attribute: mPenetrationTolerance)- Parameters:
tolerance- the desired tolerance (default=cDefaultPenetrationTolerance)
-