Class GroupFilterTable

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

public class GroupFilterTable extends GroupFilter implements RefTarget
A group filter implemented using a table.
  • Constructor Details

    • GroupFilterTable

      public GroupFilterTable()
      Create a default filter with no subgroups.
    • GroupFilterTable

      public GroupFilterTable(int numSubGroups)
      Create a default filter with the specified number of subgroups. Collisions will be enabled except when the sub-group IDs are equal.
      Parameters:
      numSubGroups - the initial number of subgroups (≥0)
  • Method Details

    • disableCollision

      public void disableCollision(int subGroup1, int subGroup2)
      Disable collisions between the specified subgroups.
      Parameters:
      subGroup1 - the ID of the first subgroup
      subGroup2 - the ID of the 2nd subgroup
    • enableCollision

      public void enableCollision(int subGroup1, int subGroup2)
      Enable collisions between the specified subgroups.
      Parameters:
      subGroup1 - the ID of the first subgroup
      subGroup2 - the ID of the 2nd subgroup
    • getRefCount

      public int getRefCount()
      Count the active references to the native GroupFilterTable. The filter is unaffected.
      Specified by:
      getRefCount in interface RefTarget
      Returns:
      the count (≥0)
    • setEmbedded

      public void setEmbedded()
      Mark the native GroupFilterTable as embedded.
      Specified by:
      setEmbedded in interface RefTarget
    • toRef

      public GroupFilterTableRef toRef()
      Create a counted reference to the native GroupFilterTable.
      Specified by:
      toRef in interface RefTarget
      Returns:
      a new JVM object with a new native object assigned