Class ObjectVsBroadPhaseLayerFilter

All Implemented Interfaces:
ConstJoltPhysicsObject, ConstObjectVsBroadPhaseLayerFilter, AutoCloseable, Comparable<ConstJoltPhysicsObject>
Direct Known Subclasses:
ObjVsBpFilter

public abstract class ObjectVsBroadPhaseLayerFilter extends NonCopyable implements ConstObjectVsBroadPhaseLayerFilter
Filter collisions between objects and broad-phase layers.
  • Method Details

    • shouldCollide

      public boolean shouldCollide(int objLayer, int bpLayer)
      Test whether the specified layers should collide.
      Specified by:
      shouldCollide in interface ConstObjectVsBroadPhaseLayerFilter
      Parameters:
      objLayer - the index of a object layer (≥0, <numObjectLayers)
      bpLayer - the index of a broad-phase layer (≥0, <numBpLayers)
      Returns:
      true if they should collide, otherwise false