Package com.github.stephengold.joltjni
Class SubShapeId
java.lang.Object
com.github.stephengold.joltjni.JoltPhysicsObject
com.github.stephengold.joltjni.SubShapeId
- All Implemented Interfaces:
ConstJoltPhysicsObject,ConstSubShapeId,AutoCloseable,Comparable<ConstJoltPhysicsObject>
Identify an element (typically a triangle or other primitive type) in a
compound shape. (native type: SubShapeID)
-
Constructor Summary
ConstructorsConstructorDescriptionSubShapeId(long idVa) Instantiate an ID with the specified native object assigned but not owned. -
Method Summary
Modifier and TypeMethodDescriptionbooleancontentEquals(ConstSubShapeId otherId) Test for equality with the specified ID.intgetValue()Return the bit pattern of the ID.Methods inherited from class com.github.stephengold.joltjni.JoltPhysicsObject
close, compareTo, equals, hasAssignedNativeObject, hashCode, ownsNativeObject, setVirtualAddress, startCleaner, toString, vaMethods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, waitMethods inherited from interface java.lang.Comparable
compareToMethods inherited from interface com.github.stephengold.joltjni.readonly.ConstJoltPhysicsObject
close, hasAssignedNativeObject, ownsNativeObject, va
-
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
Test for equality with the specified ID. The current ID is unaffected.- Specified by:
contentEqualsin interfaceConstSubShapeId- 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:
getValuein interfaceConstSubShapeId- Returns:
- the raw bit pattern
-