// // 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/VehicleTransmission.h:45 ///
/// class VehicleTransmission : public VehicleTransmissionSettings ///
///
/// /// /// Runtime data for transmission /// /// [InteropHandle] public readonly partial struct VehicleTransmission : IDisposable { public static VehicleTransmission Create() => Jolt.PInvoke.VehicleTransmission_Create(); /// /// /// C++: /// Jolt/Physics/Vehicle/VehicleTransmission.h:51 ///
/// void Set(int inCurrentGear, float inClutchFriction) ///
///
/// /// /// Set input from driver regarding the transmission (only relevant when transmission is set to manual mode) /// @param inCurrentGear Current gear, -1 = reverse, 0 = neutral, 1 = 1st gear etc. /// @param inClutchFriction Value between 0 and 1 indicating how much friction the clutch gives (0 = no friction, 1 = full friction) /// /// public void Set(int currentGear, float clutchFriction) => Jolt.PInvoke.VehicleTransmission_Set(this, currentGear, clutchFriction); /// /// /// C++: /// Jolt/Physics/Vehicle/VehicleTransmission.h:58 ///
/// void Update(float inDeltaTime, float inCurrentRPM, float inForwardInput, bool inCanShiftUp) ///
///
/// /// /// Update the current gear and clutch friction if the transmission is in auto mode /// @param inDeltaTime Time step delta time in s /// @param inCurrentRPM Current RPM for engine /// @param inForwardInput Hint if the user wants to drive forward (> 0) or backwards (< 0) /// @param inCanShiftUp Indicates if we want to allow the transmission to shift up (e.g. pass false if wheels are slipping) /// /// public void Update(float deltaTime, float currentRPM, float forwardInput, bool canShiftUp) => Jolt.PInvoke.VehicleTransmission_Update(this, deltaTime, currentRPM, forwardInput, canShiftUp); /// /// /// C++: /// Jolt/Physics/Vehicle/VehicleTransmission.h:61 ///
/// int GetCurrentGear() const ///
///
/// /// /// Current gear, -1 = reverse, 0 = neutral, 1 = 1st gear etc. /// /// public int GetCurrentGear() => Jolt.PInvoke.VehicleTransmission_GetCurrentGear(this); /// /// /// C++: /// Jolt/Physics/Vehicle/VehicleTransmission.h:64 ///
/// float GetClutchFriction() const ///
///
/// /// /// Value between 0 and 1 indicating how much friction the clutch gives (0 = no friction, 1 = full friction) /// /// public float GetClutchFriction() => Jolt.PInvoke.VehicleTransmission_GetClutchFriction(this); /// /// /// C++: /// Jolt/Physics/Vehicle/VehicleTransmission.h:67 ///
/// bool IsSwitchingGear() const ///
///
/// /// /// If the auto box is currently switching gears /// /// public bool IsSwitchingGear() => Jolt.PInvoke.VehicleTransmission_IsSwitchingGear(this); /// /// /// C++: /// Jolt/Physics/Vehicle/VehicleTransmission.h:70 ///
/// float GetCurrentRatio() const ///
///
/// /// /// Return the transmission ratio based on the current gear (ratio between engine and differential) /// /// public float GetCurrentRatio() => Jolt.PInvoke.VehicleTransmission_GetCurrentRatio(this); /// /// /// C++: /// Jolt/Physics/Vehicle/VehicleTransmission.h:73 ///
/// bool AllowSleep() const ///
///
/// /// /// Only allow sleeping when the transmission is idle /// /// public bool AllowSleep() => Jolt.PInvoke.VehicleTransmission_AllowSleep(this); public static implicit operator VehicleTransmissionSettings(VehicleTransmission value) => Jolt.PInvoke.VehicleTransmission_AsVehicleTransmissionSettings(value); public void Dispose() => Jolt.PInvoke.VehicleTransmission_Destroy(this); } }