Package com.github.stephengold.joltjni
Class RayCastResult
java.lang.Object
com.github.stephengold.joltjni.JoltPhysicsObject
com.github.stephengold.joltjni.BroadPhaseCastResult
com.github.stephengold.joltjni.RayCastResult
- All Implemented Interfaces:
ConstJoltPhysicsObject,AutoCloseable,Comparable<ConstJoltPhysicsObject>
Information about a broad-phase ray-cast hit.
-
Constructor Summary
ConstructorsConstructorDescriptionInstantiate a cast result with the default parameters.RayCastResult(RayCastBodyCollector collector, long castResultVa) Instantiate a cast result with the specified native object assigned but not owned. -
Method Summary
Modifier and TypeMethodDescriptionReturn the ID of the subshape that was hit.Methods inherited from class com.github.stephengold.joltjni.BroadPhaseCastResult
getBodyId, getCollector, getFractionMethods inherited from class com.github.stephengold.joltjni.JoltPhysicsObject
close, compareTo, equals, hasAssignedNativeObject, hashCode, ownsNativeObject, setVirtualAddress, startCleaner, 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:
collector- the underlyingRayCastBodyCollector, ornull if nonecastResultVa- the virtual address of the native object to assign (not zero)
-
-
Method Details
-
getSubShapeId2
Return the ID of the subshape that was hit. The result object is unaffected. (native attribute: mSubShapeID2)- Returns:
- a new JVM object with the pre-existing native object assigned
-