Interface ConstBodyId

All Superinterfaces:
Comparable<ConstJoltPhysicsObject>, ConstJoltPhysicsObject
All Known Implementing Classes:
BodyId

public interface ConstBodyId extends ConstJoltPhysicsObject
Read-only access to a BodyId. (native type: const BodyID)
  • Method Details

    • copy

      BodyId copy()
      Create a mutable copy.
      Returns:
      a new mutable JVM object with a new native object assigned
    • getIndex

      int getIndex()
      Return the body's index in the array. The ID is unaffected.
      Returns:
      the index (≥0)
    • getIndexAndSequenceNumber

      int getIndexAndSequenceNumber()
      Convert the ID to an integer. The ID is unaffected.
      Returns:
      the integer value
    • getSequenceNumber

      int getSequenceNumber()
      Return the body's sequence number. The ID is unaffected.
      Returns:
      the sequence number (≥0)
    • isEqual

      boolean isEqual(ConstBodyId id2)
      Test whether the current ID is equal to the argument. The current ID is unaffected.
      Parameters:
      id2 - the 2nd ID to test (not null, unaffected)
      Returns:
      true if equal, false if unequal
    • isInvalid

      boolean isInvalid()
      Test whether the ID is valid. It is unaffected.
      Returns:
      true if invalid, false if valid