//
// Generated by Brutal.Jolt.Generate; do not edit by hand.
#nullable enable
using System.Runtime.CompilerServices;
using Brutal.Interop;
using Brutal.Numerics;
namespace Brutal.JoltApi
{
///
///
/// Generic properties for a vehicle engine
///
///
/// C++:
/// Jolt/Physics/Vehicle/VehicleEngine.h:20
///
/// class VehicleEngineSettings
///
///
[InteropHandle]
public readonly partial struct VehicleEngineSettings : IDisposable
{
///
///
/// Constructor
///
///
/// C++:
/// Jolt/Physics/Vehicle/VehicleEngine.h:26
///
/// VehicleEngineSettings()
///
///
public static VehicleEngineSettings Create() => Jolt.PInvoke.VehicleEngineSettings_Create();
///
///
/// Saves the contents in binary form to inStream.
///
///
/// C++:
/// Jolt/Physics/Vehicle/VehicleEngine.h:29
///
/// void SaveBinaryState(StreamOut &inStream) const
///
///
public void SaveBinaryState(StreamOut stream) =>
Jolt.PInvoke.VehicleEngineSettings_SaveBinaryState(this, stream);
///
///
/// Restores the contents in binary form to inStream.
///
///
/// C++:
/// Jolt/Physics/Vehicle/VehicleEngine.h:32
///
/// void RestoreBinaryState(StreamIn &inStream)
///
///
public void RestoreBinaryState(StreamIn stream) =>
Jolt.PInvoke.VehicleEngineSettings_RestoreBinaryState(this, stream);
///
///
/// Max amount of torque (Nm) that the engine can deliver
///
///
/// C++:
/// Jolt/Physics/Vehicle/VehicleEngine.h:34
///
/// float mMaxTorque = 500.0f
///
///
public float GetMaxTorque() => Jolt.PInvoke.VehicleEngineSettings_GetMaxTorque(this);
///
///
/// Max amount of torque (Nm) that the engine can deliver
///
///
/// C++:
/// Jolt/Physics/Vehicle/VehicleEngine.h:34
///
/// float mMaxTorque = 500.0f
///
///
public void SetMaxTorque(float value) => Jolt.PInvoke.VehicleEngineSettings_SetMaxTorque(this, value);
///
///
/// Min amount of revolutions per minute (rpm) the engine can produce without stalling
///
///
/// C++:
/// Jolt/Physics/Vehicle/VehicleEngine.h:35
///
/// float mMinRPM = 1000.0f
///
///
public float GetMinRPM() => Jolt.PInvoke.VehicleEngineSettings_GetMinRPM(this);
///
///
/// Min amount of revolutions per minute (rpm) the engine can produce without stalling
///
///
/// C++:
/// Jolt/Physics/Vehicle/VehicleEngine.h:35
///
/// float mMinRPM = 1000.0f
///
///
public void SetMinRPM(float value) => Jolt.PInvoke.VehicleEngineSettings_SetMinRPM(this, value);
///
///
/// Max amount of revolutions per minute (rpm) the engine can generate
///
///
/// C++:
/// Jolt/Physics/Vehicle/VehicleEngine.h:36
///
/// float mMaxRPM = 6000.0f
///
///
public float GetMaxRPM() => Jolt.PInvoke.VehicleEngineSettings_GetMaxRPM(this);
///
///
/// Max amount of revolutions per minute (rpm) the engine can generate
///
///
/// C++:
/// Jolt/Physics/Vehicle/VehicleEngine.h:36
///
/// float mMaxRPM = 6000.0f
///
///
public void SetMaxRPM(float value) => Jolt.PInvoke.VehicleEngineSettings_SetMaxRPM(this, value);
///
///
/// Y-axis: Curve that describes a ratio of the max torque the engine can produce (0 = 0, 1 = mMaxTorque).
/// X-axis: the fraction of the RPM of the engine (0 = mMinRPM, 1 = mMaxRPM)
///
///
/// C++:
/// Jolt/Physics/Vehicle/VehicleEngine.h:37
///
/// LinearCurve mNormalizedTorque
///
///
///
///
/// The returned handle is an owned copy; Dispose it when you're done with it.
///
///
public LinearCurve GetNormalizedTorque() => Jolt.PInvoke.VehicleEngineSettings_GetNormalizedTorque(this);
///
///
/// Y-axis: Curve that describes a ratio of the max torque the engine can produce (0 = 0, 1 = mMaxTorque).
/// X-axis: the fraction of the RPM of the engine (0 = mMinRPM, 1 = mMaxRPM)
///
///
/// C++:
/// Jolt/Physics/Vehicle/VehicleEngine.h:37
///
/// LinearCurve mNormalizedTorque
///
///
///
///
/// The value is copied into the field; the handle you pass stays yours to Dispose.
///
///
public void SetNormalizedTorque(LinearCurve value) =>
Jolt.PInvoke.VehicleEngineSettings_SetNormalizedTorque(this, value);
///
///
/// Moment of inertia (kg m^2) of the engine
///
///
/// C++:
/// Jolt/Physics/Vehicle/VehicleEngine.h:38
///
/// float mInertia = 0.5f
///
///
public float GetInertia() => Jolt.PInvoke.VehicleEngineSettings_GetInertia(this);
///
///
/// Moment of inertia (kg m^2) of the engine
///
///
/// C++:
/// Jolt/Physics/Vehicle/VehicleEngine.h:38
///
/// float mInertia = 0.5f
///
///
public void SetInertia(float value) => Jolt.PInvoke.VehicleEngineSettings_SetInertia(this, value);
///
///
/// Angular damping factor of the wheel: dw/dt = -c * w. Value should be zero or positive and is usually
/// close to 0.
///
///
/// C++:
/// Jolt/Physics/Vehicle/VehicleEngine.h:39
///
/// float mAngularDamping = 0.2f
///
///
public float GetAngularDamping() => Jolt.PInvoke.VehicleEngineSettings_GetAngularDamping(this);
///
///
/// Angular damping factor of the wheel: dw/dt = -c * w. Value should be zero or positive and is usually
/// close to 0.
///
///
/// C++:
/// Jolt/Physics/Vehicle/VehicleEngine.h:39
///
/// float mAngularDamping = 0.2f
///
///
public void SetAngularDamping(float value) => Jolt.PInvoke.VehicleEngineSettings_SetAngularDamping(this, value);
public void Dispose() => Jolt.PInvoke.VehicleEngineSettings_Destroy(this);
}
}