Package com.github.stephengold.joltjni
Class ObjectLayerPairFilter
java.lang.Object
com.github.stephengold.joltjni.JoltPhysicsObject
com.github.stephengold.joltjni.NonCopyable
com.github.stephengold.joltjni.ObjectLayerPairFilter
- All Implemented Interfaces:
ConstJoltPhysicsObject,ConstObjectLayerPairFilter,AutoCloseable,Comparable<ConstJoltPhysicsObject>
- Direct Known Subclasses:
ObjVsObjFilter
public abstract class ObjectLayerPairFilter
extends NonCopyable
implements ConstObjectLayerPairFilter
Filter collisions between object layers.
-
Method Summary
Modifier and TypeMethodDescriptionbooleanshouldCollide(int layer1, int layer2) Test whether the specified layers should collide.Methods 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
-
Method Details
-
shouldCollide
public boolean shouldCollide(int layer1, int layer2) Test whether the specified layers should collide.- Specified by:
shouldCollidein interfaceConstObjectLayerPairFilter- Parameters:
layer1- the index of the first object layer (≥0, <numObjectLayers)layer2- the index of the 2nd object layer (≥0, <numObjectLayers)- Returns:
- true if they should collide, otherwise false
-