java.lang.Object
com.github.stephengold.joltjni.JoltPhysicsObject
com.github.stephengold.joltjni.NonCopyable
com.github.stephengold.joltjni.SimShapeFilter
- All Implemented Interfaces:
ConstJoltPhysicsObject,AutoCloseable,Comparable<JoltPhysicsObject>
A shape filter for simulation.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionbooleanshouldCollide(ConstBody body1, ConstShape shape1, int subShapeId1, ConstBody body2, ConstShape shape2, int subShapeId2) Test whether the specified collision should be simulated.Methods inherited from class com.github.stephengold.joltjni.JoltPhysicsObject
close, compareTo, equals, getContainingObject, hasAssignedNativeObject, hashCode, isCleanerStarted, ownsNativeObject, setVirtualAddress, setVirtualAddress, startCleaner, targetVa, toString, va
-
Constructor Details
-
SimShapeFilter
public SimShapeFilter()Instantiate a default filter.
-
-
Method Details
-
shouldCollide
public boolean shouldCollide(ConstBody body1, ConstShape shape1, int subShapeId1, ConstBody body2, ConstShape shape2, int subShapeId2) Test whether the specified collision should be simulated. The filter is unaffected.- Parameters:
body1- the first colliding body (not null, unaffected)shape1- the first colliding shape (not null, unaffected)subShapeId1- the sub-shape ID leading frombody1.getShape()toshape1(not null, unaffected)body2- the 2nd colliding body (not null, unaffected)shape2- the 2nd colliding shape (not null, unaffected)subShapeId2- the sub-shape ID leading frombody2.getShape()toshape2(not null, unaffected)- Returns:
trueif simulated,falseif filtered out
-