java.lang.Object
com.github.stephengold.joltjni.JoltPhysicsObject
com.github.stephengold.joltjni.SerializableObject
com.github.stephengold.joltjni.GroupFilter
com.github.stephengold.joltjni.GroupFilterTable
- All Implemented Interfaces:
ConstGroupFilter,ConstJoltPhysicsObject,ConstSerializableObject,RefTarget,AutoCloseable,Comparable<JoltPhysicsObject>
A group filter implemented using a table.
-
Constructor Summary
ConstructorsConstructorDescriptionCreate a default filter with no subgroups.GroupFilterTable(int numSubGroups) Create a default filter with the specified number of subgroups.GroupFilterTable(GroupFilterTable original) Instantiate a copy of the specified filter. -
Method Summary
Modifier and TypeMethodDescriptionvoiddisableCollision(int subGroup1, int subGroup2) Disable collisions between the specified subgroups.voidenableCollision(int subGroup1, int subGroup2) Enable collisions between the specified subgroups.toRef()Create a counted reference to the nativeGroupFilterTable.Methods inherited from class com.github.stephengold.joltjni.GroupFilter
canCollide, getRefCount, saveBinaryState, setEmbedded, setVirtualAddressAsCoOwner, sRestoreFromBinaryStateMethods inherited from class com.github.stephengold.joltjni.SerializableObject
getRttiMethods inherited from class com.github.stephengold.joltjni.JoltPhysicsObject
close, compareTo, equals, getContainingObject, hasAssignedNativeObject, hashCode, isCleanerStarted, ownsNativeObject, setVirtualAddress, setVirtualAddress, startCleaner, targetVa, 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, targetVaMethods inherited from interface com.github.stephengold.joltjni.readonly.ConstSerializableObject
getRtti
-
Constructor Details
-
GroupFilterTable
public GroupFilterTable()Create a default filter with no subgroups. -
GroupFilterTable
Instantiate a copy of the specified filter.- Parameters:
original- the settings to copy (notnull, unaffected)
-
GroupFilterTable
public GroupFilterTable(int numSubGroups) Create a default filter with the specified number of subgroups. Collisions will be enabled except when the subgroup IDs are equal.- Parameters:
numSubGroups- the initial number of subgroups (≥0)
-
-
Method Details
-
disableCollision
public void disableCollision(int subGroup1, int subGroup2) Disable collisions between the specified subgroups.- Parameters:
subGroup1- the ID of the first subgroupsubGroup2- the ID of the 2nd subgroup- Throws:
IllegalArgumentException- ifsubGroup1 == subGroup2
-
enableCollision
public void enableCollision(int subGroup1, int subGroup2) Enable collisions between the specified subgroups.- Parameters:
subGroup1- the ID of the first subgroupsubGroup2- the ID of the 2nd subgroup- Throws:
IllegalArgumentException- ifsubGroup1 == subGroup2
-
toRef
Create a counted reference to the nativeGroupFilterTable.- Specified by:
toRefin interfaceRefTarget- Overrides:
toRefin classGroupFilter- Returns:
- a new JVM object with a new native object assigned
-