Interface ConstVehicleConstraint

All Superinterfaces:
Comparable<JoltPhysicsObject>, ConstConstraint, ConstJoltPhysicsObject
All Known Implementing Classes:
VehicleConstraint, VehicleConstraintRef

public interface ConstVehicleConstraint extends ConstConstraint
Read-only access to VehicleConstraint. (native type: const VehicleConstraint)
  • Method Details

    • countAntiRollBars

      int countAntiRollBars()
      Count how many anti-roll bars the vehicle has. The constraint is unaffected.
      Returns:
      the count (≥0)
    • countWheels

      int countWheels()
      Count how many wheels the vehicle has. The constraint is unaffected.
      Returns:
      the count (≥0)
    • getAntiRollBar

      ConstVehicleAntiRollBar getAntiRollBar(int barIndex)
      Access the specified anti-roll bar.
      Parameters:
      barIndex - the index of the bar to access (≥0)
      Returns:
      a new JVM object with the pre-existing native object assigned
    • getGravityOverride

      Vec3 getGravityOverride()
      Copy the gravity override. The constraint is unaffected.
      Returns:
      a new vector
    • getLocalForward

      Vec3 getLocalForward()
      Copy the local "forward" direction. The constraint is unaffected.
      Returns:
      a new direction vector
    • getLocalUp

      Vec3 getLocalUp()
      Copy the local "up" direction. The constraint is unaffected.
      Returns:
      a new direction vector
    • getMaxPitchRollAngle

      float getMaxPitchRollAngle()
      Return the vehicle's maximum pitch/roll angle. The constraint is unaffected.
      Returns:
      the limit angle (in radians)
    • getNumStepsBetweenCollisionTestActive

      int getNumStepsBetweenCollisionTestActive()
      Return the number of simulation steps between wheel-collision tests when the vehicle is active. The constraint is unaffected.
      Returns:
      the number of steps
    • getNumStepsBetweenCollisionTestInactive

      int getNumStepsBetweenCollisionTestInactive()
      Return the number of simulation steps between collision tests when the body is inactive. The constraint is unaffected.
      Returns:
      the number of steps
    • getWheelLocalBasis

      void getWheelLocalBasis(Wheel wheel, Vec3 storeForward, Vec3 storeUp, Vec3 storeRight)
      Copy the basis vectors for the specified wheel.
      Parameters:
      wheel - which wheel to query (not null)
      storeForward - storage for the forward vector (not null, modified)
      storeUp - storage for the up vector (not null, modified)
      storeRight - storage for the right vector (not null, modified)
    • getWheelWorldTransform

      RMat44 getWheelWorldTransform(int wheelIndex, Vec3Arg right, Vec3Arg up)
      Copy the world transform of the specified wheel. The constraint is unaffected.
      Parameters:
      wheelIndex - the index of the wheel to query (≥0)
      right - the wheel's axis of rotation (a unit vector in the wheel's model space)
      up - the "up" direction (a unit vector in the wheel's model space)
      Returns:
      a new coordinate transform matrix
    • getWorldUp

      Vec3 getWorldUp()
      Copy the "up" direction based on gravity. The constraint is unaffected.
      Returns:
      a new direction vector (in system coordinates)
    • isGravityOverridden

      boolean isGravityOverridden()
      Test whether gravity is overridden. The constraint is unaffected.
      Returns:
      true if overridden, otherwise false