Package com.github.stephengold.joltjni
Class CollidePointResult
java.lang.Object
com.github.stephengold.joltjni.JoltPhysicsObject
com.github.stephengold.joltjni.CollidePointResult
- All Implemented Interfaces:
ConstJoltPhysicsObject
,AutoCloseable
,Comparable<JoltPhysicsObject>
Information about a narrow-phase collision by a point.
-
Constructor Summary
ConstructorsConstructorDescriptionCollidePointResult
(long pointResultVa) Instantiate a point result with the specified native object assigned but not owned. -
Method Summary
Modifier and TypeMethodDescriptionint
Identify the body that was hit.int
Identify the sub-shape on the shape that was hit.Methods inherited from class com.github.stephengold.joltjni.JoltPhysicsObject
close, compareTo, equals, getContainingObject, hasAssignedNativeObject, hashCode, ownsNativeObject, setVirtualAddress, setVirtualAddress, startCleaner, targetVa, toString, va
-
Constructor Details
-
CollidePointResult
public CollidePointResult(long pointResultVa) Instantiate a point result with the specified native object assigned but not owned.For use in custom collectors.
- Parameters:
pointResultVa
- the virtual address of the native object to assign (not zero)
-
-
Method Details
-
getBodyId
public int getBodyId()Identify the body that was hit. The result object is unaffected. (native attribute: mBodyID)- Returns:
- the
BodyID
value
-
getSubShapeId2
public int getSubShapeId2()Identify the sub-shape on the shape that was hit. The result object is unaffected. (native attribute: mSubShapeID2)- Returns:
- a
SubShapeID
value
-