Interface ConstContactKey
- All Superinterfaces:
AutoCloseable,Comparable<JoltPhysicsObject>,ConstJoltPhysicsObject
- All Known Subinterfaces:
ConstContact
- All Known Implementing Classes:
Contact,ContactKey
Read-only access to a
ContactKey. (native type: const
CharacterVirtual::ContactKey)-
Method Summary
Modifier and TypeMethodDescriptionintgetBodyB()Return the ID of the colliding body.intReturn the ID of the colliding character.intReturn the sub-shape ID of the colliding body.booleanisEqual(ConstContactKey other) Test for equivalence with another key.booleanisNotEqual(ConstContactKey other) Test for equivalence with another key.voidsaveState(StateRecorder recorder) Save the key to the specified recorder.Methods inherited from interface java.lang.Comparable
compareToMethods inherited from interface com.github.stephengold.joltjni.readonly.ConstJoltPhysicsObject
close, hasAssignedNativeObject, ownsNativeObject, targetVa
-
Method Details
-
getBodyB
int getBodyB()Return the ID of the colliding body. The key is unaffected.- Returns:
- the
BodyIDvalue
-
getCharacterIdB
int getCharacterIdB()Return the ID of the colliding character. The key is unaffected.- Returns:
- the
CharacterIDvalue
-
getSubShapeIdB
int getSubShapeIdB()Return the sub-shape ID of the colliding body. The key is unaffected.- Returns:
- a
SubShapeIDvalue (typically negative)
-
isEqual
Test for equivalence with another key. Both keys are unaffected.- Parameters:
other- the key to compare with (notnull)- Returns:
trueif equivalent, otherwisefalse
-
isNotEqual
Test for equivalence with another key. Both keys are unaffected.- Parameters:
other- the key to compare with (notnull)- Returns:
falseif equivalent, otherwisetrue
-
saveState
Save the key to the specified recorder. The key is unaffected.- Parameters:
recorder- the recorder to save to (notnull)
-