Package com.github.stephengold.joltjni
Class ObjVsBpFilter
java.lang.Object
com.github.stephengold.joltjni.JoltPhysicsObject
com.github.stephengold.joltjni.NonCopyable
com.github.stephengold.joltjni.ObjectVsBroadPhaseLayerFilter
com.github.stephengold.joltjni.ObjVsBpFilter
- All Implemented Interfaces:
ConstJoltPhysicsObject,ConstObjectVsBroadPhaseLayerFilter,AutoCloseable,Comparable<ConstJoltPhysicsObject>
An implementation of
ObjectVsBroadPhaseLayerFilter that can be
configured at runtime.-
Constructor Summary
ConstructorsConstructorDescriptionObjVsBpFilter(int numObjectLayers, int numBpLayers) Instantiate a filter with all interactions enabled. -
Method Summary
Modifier and TypeMethodDescriptiondisableBp(int bpLayer) Disable interactions with the specified layer.disableObj(int objLayer) Disable interactions with the specified layer.disablePair(int objLayer, int bpLayer) Disable interactions between the specified layers.Methods inherited from class com.github.stephengold.joltjni.ObjectVsBroadPhaseLayerFilter
shouldCollideMethods 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
-
ObjVsBpFilter
public ObjVsBpFilter(int numObjectLayers, int numBpLayers) Instantiate a filter with all interactions enabled.- Parameters:
numObjectLayers- the number of object layers (≥1)numBpLayers- the number of broad-phase layers (≥1)
-
-
Method Details
-
disableBp
Disable interactions with the specified layer.- Parameters:
bpLayer- the index of the broad-phase layer (< numBpLayers)- Returns:
- the modified filter (for chaining)
-
disableObj
Disable interactions with the specified layer.- Parameters:
objLayer- the index of the object layer (< numObjectLayers)- Returns:
- the modified filter (for chaining)
-
disablePair
Disable interactions between the specified layers.- Parameters:
objLayer- the index of the object layer (< numObjectLayers)bpLayer- the index of the broad-phase layer (< numBpLayers)- Returns:
- the modified filter (for chaining)
-