Class RayCastResult

All Implemented Interfaces:
ConstJoltPhysicsObject, AutoCloseable, Comparable<ConstJoltPhysicsObject>

public class RayCastResult extends BroadPhaseCastResult
Information about a broad-phase ray-cast hit.
  • Constructor Details

    • RayCastResult

      public RayCastResult()
      Instantiate a cast result with the default parameters.
    • RayCastResult

      public RayCastResult(RayCastBodyCollector collector, long castResultVa)
      Instantiate a cast result with the specified native object assigned but not owned.

      For use in custom collectors.

      Parameters:
      collector - the underlying RayCastBodyCollector, or null if none
      castResultVa - the virtual address of the native object to assign (not zero)
  • Method Details

    • getSubShapeId2

      public SubShapeId 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