Class BroadPhaseLayerInterfaceMask

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

public class BroadPhaseLayerInterfaceMask extends BroadPhaseLayerInterface
Map object layers to broad-phase layers using bitmasks.
  • Constructor Details

    • BroadPhaseLayerInterfaceMask

      public BroadPhaseLayerInterfaceMask(int numBpLayers)
      Instantiate a default map with the specified capacity.
      Parameters:
      numBpLayers - the desired number of broad-phase layers (≥1)
  • Method Details

    • configureLayer

      public BroadPhaseLayerInterfaceMask configureLayer(int bpLayer, int groupsToInclude, int groupsToExclude)
      Configure the specified broad-phase layer.
      Parameters:
      bpLayer - the index of the broad-phase layer to configure (≥0, < numBpLayers)
      groupsToInclude - a bitmask of groups to include
      groupsToExclude - a bitmask of groups to exclude
      Returns:
      the modified map, for chaining
    • setBroadPhaseLayerName

      public BroadPhaseLayerInterfaceMask setBroadPhaseLayerName(int bpLayer, String name)
      If profiling is enabled, alter the name of the specified layer. Otherwise this has no effect.
      Parameters:
      bpLayer - the index of the broad-phase layer to modify (≥0, < numBpLayers)
      name - the desired name (not null)
      Returns:
      the modified map, for chaining