Class SubShapeId

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

public class SubShapeId extends JoltPhysicsObject implements ConstSubShapeId
Identify an element (typically a triangle or other primitive type) in a compound shape. (native type: SubShapeID)
  • Constructor Details

    • SubShapeId

      public SubShapeId(long idVa)
      Instantiate an ID with the specified native object assigned but not owned.

      For use in custom contact listeners.

      Parameters:
      idVa - the virtual address of the native object to assign (not zero)
  • Method Details

    • contentEquals

      public boolean contentEquals(ConstSubShapeId otherId)
      Test for equality with the specified ID. The current ID is unaffected.
      Specified by:
      contentEquals in interface ConstSubShapeId
      Parameters:
      otherId - the ID to compare with (not null, unaffected)
      Returns:
      true if equivalent, otherwise false
    • getValue

      public int getValue()
      Return the bit pattern of the ID. The ID is unaffected.
      Specified by:
      getValue in interface ConstSubShapeId
      Returns:
      the raw bit pattern