Class VehicleCollisionTesterRay

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

public class VehicleCollisionTesterRay extends VehicleCollisionTester implements RefTarget
A VehicleCollisionTester that uses ray casts.
  • Constructor Details

    • VehicleCollisionTesterRay

      public VehicleCollisionTesterRay(int objectLayer)
      Instantiate a tester for the specified layer.
      Parameters:
      objectLayer - the index of the desired object layer for collisions
    • VehicleCollisionTesterRay

      public VehicleCollisionTesterRay(int objectLayer, Vec3Arg up)
      Instantiate a tester with the specified properties.
      Parameters:
      objectLayer - the index of the desired object layer for collisions
      up - the "up" direction (in system coordinates, not null, unaffected, default=(0,1,0))
    • VehicleCollisionTesterRay

      public VehicleCollisionTesterRay(int objectLayer, Vec3Arg up, float maxSlopeAngle)
      Instantiate a tester with the specified properties.
      Parameters:
      objectLayer - the index of the desired object layer for collisions
      up - the "up" direction (in system coordinates, not null, unaffected, default=(0,1,0))
      maxSlopeAngle - the maximum angle to consider for colliding wheels (in radians, default=4*Pi/9)
  • Method Details

    • getRefCount

      public int getRefCount()
      Count the active references to the native VehicleCollisionTester. The tester is unaffected.
      Specified by:
      getRefCount in interface RefTarget
      Returns:
      the count (≥0)
    • setEmbedded

      public void setEmbedded()
      Mark the native VehicleCollisionTesterRay as embedded.
      Specified by:
      setEmbedded in interface RefTarget
    • toRef

      Create a counted reference to the native VehicleCollisionTesterRay.
      Specified by:
      toRef in interface RefTarget
      Returns:
      a new JVM object with a new native object assigned