//
// Generated by Brutal.Jolt.Generate; do not edit by hand.
#nullable enable
using Brutal.Interop;
using Brutal.Numerics;
namespace Brutal.JoltApi
{
///
///
/// C++:
/// Jolt/Physics/Vehicle/VehicleEngine.h:43
///
/// class VehicleEngine : public VehicleEngineSettings
///
///
///
///
/// Runtime data for engine
///
///
[InteropHandle]
public readonly partial struct VehicleEngine : IDisposable
{
public static VehicleEngine Create() => Jolt.PInvoke.VehicleEngine_Create();
///
///
/// C++:
/// Jolt/Physics/Vehicle/VehicleEngine.h:50
///
/// inline void ClampRPM()
///
///
///
///
/// Clamp the RPM between min and max RPM
///
///
public void ClampRPM() => Jolt.PInvoke.VehicleEngine_ClampRPM(this);
///
///
/// C++:
/// Jolt/Physics/Vehicle/VehicleEngine.h:53
///
/// float GetCurrentRPM() const
///
///
///
///
/// Current rotation speed of engine in rounds per minute
///
///
public float GetCurrentRPM() => Jolt.PInvoke.VehicleEngine_GetCurrentRPM(this);
///
///
/// C++:
/// Jolt/Physics/Vehicle/VehicleEngine.h:56
///
/// void SetCurrentRPM(float inRPM)
///
///
///
///
/// Update rotation speed of engine in rounds per minute
///
///
public void SetCurrentRPM(float rPM) => Jolt.PInvoke.VehicleEngine_SetCurrentRPM(this, rPM);
///
///
/// C++:
/// Jolt/Physics/Vehicle/VehicleEngine.h:59
///
/// inline float GetAngularVelocity() const
///
///
///
///
/// Get current angular velocity of the engine in radians / second
///
///
public float GetAngularVelocity() => Jolt.PInvoke.VehicleEngine_GetAngularVelocity(this);
///
///
/// C++:
/// Jolt/Physics/Vehicle/VehicleEngine.h:63
///
/// float GetTorque(float inAcceleration) const
///
///
///
///
/// Get the amount of torque (N m) that the engine can supply
/// @param inAcceleration How much the gas pedal is pressed [0, 1]
///
///
public float GetTorque(float acceleration) => Jolt.PInvoke.VehicleEngine_GetTorque(this, acceleration);
///
///
/// C++:
/// Jolt/Physics/Vehicle/VehicleEngine.h:68
///
/// void ApplyTorque(float inTorque, float inDeltaTime)
///
///
///
///
/// Apply a torque to the engine rotation speed
/// @param inTorque Torque in N m
/// @param inDeltaTime Delta time in seconds
///
///
public void ApplyTorque(float torque, float deltaTime) => Jolt.PInvoke.VehicleEngine_ApplyTorque(this, torque, deltaTime);
///
///
/// C++:
/// Jolt/Physics/Vehicle/VehicleEngine.h:72
///
/// void ApplyDamping(float inDeltaTime)
///
///
///
///
/// Update the engine RPM for damping
/// @param inDeltaTime Delta time in seconds
///
///
public void ApplyDamping(float deltaTime) => Jolt.PInvoke.VehicleEngine_ApplyDamping(this, deltaTime);
///
///
/// C++:
/// Jolt/Physics/Vehicle/VehicleEngine.h:76
///
/// float ConvertRPMToAngle(float inRPM) const
///
///
///
///
/// Function that converts RPM to an angle in radians for debugging purposes
///
///
public float ConvertRPMToAngle(float rPM) => Jolt.PInvoke.VehicleEngine_ConvertRPMToAngle(this, rPM);
///
///
/// C++:
/// Jolt/Physics/Vehicle/VehicleEngine.h:79
///
/// void DrawRPM(DebugRenderer *inRenderer, RVec3Arg inPosition, Vec3Arg inForward, Vec3Arg inUp, float inSize, float inShiftDownRPM, float inShiftUpRPM) const
///
///
///
///
/// Debug draw a RPM meter
///
///
public void DrawRPM(DebugRenderer renderer, float3 position, float3 forward, float3 up, float size, float shiftDownRPM, float shiftUpRPM) => Jolt.PInvoke.VehicleEngine_DrawRPM(this, renderer, position, forward, up, size, shiftDownRPM, shiftUpRPM);
///
///
/// C++:
/// Jolt/Physics/Vehicle/VehicleEngine.h:83
///
/// bool AllowSleep() const
///
///
///
///
/// If the engine is idle we allow the vehicle to sleep
///
///
public bool AllowSleep() => Jolt.PInvoke.VehicleEngine_AllowSleep(this);
public static implicit operator VehicleEngineSettings(VehicleEngine value) => Jolt.PInvoke.VehicleEngine_AsVehicleEngineSettings(value);
public void Dispose() => Jolt.PInvoke.VehicleEngine_Destroy(this);
}
}