Class SubShapeIdCreator

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

public class SubShapeIdCreator extends JoltPhysicsObject
Generate sub-shape IDs by traversing the shape hierarchy. (native type: SubShapeIDCreator)
  • Constructor Details

    • SubShapeIdCreator

      public SubShapeIdCreator()
      Instantiate a default creator.
  • Method Details

    • getId

      public int getId()
      Return the resulting subshape ID. (native method: GetID)
      Returns:
      the ID value
    • getNumBitsWritten

      public int getNumBitsWritten()
      Return the number of bits written to the subshape ID so far.
      Returns:
      the bit count
    • pushId

      public SubShapeIdCreator pushId(int value, int bits)
      Push a new ID to the chain.
      Parameters:
      value - the value to push
      bits - the number of bits
      Returns:
      the modified chain