Class MapObj2Bp

All Implemented Interfaces:
ConstBroadPhaseLayerInterface, ConstJoltPhysicsObject, AutoCloseable, Comparable<ConstJoltPhysicsObject>

public class MapObj2Bp extends BroadPhaseLayerInterface
An implementation of BroadPhaseLayerInterface that can be configured at runtime.
  • 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

      public MapObj2Bp add(int objLayer, int bpLayer)
      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)