// // 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/VehicleDifferential.h:13 ///
/// class VehicleDifferentialSettings ///
///
[InteropHandle] public readonly partial struct VehicleDifferentialSettings : IDisposable { public static VehicleDifferentialSettings Create() => Jolt.PInvoke.VehicleDifferentialSettings_Create(); /// /// /// C++: /// Jolt/Physics/Vehicle/VehicleDifferential.h:19 ///
/// void SaveBinaryState(StreamOut &inStream) const ///
///
/// /// /// Saves the contents in binary form to inStream. /// /// public void SaveBinaryState(StreamOut stream) => Jolt.PInvoke.VehicleDifferentialSettings_SaveBinaryState(this, stream); /// /// /// C++: /// Jolt/Physics/Vehicle/VehicleDifferential.h:22 ///
/// void RestoreBinaryState(StreamIn &inStream) ///
///
/// /// /// Restores the contents in binary form to inStream. /// /// public void RestoreBinaryState(StreamIn stream) => Jolt.PInvoke.VehicleDifferentialSettings_RestoreBinaryState(this, stream); /// /// /// C++: /// Jolt/Physics/Vehicle/VehicleDifferential.h:29 ///
/// void CalculateTorqueRatio(float inLeftAngularVelocity, float inRightAngularVelocity, float &outLeftTorqueFraction, float &outRightTorqueFraction) const ///
///
/// /// /// Calculate the torque ratio between left and right wheel /// @param inLeftAngularVelocity Angular velocity of left wheel (rad / s) /// @param inRightAngularVelocity Angular velocity of right wheel (rad / s) /// @param outLeftTorqueFraction Fraction of torque that should go to the left wheel /// @param outRightTorqueFraction Fraction of torque that should go to the right wheel /// /// public void CalculateTorqueRatio(float leftAngularVelocity, float rightAngularVelocity, out float leftTorqueFraction, out float rightTorqueFraction) => Jolt.PInvoke.VehicleDifferentialSettings_CalculateTorqueRatio(this, leftAngularVelocity, rightAngularVelocity, out leftTorqueFraction, out rightTorqueFraction); /// /// /// Index (in mWheels) that represents the left wheel of this differential (can be -1 to indicate no wheel) /// /// /// C++: /// Jolt/Physics/Vehicle/VehicleDifferential.h:31 ///
/// int mLeftWheel = -1 ///
///
public int GetLeftWheel() => Jolt.PInvoke.VehicleDifferentialSettings_GetLeftWheel(this); /// /// /// Index (in mWheels) that represents the left wheel of this differential (can be -1 to indicate no wheel) /// /// /// C++: /// Jolt/Physics/Vehicle/VehicleDifferential.h:31 ///
/// int mLeftWheel = -1 ///
///
public void SetLeftWheel(int value) => Jolt.PInvoke.VehicleDifferentialSettings_SetLeftWheel(this, value); /// /// /// Index (in mWheels) that represents the right wheel of this differential (can be -1 to indicate no wheel) /// /// /// C++: /// Jolt/Physics/Vehicle/VehicleDifferential.h:32 ///
/// int mRightWheel = -1 ///
///
public int GetRightWheel() => Jolt.PInvoke.VehicleDifferentialSettings_GetRightWheel(this); /// /// /// Index (in mWheels) that represents the right wheel of this differential (can be -1 to indicate no wheel) /// /// /// C++: /// Jolt/Physics/Vehicle/VehicleDifferential.h:32 ///
/// int mRightWheel = -1 ///
///
public void SetRightWheel(int value) => Jolt.PInvoke.VehicleDifferentialSettings_SetRightWheel(this, value); /// /// /// Ratio between rotation speed of gear box and wheels /// /// /// C++: /// Jolt/Physics/Vehicle/VehicleDifferential.h:33 ///
/// float mDifferentialRatio = 3.42f ///
///
public float GetDifferentialRatio() => Jolt.PInvoke.VehicleDifferentialSettings_GetDifferentialRatio(this); /// /// /// Ratio between rotation speed of gear box and wheels /// /// /// C++: /// Jolt/Physics/Vehicle/VehicleDifferential.h:33 ///
/// float mDifferentialRatio = 3.42f ///
///
public void SetDifferentialRatio(float value) => Jolt.PInvoke.VehicleDifferentialSettings_SetDifferentialRatio(this, value); /// /// /// Defines how the engine torque is split across the left and right wheel (0 = left, 0.5 = center, 1 = /// right) /// /// /// C++: /// Jolt/Physics/Vehicle/VehicleDifferential.h:34 ///
/// float mLeftRightSplit = 0.5f ///
///
public float GetLeftRightSplit() => Jolt.PInvoke.VehicleDifferentialSettings_GetLeftRightSplit(this); /// /// /// Defines how the engine torque is split across the left and right wheel (0 = left, 0.5 = center, 1 = /// right) /// /// /// C++: /// Jolt/Physics/Vehicle/VehicleDifferential.h:34 ///
/// float mLeftRightSplit = 0.5f ///
///
public void SetLeftRightSplit(float value) => Jolt.PInvoke.VehicleDifferentialSettings_SetLeftRightSplit(this, value); /// /// /// Ratio max / min wheel speed. When this ratio is exceeded, all torque gets distributed to the slowest /// moving wheel. This allows implementing a limited slip differential. Set to FLT_MAX for an open /// differential. Value should be > 1. /// /// /// C++: /// Jolt/Physics/Vehicle/VehicleDifferential.h:35 ///
/// float mLimitedSlipRatio = 1.4f ///
///
public float GetLimitedSlipRatio() => Jolt.PInvoke.VehicleDifferentialSettings_GetLimitedSlipRatio(this); /// /// /// Ratio max / min wheel speed. When this ratio is exceeded, all torque gets distributed to the slowest /// moving wheel. This allows implementing a limited slip differential. Set to FLT_MAX for an open /// differential. Value should be > 1. /// /// /// C++: /// Jolt/Physics/Vehicle/VehicleDifferential.h:35 ///
/// float mLimitedSlipRatio = 1.4f ///
///
public void SetLimitedSlipRatio(float value) => Jolt.PInvoke.VehicleDifferentialSettings_SetLimitedSlipRatio(this, value); /// /// /// How much of the engines torque is applied to this differential (0 = none, 1 = full), make sure the sum /// of all differentials is 1. /// /// /// C++: /// Jolt/Physics/Vehicle/VehicleDifferential.h:36 ///
/// float mEngineTorqueRatio = 1.0f ///
///
public float GetEngineTorqueRatio() => Jolt.PInvoke.VehicleDifferentialSettings_GetEngineTorqueRatio(this); /// /// /// How much of the engines torque is applied to this differential (0 = none, 1 = full), make sure the sum /// of all differentials is 1. /// /// /// C++: /// Jolt/Physics/Vehicle/VehicleDifferential.h:36 ///
/// float mEngineTorqueRatio = 1.0f ///
///
public void SetEngineTorqueRatio(float value) => Jolt.PInvoke.VehicleDifferentialSettings_SetEngineTorqueRatio(this, value); public void Dispose() => Jolt.PInvoke.VehicleDifferentialSettings_Destroy(this); } }