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, getNumBroadPhaseLayers
Methods inherited from class com.github.stephengold.joltjni.JoltPhysicsObject
close, compareTo, equals, getContainingObject, hasAssignedNativeObject, hashCode, ownsNativeObject, setVirtualAddress, setVirtualAddress, startCleaner, targetVa, toString, va
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
Methods inherited from interface java.lang.Comparable
compareTo
Methods 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
-