Package com.github.stephengold.joltjni
Class BroadPhaseLayerFilter
java.lang.Object
com.github.stephengold.joltjni.JoltPhysicsObject
com.github.stephengold.joltjni.NonCopyable
com.github.stephengold.joltjni.BroadPhaseLayerFilter
- All Implemented Interfaces:
ConstJoltPhysicsObject,AutoCloseable,Comparable<ConstJoltPhysicsObject>
- Direct Known Subclasses:
DefaultBroadPhaseLayerFilter,SpecifiedBroadPhaseLayerFilter
A collision filter for broad-phase layers.
-
Constructor Summary
ConstructorsConstructorDescriptionInstantiate a default filter that selects all layers. -
Method Summary
Modifier and TypeMethodDescriptionbooleanshouldCollide(int bpLayerIndex) Test whether the specified layer is a candidate for collisions.Methods inherited from class com.github.stephengold.joltjni.JoltPhysicsObject
close, compareTo, equals, hasAssignedNativeObject, hashCode, ownsNativeObject, setVirtualAddress, startCleaner, toString, va
-
Constructor Details
-
BroadPhaseLayerFilter
public BroadPhaseLayerFilter()Instantiate a default filter that selects all layers.
-
-
Method Details
-
shouldCollide
public boolean shouldCollide(int bpLayerIndex) Test whether the specified layer is a candidate for collisions. The filter is unaffected.- Parameters:
bpLayerIndex- the index of the broad-phase layer to test- Returns:
- true if may collide, false if filtered out
-