Class ObjVsBpFilter

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

public class ObjVsBpFilter extends ObjectVsBroadPhaseLayerFilter
An implementation of ObjectVsBroadPhaseLayerFilter that can be configured at runtime.
  • Constructor Details

    • ObjVsBpFilter

      public ObjVsBpFilter(int numObjectLayers, int numBpLayers)
      Instantiate a filter with all interactions enabled.
      Parameters:
      numObjectLayers - the number of object layers (≥1)
      numBpLayers - the number of broad-phase layers (≥1)
  • Method Details

    • disableBp

      public ObjVsBpFilter disableBp(int bpLayer)
      Disable interactions with the specified layer.
      Parameters:
      bpLayer - the index of the broad-phase layer (< numBpLayers)
      Returns:
      the modified filter (for chaining)
    • disableObj

      public ObjVsBpFilter disableObj(int objLayer)
      Disable interactions with the specified layer.
      Parameters:
      objLayer - the index of the object layer (< numObjectLayers)
      Returns:
      the modified filter (for chaining)
    • disablePair

      public ObjVsBpFilter disablePair(int objLayer, int bpLayer)
      Disable interactions between the specified layers.
      Parameters:
      objLayer - the index of the object layer (< numObjectLayers)
      bpLayer - the index of the broad-phase layer (< numBpLayers)
      Returns:
      the modified filter (for chaining)