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<ConstJoltPhysicsObject>
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 TypeMethodDescriptionIdentify the body that was hit.Identify the subshape on the shape that was hit.Methods inherited from class com.github.stephengold.joltjni.JoltPhysicsObject
close, compareTo, equals, hasAssignedNativeObject, hashCode, ownsNativeObject, setVirtualAddress, startCleaner, 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
Identify the body that was hit. The result object is unaffected. (native attribute: mBodyID)- Returns:
- a new JVM object with a new native object assigned
-
getSubShapeId2
Identify the subshape on the shape that was hit. The result object is unaffected. (native attribute: mSubShapeID2)- Returns:
- a new JVM object with a new native object assigned
-