Class CustomTireMaxImpulseCallback

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

public class CustomTireMaxImpulseCallback extends TireMaxImpulseCallback
A customizable TireMaxImpulseCallback.
  • Constructor Details

    • CustomTireMaxImpulseCallback

      public CustomTireMaxImpulseCallback()
      Instantiate a customizable callback.
  • Method Details

    • maxLateralImpulse

      public float maxLateralImpulse(int wheelIndex, float suspensionImpulse, float longitudinalFriction, float lateralFriction, float longitudinalSlip, float lateralSlip, float deltaTime)
      Calculate maximum lateral tire impulse by combining friction, slip, and suspension impulses. The actual applied impulse may be lower. For instance, when the vehicle is stationary on a horizontal surface the applied impulse will be 0. Meant to be overridden.
      Parameters:
      wheelIndex - the index of the desired wheel (≥0)
      suspensionImpulse - the suspension impulse
      longitudinalFriction - the longitudinal friction coefficient
      lateralFriction - the lateral friction coefficient
      longitudinalSlip - the longitudinal slip component
      lateralSlip - the lateral slip component
      deltaTime - the duration of the simulation step (in seconds)
      Returns:
      the lateral component of the maximum impulse
    • maxLongitudinalImpulse

      public float maxLongitudinalImpulse(int wheelIndex, float suspensionImpulse, float longitudinalFriction, float lateralFriction, float longitudinalSlip, float lateralSlip, float deltaTime)
      Calculate maximum longitudinal tire impulse by combining friction, slip, and suspension impulses. The actual applied impulse may be lower. For instance, when the vehicle is stationary on a horizontal surface the applied impulse will be 0. Meant to be overridden.
      Parameters:
      wheelIndex - the index of the desired wheel (≥0)
      suspensionImpulse - the suspension impulse
      longitudinalFriction - the longitudinal friction coefficient
      lateralFriction - the lateral friction coefficient
      longitudinalSlip - the longitudinal slip component
      lateralSlip - the lateral slip component
      deltaTime - the duration of the simulation step (in seconds)
      Returns:
      the longitudinal component of the maximum impulse