Package com.github.stephengold.joltjni
Class SubShapeIdCreator
java.lang.Object
com.github.stephengold.joltjni.JoltPhysicsObject
com.github.stephengold.joltjni.SubShapeIdCreator
- All Implemented Interfaces:
ConstJoltPhysicsObject
,AutoCloseable
,Comparable<JoltPhysicsObject>
Generate sub-shape IDs by traversing the shape hierarchy. (native type:
SubShapeIDCreator)
-
Constructor Summary
Constructors -
Method Summary
Methods inherited from class com.github.stephengold.joltjni.JoltPhysicsObject
close, compareTo, equals, getContainingObject, hasAssignedNativeObject, hashCode, isCleanerStarted, ownsNativeObject, setVirtualAddress, setVirtualAddress, startCleaner, targetVa, toString, va
-
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
Push a new ID to the chain.- Parameters:
value
- the value to pushbits
- the number of bits- Returns:
- the modified chain
-