//
// Generated by Brutal.Jolt.Generate; do not edit by hand.
#nullable enable
using Brutal.Interop;
using Brutal.Numerics;
namespace Brutal.JoltApi
{
///
///
/// C++:
/// Jolt/Physics/Constraints/MotorSettings.h:25
///
/// class MotorSettings
///
///
///
///
/// Class that contains the settings for a constraint motor.
/// See the main page of the API documentation for more information on how to configure a motor.
///
///
[InteropHandle]
public readonly partial struct MotorSettings : IDisposable
{
///
///
/// C++:
/// Jolt/Physics/Constraints/MotorSettings.h:31
///
/// MotorSettings() = default
///
///
///
///
/// Constructor
///
///
public static MotorSettings Create() => Jolt.PInvoke.MotorSettings_Create();
///
///
/// C++:
/// Jolt/Physics/Constraints/MotorSettings.h:34
///
/// MotorSettings(float inFrequency, float inDamping)
///
///
public static MotorSettings Create(float frequency, float damping) => Jolt.PInvoke.MotorSettings_Create_2(frequency, damping);
///
///
/// C++:
/// Jolt/Physics/Constraints/MotorSettings.h:35
///
/// MotorSettings(float inFrequency, float inDamping, float inForceLimit, float inTorqueLimit)
///
///
public static MotorSettings Create(float frequency, float damping, float forceLimit, float torqueLimit) => Jolt.PInvoke.MotorSettings_Create_3(frequency, damping, forceLimit, torqueLimit);
///
///
/// C++:
/// Jolt/Physics/Constraints/MotorSettings.h:38
///
/// void SetForceLimits(float inMin, float inMax)
///
///
///
///
/// Set asymmetric force limits
///
///
public void SetForceLimits(float min, float max) => Jolt.PInvoke.MotorSettings_SetForceLimits(this, min, max);
///
///
/// C++:
/// Jolt/Physics/Constraints/MotorSettings.h:41
///
/// void SetTorqueLimits(float inMin, float inMax)
///
///
///
///
/// Set asymmetric torque limits
///
///
public void SetTorqueLimits(float min, float max) => Jolt.PInvoke.MotorSettings_SetTorqueLimits(this, min, max);
///
///
/// C++:
/// Jolt/Physics/Constraints/MotorSettings.h:44
///
/// void SetForceLimit(float inLimit)
///
///
///
///
/// Set symmetric force limits
///
///
public void SetForceLimit(float limit) => Jolt.PInvoke.MotorSettings_SetForceLimit(this, limit);
///
///
/// C++:
/// Jolt/Physics/Constraints/MotorSettings.h:47
///
/// void SetTorqueLimit(float inLimit)
///
///
///
///
/// Set symmetric torque limits
///
///
public void SetTorqueLimit(float limit) => Jolt.PInvoke.MotorSettings_SetTorqueLimit(this, limit);
///
///
/// C++:
/// Jolt/Physics/Constraints/MotorSettings.h:50
///
/// bool IsValid() const
///
///
///
///
/// Check if settings are valid
///
///
public bool IsValid() => Jolt.PInvoke.MotorSettings_IsValid(this);
///
///
/// C++:
/// Jolt/Physics/Constraints/MotorSettings.h:53
///
/// void SaveBinaryState(StreamOut &inStream) const
///
///
///
///
/// Saves the contents of the motor settings in binary form to inStream.
///
///
public void SaveBinaryState(StreamOut stream) => Jolt.PInvoke.MotorSettings_SaveBinaryState(this, stream);
///
///
/// C++:
/// Jolt/Physics/Constraints/MotorSettings.h:56
///
/// void RestoreBinaryState(StreamIn &inStream)
///
///
///
///
/// Restores contents from the binary stream inStream.
///
///
public void RestoreBinaryState(StreamIn stream) => Jolt.PInvoke.MotorSettings_RestoreBinaryState(this, stream);
///
///
/// Minimum force to apply in case of a linear constraint (N). Usually this is -mMaxForceLimit unless you
/// want a motor that can e.g. push but not pull. Not used when motor is an angular motor.
///
///
/// C++:
/// Jolt/Physics/Constraints/MotorSettings.h:60
///
/// float mMinForceLimit = -FLT_MAX
///
///
public float GetMinForceLimit() => Jolt.PInvoke.MotorSettings_GetMinForceLimit(this);
///
///
/// Minimum force to apply in case of a linear constraint (N). Usually this is -mMaxForceLimit unless you
/// want a motor that can e.g. push but not pull. Not used when motor is an angular motor.
///
///
/// C++:
/// Jolt/Physics/Constraints/MotorSettings.h:60
///
/// float mMinForceLimit = -FLT_MAX
///
///
public void SetMinForceLimit(float value) => Jolt.PInvoke.MotorSettings_SetMinForceLimit(this, value);
///
///
/// Maximum force to apply in case of a linear constraint (N). Not used when motor is an angular motor.
///
///
/// C++:
/// Jolt/Physics/Constraints/MotorSettings.h:61
///
/// float mMaxForceLimit = FLT_MAX
///
///
public float GetMaxForceLimit() => Jolt.PInvoke.MotorSettings_GetMaxForceLimit(this);
///
///
/// Maximum force to apply in case of a linear constraint (N). Not used when motor is an angular motor.
///
///
/// C++:
/// Jolt/Physics/Constraints/MotorSettings.h:61
///
/// float mMaxForceLimit = FLT_MAX
///
///
public void SetMaxForceLimit(float value) => Jolt.PInvoke.MotorSettings_SetMaxForceLimit(this, value);
///
///
/// Minimum torque to apply in case of a angular constraint (N m). Usually this is -mMaxTorqueLimit unless
/// you want a motor that can e.g. push but not pull. Not used when motor is a position motor.
///
///
/// C++:
/// Jolt/Physics/Constraints/MotorSettings.h:62
///
/// float mMinTorqueLimit = -FLT_MAX
///
///
public float GetMinTorqueLimit() => Jolt.PInvoke.MotorSettings_GetMinTorqueLimit(this);
///
///
/// Minimum torque to apply in case of a angular constraint (N m). Usually this is -mMaxTorqueLimit unless
/// you want a motor that can e.g. push but not pull. Not used when motor is a position motor.
///
///
/// C++:
/// Jolt/Physics/Constraints/MotorSettings.h:62
///
/// float mMinTorqueLimit = -FLT_MAX
///
///
public void SetMinTorqueLimit(float value) => Jolt.PInvoke.MotorSettings_SetMinTorqueLimit(this, value);
///
///
/// Maximum torque to apply in case of a angular constraint (N m). Not used when motor is a position motor.
///
///
/// C++:
/// Jolt/Physics/Constraints/MotorSettings.h:63
///
/// float mMaxTorqueLimit = FLT_MAX
///
///
public float GetMaxTorqueLimit() => Jolt.PInvoke.MotorSettings_GetMaxTorqueLimit(this);
///
///
/// Maximum torque to apply in case of a angular constraint (N m). Not used when motor is a position motor.
///
///
/// C++:
/// Jolt/Physics/Constraints/MotorSettings.h:63
///
/// float mMaxTorqueLimit = FLT_MAX
///
///
public void SetMaxTorqueLimit(float value) => Jolt.PInvoke.MotorSettings_SetMaxTorqueLimit(this, value);
public void Dispose() => Jolt.PInvoke.MotorSettings_Destroy(this);
}
}