Package com.github.stephengold.joltjni
Class SubShapeIdPair
java.lang.Object
com.github.stephengold.joltjni.JoltPhysicsObject
com.github.stephengold.joltjni.SubShapeIdPair
- All Implemented Interfaces:
ConstJoltPhysicsObject,ConstSubShapeIdPair,AutoCloseable,Comparable<ConstJoltPhysicsObject>
Identify a pair of colliding subshapes. (native type: SubShapeIDPair)
-
Constructor Summary
ConstructorsConstructorDescriptionSubShapeIdPair(long pairVa) Instantiate a pair with the specified native object assigned but not owned. -
Method Summary
Modifier and TypeMethodDescriptionReturn the ID of the first body.Return the ID of the 2nd body.longgetHash()Return the hashcode for the pair.Return the ID of the first subshape.Return the ID of the 2nd subshape.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
-
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
Return the ID of the first body.- Specified by:
getBody1Idin interfaceConstSubShapeIdPair- Returns:
- a new object
-
getBody2Id
Return the ID of the 2nd body.- Specified by:
getBody2Idin interfaceConstSubShapeIdPair- Returns:
- a new object
-
getHash
public long getHash()Return the hashcode for the pair.- Specified by:
getHashin interfaceConstSubShapeIdPair- Returns:
- the value
-
getSubShapeId1
Return the ID of the first subshape.- Specified by:
getSubShapeId1in interfaceConstSubShapeIdPair- Returns:
- a new object
-
getSubShapeId2
Return the ID of the 2nd subshape.- Specified by:
getSubShapeId2in interfaceConstSubShapeIdPair- Returns:
- a new object
-