Package com.github.stephengold.joltjni
Class BroadPhaseLayerInterfaceTable
java.lang.Object
com.github.stephengold.joltjni.JoltPhysicsObject
com.github.stephengold.joltjni.NonCopyable
com.github.stephengold.joltjni.BroadPhaseLayerInterface
com.github.stephengold.joltjni.BroadPhaseLayerInterfaceTable
- All Implemented Interfaces:
ConstBroadPhaseLayerInterface,ConstJoltPhysicsObject,AutoCloseable,Comparable<JoltPhysicsObject>
Map object layers to broad-phase layers using a lookup table.
-
Constructor Summary
ConstructorsConstructorDescriptionBroadPhaseLayerInterfaceTable(int numObjLayers, int numBpLayers) Instantiate a default map with the specified capacity. -
Method Summary
Modifier and TypeMethodDescriptionmapObjectToBroadPhaseLayer(int objLayer, int bpLayer) Add a mapping from the specified object layer to the specified broad-phase layer.Methods inherited from class com.github.stephengold.joltjni.BroadPhaseLayerInterface
getBroadPhaseLayer, getNumBroadPhaseLayersMethods 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, targetVa
-
Constructor Details
-
BroadPhaseLayerInterfaceTable
public BroadPhaseLayerInterfaceTable(int numObjLayers, int numBpLayers) Instantiate a default map with the specified capacity. It maps every object layer to broad-phase layer zero.- Parameters:
numObjLayers- the desired capacity (number of object layers) (≥1)numBpLayers- the number of broad-phase layers (≥1)
-
-
Method Details
-
mapObjectToBroadPhaseLayer
Add a mapping from the specified object layer to the specified broad-phase layer.- Parameters:
objLayer- the index of the object layer (≥0, < numObjectLayers)bpLayer- the index of the broad-phase layer (< numBpLayers)- Returns:
- the modified map, for chaining
-