Package com.github.stephengold.joltjni
Class CustomTireMaxImpulseCallback
java.lang.Object
com.github.stephengold.joltjni.JoltPhysicsObject
com.github.stephengold.joltjni.TireMaxImpulseCallback
com.github.stephengold.joltjni.CustomTireMaxImpulseCallback
- All Implemented Interfaces:
ConstJoltPhysicsObject,AutoCloseable,Comparable<JoltPhysicsObject>
A customizable
TireMaxImpulseCallback.-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionfloatmaxLateralImpulse(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.floatmaxLongitudinalImpulse(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.Methods inherited from class com.github.stephengold.joltjni.JoltPhysicsObject
close, compareTo, equals, getContainingObject, hasAssignedNativeObject, hashCode, isCleanerStarted, ownsNativeObject, setVirtualAddress, setVirtualAddress, startCleaner, targetVa, toString, va
-
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 impulselongitudinalFriction- the longitudinal friction coefficientlateralFriction- the lateral friction coefficientlongitudinalSlip- the longitudinal slip componentlateralSlip- the lateral slip componentdeltaTime- 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 impulselongitudinalFriction- the longitudinal friction coefficientlateralFriction- the lateral friction coefficientlongitudinalSlip- the longitudinal slip componentlateralSlip- the lateral slip componentdeltaTime- the duration of the simulation step (in seconds)- Returns:
- the longitudinal component of the maximum impulse
-