Package com.github.stephengold.joltjni
Class CollideSettingsBase
java.lang.Object
com.github.stephengold.joltjni.JoltPhysicsObject
com.github.stephengold.joltjni.CollideSettingsBase
- All Implemented Interfaces:
ConstCollideSettingsBase,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, targetVaOrZero, 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, targetVa, targetVaOrZero
-
Method Details
-
setActiveEdgeMode
Alter how edge collisions should be handled. (native attribute: mActiveEdgeMode)- Parameters:
mode- the desired mode (notnull, default=CollideOnlyWithActive)
-
setActiveEdgeMovementDirection
Alter the movement direction for inactive edges. (native attribute: mActiveEdgeMovementDirection)- Parameters:
direction- the desired direction (notnull, unaffected, default=(0,0,0))
-
setCollectFacesMode
Alter how face information should be handled. (native attribute: mCollectFacesMode)- Parameters:
mode- the desired mode (notnull, 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)
-
getActiveEdgeMode
Return how edge collisions should be handled. The settings are unaffected. (native attribute: mActiveEdgeMode)- Specified by:
getActiveEdgeModein interfaceConstCollideSettingsBase- Returns:
- an enum value (not
null)
-
getActiveEdgeMovementDirection
Copy the movement direction for inactive edges. The settings are unaffected. (native attribute: mActiveEdgeMovementDirection)- Specified by:
getActiveEdgeMovementDirectionin interfaceConstCollideSettingsBase- Returns:
- a new direction vector
-
getCollectFacesMode
Return how face information should be handled. The settings are unaffected. (native attribute: mCollectFacesMode)- Specified by:
getCollectFacesModein interfaceConstCollideSettingsBase- 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)- Specified by:
getCollisionTolerancein interfaceConstCollideSettingsBase- 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)- Specified by:
getPenetrationTolerancein interfaceConstCollideSettingsBase- Returns:
- the tolerance
-