Interface ConstObjectLayerPairFilter
- All Superinterfaces:
Comparable<ConstJoltPhysicsObject>,ConstJoltPhysicsObject
- All Known Implementing Classes:
ObjectLayerPairFilter,ObjVsObjFilter
Read-only access to an
ObjectLayerPairFilter. (native type: const
ObjectLayerPairFilter)-
Method Summary
Modifier and TypeMethodDescriptionbooleanshouldCollide(int layer1, int layer2) Test whether the specified layers should collide.Methods inherited from interface java.lang.Comparable
compareToMethods inherited from interface com.github.stephengold.joltjni.readonly.ConstJoltPhysicsObject
close, hasAssignedNativeObject, ownsNativeObject, va
-
Method Details
-
shouldCollide
boolean shouldCollide(int layer1, int layer2) Test whether the specified layers should collide. The filter is unaffected.- 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
-