java.lang.Object
com.github.stephengold.joltjni.JoltPhysicsObject
com.github.stephengold.joltjni.BroadPhaseCastResult
com.github.stephengold.joltjni.RayCastResult
- All Implemented Interfaces:
ConstJoltPhysicsObject
,AutoCloseable
,Comparable<JoltPhysicsObject>
Information about a broad-phase ray-cast hit.
-
Constructor Summary
ConstructorsConstructorDescriptionInstantiate a cast result with the default parameters.RayCastResult
(JoltPhysicsObject underlying, long castResultVa) Instantiate a cast result with the specified native object assigned but not owned. -
Method Summary
Modifier and TypeMethodDescriptionint
Return the ID of the sub-shape that was hit.Methods inherited from class com.github.stephengold.joltjni.BroadPhaseCastResult
getBodyId, getCollector, getFraction
Methods inherited from class com.github.stephengold.joltjni.JoltPhysicsObject
close, compareTo, equals, getContainingObject, hasAssignedNativeObject, hashCode, ownsNativeObject, setVirtualAddress, setVirtualAddress, startCleaner, targetVa, toString, va
-
Constructor Details
-
RayCastResult
public RayCastResult()Instantiate a cast result with the default parameters. -
RayCastResult
Instantiate a cast result with the specified native object assigned but not owned.For use in custom collectors.
- Parameters:
underlying
- the containing object, ornull
if nonecastResultVa
- the virtual address of the native object to assign (not zero)
-
-
Method Details
-
getSubShapeId2
public int getSubShapeId2()Return the ID of the sub-shape that was hit. The result object is unaffected. (native attribute: mSubShapeID2)- Returns:
- a
SubShapeID
value
-