15#ifdef JPH_DEBUG_RENDERER
68 void ApplyTorque(
float inTorque,
float inDeltaTime);
72 void ApplyDamping(
float inDeltaTime);
74#ifdef JPH_DEBUG_RENDERER
90 float mCurrentRPM = mMinRPM;
#define JPH_EXPORT
Definition Core.h:275
#define JPH_NAMESPACE_END
Definition Core.h:425
#define JPH_NAMESPACE_BEGIN
Definition Core.h:419
JPH_INLINE constexpr T Clamp(T inV, T inMin, T inMax)
Clamp a value between two values.
Definition Math.h:48
const Vec3 Vec3Arg
Definition MathTypes.h:19
Vec3Arg RVec3Arg
Definition Real.h:30
#define JPH_DECLARE_SERIALIZABLE_NON_VIRTUAL(linkage, class_name)
Definition SerializableObject.h:80
Definition DebugRenderer.h:47
Definition LinearCurve.h:17
Definition StateRecorder.h:110
Simple binary input stream.
Definition StreamIn.h:13
Simple binary output stream.
Definition StreamOut.h:13
Runtime data for engine.
Definition VehicleEngine.h:44
static constexpr float cAngularVelocityToRPM
Multiply an angular velocity (rad/s) with this value to get rounds per minute (RPM).
Definition VehicleEngine.h:47
void ClampRPM()
Clamp the RPM between min and max RPM.
Definition VehicleEngine.h:50
float GetTorque(float inAcceleration) const
Definition VehicleEngine.h:63
float ConvertRPMToAngle(float inRPM) const
Definition VehicleEngine.h:76
bool AllowSleep() const
If the engine is idle we allow the vehicle to sleep.
Definition VehicleEngine.h:83
void SetCurrentRPM(float inRPM)
Update rotation speed of engine in rounds per minute.
Definition VehicleEngine.h:56
float GetCurrentRPM() const
Current rotation speed of engine in rounds per minute.
Definition VehicleEngine.h:53
float GetAngularVelocity() const
Get current angular velocity of the engine in radians / second.
Definition VehicleEngine.h:59
void RestoreBinaryState(StreamIn &inStream)
Restores the contents in binary form to inStream.
Definition VehicleEngine.cpp:39
float mMinRPM
Min amount of revolutions per minute (rpm) the engine can produce without stalling.
Definition VehicleEngine.h:35
LinearCurve mNormalizedTorque
Y-axis: Curve that describes a ratio of the max torque the engine can produce (0 = 0,...
Definition VehicleEngine.h:37
float mMaxTorque
Max amount of torque (Nm) that the engine can deliver.
Definition VehicleEngine.h:34
float mMaxRPM
Max amount of revolutions per minute (rpm) the engine can generate.
Definition VehicleEngine.h:36
float mAngularDamping
Angular damping factor of the wheel: dw/dt = -c * w. Value should be zero or positive and is usually ...
Definition VehicleEngine.h:39
void SaveBinaryState(StreamOut &inStream) const
Saves the contents in binary form to inStream.
Definition VehicleEngine.cpp:31
VehicleEngineSettings()
Constructor.
Definition VehicleEngine.cpp:23
float mInertia
Moment of inertia (kg m^2) of the engine.
Definition VehicleEngine.h:38