Class SubShapeIdPair

java.lang.Object
com.github.stephengold.joltjni.JoltPhysicsObject
com.github.stephengold.joltjni.SubShapeIdPair
All Implemented Interfaces:
ConstJoltPhysicsObject, ConstSubShapeIdPair, AutoCloseable, Comparable<JoltPhysicsObject>

public final class SubShapeIdPair extends JoltPhysicsObject implements ConstSubShapeIdPair
Identify a pair of colliding sub-shapes. (native type: SubShapeIDPair)
  • Constructor Details

    • SubShapeIdPair

      public SubShapeIdPair(long pairVa)
      Instantiate a pair with the specified native object assigned but not owned.
      Parameters:
      pairVa - the virtual address of the native object to assign (not zero)
  • Method Details

    • getBody1Id

      public int getBody1Id()
      Return the ID of the first body. The pair is unaffected. (native method: GetBody1ID)
      Specified by:
      getBody1Id in interface ConstSubShapeIdPair
      Returns:
      the BodyID value
    • getBody2Id

      public int getBody2Id()
      Return the ID of the 2nd body. The pair is unaffected. (native method: GetBody2ID)
      Specified by:
      getBody2Id in interface ConstSubShapeIdPair
      Returns:
      the BodyID value
    • getHash

      public long getHash()
      Return the hashcode for the pair. The pair is unaffected.
      Specified by:
      getHash in interface ConstSubShapeIdPair
      Returns:
      the value
    • getSubShapeId1

      public int getSubShapeId1()
      Return the ID of the first sub-shape. The pair is unaffected. (native method: GetSubShapeID1)
      Specified by:
      getSubShapeId1 in interface ConstSubShapeIdPair
      Returns:
      a SubShapeID value
    • getSubShapeId2

      public int getSubShapeId2()
      Return the ID of the 2nd sub-shape. The pair is unaffected. (native method: GetSubShapeID2)
      Specified by:
      getSubShapeId2 in interface ConstSubShapeIdPair
      Returns:
      a SubShapeID value