Class ObjectLayerPairFilterTable

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

public class ObjectLayerPairFilterTable extends ObjectLayerPairFilter
Filter collisions between object layers using a table.
  • Constructor Details

    • ObjectLayerPairFilterTable

      public ObjectLayerPairFilterTable(int numObjectLayers)
      Instantiate a filter with the specified capacity and all collisions disabled.
      Parameters:
      numObjectLayers - the number of object layers (≥1)
  • Method Details

    • disableCollision

      public ObjectLayerPairFilterTable disableCollision(int layer1, int layer2)
      Disable collisions between the specified object layers.
      Parameters:
      layer1 - the index of the first object layer (≥0, <numObjectLayers)
      layer2 - the index of the 2nd object layer (≥0, <numObjectLayers)
      Returns:
      the modified filter, for chaining
    • enableCollision

      public ObjectLayerPairFilterTable enableCollision(int layer1, int layer2)
      Enable collisions between the specified object layers.
      Parameters:
      layer1 - the index of the first object layer (≥0, <numObjectLayers)
      layer2 - the index of the 2nd object layer (≥0, <numObjectLayers)
      Returns:
      the modified filter, for chaining