java.lang.Object
com.github.stephengold.joltjni.JoltPhysicsObject
com.github.stephengold.joltjni.SubShapeIdPair
- All Implemented Interfaces:
ConstJoltPhysicsObject
,ConstSubShapeIdPair
,AutoCloseable
,Comparable<JoltPhysicsObject>
Identify a pair of colliding sub-shapes. (native type: SubShapeIDPair)
-
Constructor Summary
ConstructorsConstructorDescriptionSubShapeIdPair
(long pairVa) Instantiate a pair with the specified native object assigned but not owned. -
Method Summary
Modifier and TypeMethodDescriptionint
Return the ID of the first body.int
Return the ID of the 2nd body.long
getHash()
Return the hashcode for the pair.int
Return the ID of the first sub-shape.int
Return the ID of the 2nd sub-shape.Methods inherited from class com.github.stephengold.joltjni.JoltPhysicsObject
close, compareTo, equals, getContainingObject, hasAssignedNativeObject, hashCode, ownsNativeObject, setVirtualAddress, setVirtualAddress, startCleaner, targetVa, toString, va
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
Methods inherited from interface java.lang.Comparable
compareTo
Methods inherited from interface com.github.stephengold.joltjni.readonly.ConstJoltPhysicsObject
close, hasAssignedNativeObject, ownsNativeObject, targetVa
-
Constructor Details
-
SubShapeIdPair
public SubShapeIdPair(long pairVa) Instantiate a pair with the specified native object assigned but not owned.- Parameters:
pairVa
- the virtual address of the native object to assign (not zero)
-
-
Method Details
-
getBody1Id
public int getBody1Id()Return the ID of the first body. The pair is unaffected. (native method: GetBody1ID)- Specified by:
getBody1Id
in interfaceConstSubShapeIdPair
- Returns:
- the
BodyID
value
-
getBody2Id
public int getBody2Id()Return the ID of the 2nd body. The pair is unaffected. (native method: GetBody2ID)- Specified by:
getBody2Id
in interfaceConstSubShapeIdPair
- Returns:
- the
BodyID
value
-
getHash
public long getHash()Return the hashcode for the pair. The pair is unaffected.- Specified by:
getHash
in interfaceConstSubShapeIdPair
- Returns:
- the value
-
getSubShapeId1
public int getSubShapeId1()Return the ID of the first sub-shape. The pair is unaffected. (native method: GetSubShapeID1)- Specified by:
getSubShapeId1
in interfaceConstSubShapeIdPair
- Returns:
- a
SubShapeID
value
-
getSubShapeId2
public int getSubShapeId2()Return the ID of the 2nd sub-shape. The pair is unaffected. (native method: GetSubShapeID2)- Specified by:
getSubShapeId2
in interfaceConstSubShapeIdPair
- Returns:
- a
SubShapeID
value
-