Package com.github.stephengold.joltjni
Class IgnoreMultipleBodiesFilter
java.lang.Object
com.github.stephengold.joltjni.JoltPhysicsObject
com.github.stephengold.joltjni.NonCopyable
com.github.stephengold.joltjni.BodyFilter
com.github.stephengold.joltjni.IgnoreMultipleBodiesFilter
- All Implemented Interfaces:
ConstJoltPhysicsObject,AutoCloseable,Comparable<JoltPhysicsObject>
A
BodyFilter that ignores specific bodies.-
Constructor Summary
ConstructorsConstructorDescriptionInstantiate a default filter that selects all bodies. -
Method Summary
Modifier and TypeMethodDescriptionvoidclear()Remove all bodies from the filter.voidignoreBody(int bodyId) Start ignoring the specified body.voidreserve(int capacity) Reserve memory for the specified number of bodies.Methods inherited from class com.github.stephengold.joltjni.BodyFilter
shouldCollideMethods inherited from class com.github.stephengold.joltjni.JoltPhysicsObject
close, compareTo, equals, getContainingObject, hasAssignedNativeObject, hashCode, isCleanerStarted, ownsNativeObject, setVirtualAddress, setVirtualAddress, startCleaner, targetVa, toString, va
-
Constructor Details
-
IgnoreMultipleBodiesFilter
public IgnoreMultipleBodiesFilter()Instantiate a default filter that selects all bodies.
-
-
Method Details
-
clear
public void clear()Remove all bodies from the filter. -
reserve
public void reserve(int capacity) Reserve memory for the specified number of bodies.- Parameters:
capacity- the desired capacity (in bodies, ≥0)
-
ignoreBody
public void ignoreBody(int bodyId) Start ignoring the specified body.- Parameters:
bodyId- the ID of the body to ignore
-