Class RayCastResult

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

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(JoltPhysicsObject underlying, long castResultVa)
      Instantiate a cast result with the specified native object assigned but not owned.

      For use in custom collectors.

      Parameters:
      underlying - the containing object, or null if none
      castResultVa - 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