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 TypeMethodDescriptionintReturn the ID of the first body.intReturn the ID of the 2nd body.longgetHash()Return the hashcode for the pair.intReturn the ID of the first sub-shape.intReturn the ID of the 2nd sub-shape.Methods inherited from class com.github.stephengold.joltjni.JoltPhysicsObject
close, compareTo, equals, getContainingObject, hasAssignedNativeObject, hashCode, isCleanerStarted, ownsNativeObject, setVirtualAddress, setVirtualAddress, startCleaner, targetVa, 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, 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 function: GetBody1ID)- Specified by:
getBody1Idin interfaceConstSubShapeIdPair- Returns:
- the
BodyIDvalue
-
getBody2Id
public int getBody2Id()Return the ID of the 2nd body. The pair is unaffected. (native function: GetBody2ID)- Specified by:
getBody2Idin interfaceConstSubShapeIdPair- Returns:
- the
BodyIDvalue
-
getHash
public long getHash()Return the hashcode for the pair. The pair is unaffected.- Specified by:
getHashin interfaceConstSubShapeIdPair- Returns:
- the value
-
getSubShapeId1
public int getSubShapeId1()Return the ID of the first sub-shape. The pair is unaffected. (native function: GetSubShapeID1)- Specified by:
getSubShapeId1in interfaceConstSubShapeIdPair- Returns:
- a
SubShapeIDvalue (typically negative)
-
getSubShapeId2
public int getSubShapeId2()Return the ID of the 2nd sub-shape. The pair is unaffected. (native function: GetSubShapeID2)- Specified by:
getSubShapeId2in interfaceConstSubShapeIdPair- Returns:
- a
SubShapeIDvalue (typically negative)
-