mirror of
https://github.com/ahwootech/BRUTAL.git
synced 2026-11-25 20:48:24 +01:00
334 lines
16 KiB
C#
334 lines
16 KiB
C#
// <auto-generated/>
|
|
// 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
|
|
{
|
|
/// <summary>
|
|
/// <para>
|
|
/// 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.
|
|
/// </para>
|
|
/// <para>
|
|
/// C++:
|
|
/// <see href="https://github.com/jrouwe/JoltPhysics/blob/e77f175595e64cb44218cc9d9d56fc365ad0e36a/Jolt/Physics/Constraints/MotorSettings.h#L39">Jolt/Physics/Constraints/MotorSettings.h:39</see>
|
|
/// <br/>
|
|
/// <c>class MotorSettings</c>
|
|
/// </para>
|
|
/// </summary>
|
|
[InteropHandle]
|
|
public readonly partial struct MotorSettings : IDisposable
|
|
{
|
|
/// <summary>
|
|
/// <para>
|
|
/// Constructor
|
|
/// </para>
|
|
/// <para>
|
|
/// C++:
|
|
/// <see href="https://github.com/jrouwe/JoltPhysics/blob/e77f175595e64cb44218cc9d9d56fc365ad0e36a/Jolt/Physics/Constraints/MotorSettings.h#L45">Jolt/Physics/Constraints/MotorSettings.h:45</see>
|
|
/// <br/>
|
|
/// <c>MotorSettings() = default</c>
|
|
/// </para>
|
|
/// </summary>
|
|
public static MotorSettings Create() => Jolt.PInvoke.MotorSettings_Create();
|
|
|
|
/// <summary>
|
|
/// <para>
|
|
/// C++:
|
|
/// <see href="https://github.com/jrouwe/JoltPhysics/blob/e77f175595e64cb44218cc9d9d56fc365ad0e36a/Jolt/Physics/Constraints/MotorSettings.h#L48">Jolt/Physics/Constraints/MotorSettings.h:48</see>
|
|
/// <br/>
|
|
/// <c>MotorSettings(ESpringMode inMode, float inFrequency, float inDamping)</c>
|
|
/// </para>
|
|
/// </summary>
|
|
public static MotorSettings Create(SpringMode mode, float frequency, float damping) =>
|
|
Jolt.PInvoke.MotorSettings_Create_2(mode, frequency, damping);
|
|
|
|
/// <summary>
|
|
/// <para>
|
|
/// C++:
|
|
/// <see href="https://github.com/jrouwe/JoltPhysics/blob/e77f175595e64cb44218cc9d9d56fc365ad0e36a/Jolt/Physics/Constraints/MotorSettings.h#L49">Jolt/Physics/Constraints/MotorSettings.h:49</see>
|
|
/// <br/>
|
|
/// <c>MotorSettings(float inFrequency, float inDamping)</c>
|
|
/// </para>
|
|
/// </summary>
|
|
public static MotorSettings Create(float frequency, float damping) =>
|
|
Jolt.PInvoke.MotorSettings_Create_3(frequency, damping);
|
|
|
|
/// <summary>
|
|
/// <para>
|
|
/// C++:
|
|
/// <see href="https://github.com/jrouwe/JoltPhysics/blob/e77f175595e64cb44218cc9d9d56fc365ad0e36a/Jolt/Physics/Constraints/MotorSettings.h#L50">Jolt/Physics/Constraints/MotorSettings.h:50</see>
|
|
/// <br/>
|
|
/// <c>MotorSettings(ESpringMode inMode, float inFrequency, float inDamping, float inForceLimit, float inTorqueLimit)</c>
|
|
/// </para>
|
|
/// </summary>
|
|
public static MotorSettings Create(
|
|
SpringMode mode,
|
|
float frequency,
|
|
float damping,
|
|
float forceLimit,
|
|
float torqueLimit
|
|
) => Jolt.PInvoke.MotorSettings_Create_4(mode, frequency, damping, forceLimit, torqueLimit);
|
|
|
|
/// <summary>
|
|
/// <para>
|
|
/// C++:
|
|
/// <see href="https://github.com/jrouwe/JoltPhysics/blob/e77f175595e64cb44218cc9d9d56fc365ad0e36a/Jolt/Physics/Constraints/MotorSettings.h#L51">Jolt/Physics/Constraints/MotorSettings.h:51</see>
|
|
/// <br/>
|
|
/// <c>MotorSettings(float inFrequency, float inDamping, float inForceLimit, float inTorqueLimit)</c>
|
|
/// </para>
|
|
/// </summary>
|
|
public static MotorSettings Create(float frequency, float damping, float forceLimit, float torqueLimit) =>
|
|
Jolt.PInvoke.MotorSettings_Create_5(frequency, damping, forceLimit, torqueLimit);
|
|
|
|
/// <summary>
|
|
/// <para>
|
|
/// Set asymmetric force limits
|
|
/// </para>
|
|
/// <para>
|
|
/// C++:
|
|
/// <see href="https://github.com/jrouwe/JoltPhysics/blob/e77f175595e64cb44218cc9d9d56fc365ad0e36a/Jolt/Physics/Constraints/MotorSettings.h#L54">Jolt/Physics/Constraints/MotorSettings.h:54</see>
|
|
/// <br/>
|
|
/// <c>void SetForceLimits(float inMin, float inMax)</c>
|
|
/// </para>
|
|
/// </summary>
|
|
public void SetForceLimits(float min, float max) => Jolt.PInvoke.MotorSettings_SetForceLimits(this, min, max);
|
|
|
|
/// <summary>
|
|
/// <para>
|
|
/// Set asymmetric torque limits
|
|
/// </para>
|
|
/// <para>
|
|
/// C++:
|
|
/// <see href="https://github.com/jrouwe/JoltPhysics/blob/e77f175595e64cb44218cc9d9d56fc365ad0e36a/Jolt/Physics/Constraints/MotorSettings.h#L57">Jolt/Physics/Constraints/MotorSettings.h:57</see>
|
|
/// <br/>
|
|
/// <c>void SetTorqueLimits(float inMin, float inMax)</c>
|
|
/// </para>
|
|
/// </summary>
|
|
public void SetTorqueLimits(float min, float max) => Jolt.PInvoke.MotorSettings_SetTorqueLimits(this, min, max);
|
|
|
|
/// <summary>
|
|
/// <para>
|
|
/// Set symmetric force limits
|
|
/// </para>
|
|
/// <para>
|
|
/// C++:
|
|
/// <see href="https://github.com/jrouwe/JoltPhysics/blob/e77f175595e64cb44218cc9d9d56fc365ad0e36a/Jolt/Physics/Constraints/MotorSettings.h#L60">Jolt/Physics/Constraints/MotorSettings.h:60</see>
|
|
/// <br/>
|
|
/// <c>void SetForceLimit(float inLimit)</c>
|
|
/// </para>
|
|
/// </summary>
|
|
public void SetForceLimit(float limit) => Jolt.PInvoke.MotorSettings_SetForceLimit(this, limit);
|
|
|
|
/// <summary>
|
|
/// <para>
|
|
/// Set symmetric torque limits
|
|
/// </para>
|
|
/// <para>
|
|
/// C++:
|
|
/// <see href="https://github.com/jrouwe/JoltPhysics/blob/e77f175595e64cb44218cc9d9d56fc365ad0e36a/Jolt/Physics/Constraints/MotorSettings.h#L63">Jolt/Physics/Constraints/MotorSettings.h:63</see>
|
|
/// <br/>
|
|
/// <c>void SetTorqueLimit(float inLimit)</c>
|
|
/// </para>
|
|
/// </summary>
|
|
public void SetTorqueLimit(float limit) => Jolt.PInvoke.MotorSettings_SetTorqueLimit(this, limit);
|
|
|
|
/// <summary>
|
|
/// <para>
|
|
/// Check if settings are valid
|
|
/// </para>
|
|
/// <para>
|
|
/// C++:
|
|
/// <see href="https://github.com/jrouwe/JoltPhysics/blob/e77f175595e64cb44218cc9d9d56fc365ad0e36a/Jolt/Physics/Constraints/MotorSettings.h#L66">Jolt/Physics/Constraints/MotorSettings.h:66</see>
|
|
/// <br/>
|
|
/// <c>bool IsValid() const</c>
|
|
/// </para>
|
|
/// </summary>
|
|
public bool IsValid() => Jolt.PInvoke.MotorSettings_IsValid(this);
|
|
|
|
/// <summary>
|
|
/// <para>
|
|
/// Saves the contents of the motor settings in binary form to inStream.
|
|
/// </para>
|
|
/// <para>
|
|
/// C++:
|
|
/// <see href="https://github.com/jrouwe/JoltPhysics/blob/e77f175595e64cb44218cc9d9d56fc365ad0e36a/Jolt/Physics/Constraints/MotorSettings.h#L69">Jolt/Physics/Constraints/MotorSettings.h:69</see>
|
|
/// <br/>
|
|
/// <c>void SaveBinaryState(StreamOut &inStream) const</c>
|
|
/// </para>
|
|
/// </summary>
|
|
public void SaveBinaryState(StreamOut stream) => Jolt.PInvoke.MotorSettings_SaveBinaryState(this, stream);
|
|
|
|
/// <summary>
|
|
/// <para>
|
|
/// Restores contents from the binary stream inStream.
|
|
/// </para>
|
|
/// <para>
|
|
/// C++:
|
|
/// <see href="https://github.com/jrouwe/JoltPhysics/blob/e77f175595e64cb44218cc9d9d56fc365ad0e36a/Jolt/Physics/Constraints/MotorSettings.h#L72">Jolt/Physics/Constraints/MotorSettings.h:72</see>
|
|
/// <br/>
|
|
/// <c>void RestoreBinaryState(StreamIn &inStream)</c>
|
|
/// </para>
|
|
/// </summary>
|
|
public void RestoreBinaryState(StreamIn stream) => Jolt.PInvoke.MotorSettings_RestoreBinaryState(this, stream);
|
|
|
|
/// <summary>
|
|
/// <para>
|
|
/// Settings for the spring that is used to drive to the position target (not used when motor is a velocity
|
|
/// motor).
|
|
/// </para>
|
|
/// <para>
|
|
/// C++:
|
|
/// <see href="https://github.com/jrouwe/JoltPhysics/blob/e77f175595e64cb44218cc9d9d56fc365ad0e36a/Jolt/Physics/Constraints/MotorSettings.h#L75">Jolt/Physics/Constraints/MotorSettings.h:75</see>
|
|
/// <br/>
|
|
/// <c>SpringSettings mSpringSettings { ESpringMode::FrequencyAndDamping, 2.0f, 1.0f }</c>
|
|
/// </para>
|
|
/// </summary>
|
|
/// <remarks>
|
|
/// <para>
|
|
/// Settings
|
|
/// </para>
|
|
/// <para>
|
|
/// The returned handle is an owned copy; Dispose it when you're done with it.
|
|
/// </para>
|
|
/// </remarks>
|
|
public SpringSettings GetSpringSettings() => Jolt.PInvoke.MotorSettings_GetSpringSettings(this);
|
|
|
|
/// <summary>
|
|
/// <para>
|
|
/// Settings for the spring that is used to drive to the position target (not used when motor is a velocity
|
|
/// motor).
|
|
/// </para>
|
|
/// <para>
|
|
/// C++:
|
|
/// <see href="https://github.com/jrouwe/JoltPhysics/blob/e77f175595e64cb44218cc9d9d56fc365ad0e36a/Jolt/Physics/Constraints/MotorSettings.h#L75">Jolt/Physics/Constraints/MotorSettings.h:75</see>
|
|
/// <br/>
|
|
/// <c>SpringSettings mSpringSettings { ESpringMode::FrequencyAndDamping, 2.0f, 1.0f }</c>
|
|
/// </para>
|
|
/// </summary>
|
|
/// <remarks>
|
|
/// <para>
|
|
/// Settings
|
|
/// </para>
|
|
/// <para>
|
|
/// The value is copied into the field; the handle you pass stays yours to Dispose.
|
|
/// </para>
|
|
/// </remarks>
|
|
public void SetSpringSettings(SpringSettings value) =>
|
|
Jolt.PInvoke.MotorSettings_SetSpringSettings(this, value);
|
|
|
|
/// <summary>
|
|
/// <para>
|
|
/// 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.
|
|
/// </para>
|
|
/// <para>
|
|
/// C++:
|
|
/// <see href="https://github.com/jrouwe/JoltPhysics/blob/e77f175595e64cb44218cc9d9d56fc365ad0e36a/Jolt/Physics/Constraints/MotorSettings.h#L76">Jolt/Physics/Constraints/MotorSettings.h:76</see>
|
|
/// <br/>
|
|
/// <c>float mMinForceLimit = -FLT_MAX</c>
|
|
/// </para>
|
|
/// </summary>
|
|
public float GetMinForceLimit() => Jolt.PInvoke.MotorSettings_GetMinForceLimit(this);
|
|
|
|
/// <summary>
|
|
/// <para>
|
|
/// 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.
|
|
/// </para>
|
|
/// <para>
|
|
/// C++:
|
|
/// <see href="https://github.com/jrouwe/JoltPhysics/blob/e77f175595e64cb44218cc9d9d56fc365ad0e36a/Jolt/Physics/Constraints/MotorSettings.h#L76">Jolt/Physics/Constraints/MotorSettings.h:76</see>
|
|
/// <br/>
|
|
/// <c>float mMinForceLimit = -FLT_MAX</c>
|
|
/// </para>
|
|
/// </summary>
|
|
public void SetMinForceLimit(float value) => Jolt.PInvoke.MotorSettings_SetMinForceLimit(this, value);
|
|
|
|
/// <summary>
|
|
/// <para>
|
|
/// Maximum force to apply in case of a linear constraint (N). Not used when motor is an angular motor.
|
|
/// </para>
|
|
/// <para>
|
|
/// C++:
|
|
/// <see href="https://github.com/jrouwe/JoltPhysics/blob/e77f175595e64cb44218cc9d9d56fc365ad0e36a/Jolt/Physics/Constraints/MotorSettings.h#L77">Jolt/Physics/Constraints/MotorSettings.h:77</see>
|
|
/// <br/>
|
|
/// <c>float mMaxForceLimit = FLT_MAX</c>
|
|
/// </para>
|
|
/// </summary>
|
|
public float GetMaxForceLimit() => Jolt.PInvoke.MotorSettings_GetMaxForceLimit(this);
|
|
|
|
/// <summary>
|
|
/// <para>
|
|
/// Maximum force to apply in case of a linear constraint (N). Not used when motor is an angular motor.
|
|
/// </para>
|
|
/// <para>
|
|
/// C++:
|
|
/// <see href="https://github.com/jrouwe/JoltPhysics/blob/e77f175595e64cb44218cc9d9d56fc365ad0e36a/Jolt/Physics/Constraints/MotorSettings.h#L77">Jolt/Physics/Constraints/MotorSettings.h:77</see>
|
|
/// <br/>
|
|
/// <c>float mMaxForceLimit = FLT_MAX</c>
|
|
/// </para>
|
|
/// </summary>
|
|
public void SetMaxForceLimit(float value) => Jolt.PInvoke.MotorSettings_SetMaxForceLimit(this, value);
|
|
|
|
/// <summary>
|
|
/// <para>
|
|
/// 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 linear motor.
|
|
/// </para>
|
|
/// <para>
|
|
/// C++:
|
|
/// <see href="https://github.com/jrouwe/JoltPhysics/blob/e77f175595e64cb44218cc9d9d56fc365ad0e36a/Jolt/Physics/Constraints/MotorSettings.h#L78">Jolt/Physics/Constraints/MotorSettings.h:78</see>
|
|
/// <br/>
|
|
/// <c>float mMinTorqueLimit = -FLT_MAX</c>
|
|
/// </para>
|
|
/// </summary>
|
|
public float GetMinTorqueLimit() => Jolt.PInvoke.MotorSettings_GetMinTorqueLimit(this);
|
|
|
|
/// <summary>
|
|
/// <para>
|
|
/// 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 linear motor.
|
|
/// </para>
|
|
/// <para>
|
|
/// C++:
|
|
/// <see href="https://github.com/jrouwe/JoltPhysics/blob/e77f175595e64cb44218cc9d9d56fc365ad0e36a/Jolt/Physics/Constraints/MotorSettings.h#L78">Jolt/Physics/Constraints/MotorSettings.h:78</see>
|
|
/// <br/>
|
|
/// <c>float mMinTorqueLimit = -FLT_MAX</c>
|
|
/// </para>
|
|
/// </summary>
|
|
public void SetMinTorqueLimit(float value) => Jolt.PInvoke.MotorSettings_SetMinTorqueLimit(this, value);
|
|
|
|
/// <summary>
|
|
/// <para>
|
|
/// Maximum torque to apply in case of a angular constraint (N m). Not used when motor is a linear motor.
|
|
/// </para>
|
|
/// <para>
|
|
/// C++:
|
|
/// <see href="https://github.com/jrouwe/JoltPhysics/blob/e77f175595e64cb44218cc9d9d56fc365ad0e36a/Jolt/Physics/Constraints/MotorSettings.h#L79">Jolt/Physics/Constraints/MotorSettings.h:79</see>
|
|
/// <br/>
|
|
/// <c>float mMaxTorqueLimit = FLT_MAX</c>
|
|
/// </para>
|
|
/// </summary>
|
|
public float GetMaxTorqueLimit() => Jolt.PInvoke.MotorSettings_GetMaxTorqueLimit(this);
|
|
|
|
/// <summary>
|
|
/// <para>
|
|
/// Maximum torque to apply in case of a angular constraint (N m). Not used when motor is a linear motor.
|
|
/// </para>
|
|
/// <para>
|
|
/// C++:
|
|
/// <see href="https://github.com/jrouwe/JoltPhysics/blob/e77f175595e64cb44218cc9d9d56fc365ad0e36a/Jolt/Physics/Constraints/MotorSettings.h#L79">Jolt/Physics/Constraints/MotorSettings.h:79</see>
|
|
/// <br/>
|
|
/// <c>float mMaxTorqueLimit = FLT_MAX</c>
|
|
/// </para>
|
|
/// </summary>
|
|
public void SetMaxTorqueLimit(float value) => Jolt.PInvoke.MotorSettings_SetMaxTorqueLimit(this, value);
|
|
|
|
public void Dispose() => Jolt.PInvoke.MotorSettings_Destroy(this);
|
|
}
|
|
}
|