Package com.github.stephengold.joltjni
Class ObjVsObjFilter
java.lang.Object
com.github.stephengold.joltjni.JoltPhysicsObject
com.github.stephengold.joltjni.NonCopyable
com.github.stephengold.joltjni.ObjectLayerPairFilter
com.github.stephengold.joltjni.ObjVsObjFilter
- All Implemented Interfaces:
ConstJoltPhysicsObject,ConstObjectLayerPairFilter,AutoCloseable,Comparable<ConstJoltPhysicsObject>
An implementation of
ObjectLayerPairFilter that can be configured at
runtime.-
Constructor Summary
ConstructorsConstructorDescriptionObjVsObjFilter(int numObjectLayers) Instantiate a filter with all interactions enabled. -
Method Summary
Modifier and TypeMethodDescriptiondisableLayer(int layer) Disable all interactions with the specified object layer.disablePair(int layer1, int layer2) Disable interactions between the specified object layers.Methods inherited from class com.github.stephengold.joltjni.ObjectLayerPairFilter
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
-
ObjVsObjFilter
public ObjVsObjFilter(int numObjectLayers) Instantiate a filter with all interactions enabled.- Parameters:
numObjectLayers- the number of object layers (≥1)
-
-
Method Details
-
disableLayer
Disable all interactions with the specified object layer.- Parameters:
layer- the index of the layer (< numObjectLayers)- Returns:
- the modified filter (for chaining)
-
disablePair
Disable interactions between the specified object layers.- Parameters:
layer1- the index of the first object layer (< numObjectLayers)layer2- the index of the 2nd object layer (< numObjectLayers)- Returns:
- the modified filter (for chaining)
-