Package com.github.stephengold.joltjni
Class MapObj2Bp
java.lang.Object
com.github.stephengold.joltjni.JoltPhysicsObject
com.github.stephengold.joltjni.NonCopyable
com.github.stephengold.joltjni.BroadPhaseLayerInterface
com.github.stephengold.joltjni.MapObj2Bp
- All Implemented Interfaces:
ConstBroadPhaseLayerInterface,ConstJoltPhysicsObject,AutoCloseable,Comparable<ConstJoltPhysicsObject>
An implementation of
BroadPhaseLayerInterface that can be configured
at runtime.-
Constructor Summary
ConstructorsConstructorDescriptionMapObj2Bp(int numObjLayers, int numBpLayers) Instantiate an empty map with the specified capacity. -
Method Summary
Methods inherited from class com.github.stephengold.joltjni.BroadPhaseLayerInterface
getBroadPhaseLayer, getNumBroadPhaseLayersMethods inherited from class com.github.stephengold.joltjni.JoltPhysicsObject
close, compareTo, equals, hasAssignedNativeObject, hashCode, ownsNativeObject, setVirtualAddress, startCleaner, 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, va
-
Constructor Details
-
MapObj2Bp
public MapObj2Bp(int numObjLayers, int numBpLayers) Instantiate an empty map with the specified capacity.- Parameters:
numObjLayers- the desired capacity (number of object layers) (≥1)numBpLayers- the number of broad-phase layers (≥1)
-
-
Method Details
-
add
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)
-