mirror of
https://github.com/ahwootech/BRUTAL.git
synced 2026-11-26 13:08:24 +01:00
190 lines
10 KiB
C#
190 lines
10 KiB
C#
// <auto-generated/>
|
|
// Generated by Brutal.Jolt.Generate; do not edit by hand.
|
|
#nullable enable
|
|
|
|
using Brutal.Interop;
|
|
using Brutal.Numerics;
|
|
namespace Brutal.JoltApi
|
|
{
|
|
/// <summary>
|
|
/// <para>
|
|
/// C++:
|
|
/// <see href="https://github.com/jrouwe/JoltPhysics/blob/23dadd0e603f1b321142d4c74df07fce85064989/Jolt/Physics/Constraints/GearConstraint.h#L52">Jolt/Physics/Constraints/GearConstraint.h:52</see>
|
|
/// <br/>
|
|
/// <c>class GearConstraint final : public TwoBodyConstraint</c>
|
|
/// </para>
|
|
/// </summary>
|
|
/// <remarks>
|
|
/// <code>
|
|
/// A gear constraint constrains the rotation of body1 to the rotation of body 2 using a gear.
|
|
/// Note that this constraint needs to be used in conjunction with a two hinge constraints.
|
|
/// </code>
|
|
/// </remarks>
|
|
[InteropHandle]
|
|
public readonly partial struct GearConstraint : IDisposable
|
|
{
|
|
/// <summary>
|
|
/// <para>
|
|
/// C++:
|
|
/// <see href="https://github.com/jrouwe/JoltPhysics/blob/23dadd0e603f1b321142d4c74df07fce85064989/Jolt/Physics/Constraints/GearConstraint.h#L58">Jolt/Physics/Constraints/GearConstraint.h:58</see>
|
|
/// <br/>
|
|
/// <c>GearConstraint(Body &inBody1, Body &inBody2, const GearConstraintSettings &inSettings)</c>
|
|
/// </para>
|
|
/// </summary>
|
|
/// <remarks>
|
|
/// <para>
|
|
/// Construct gear constraint
|
|
/// </para>
|
|
/// </remarks>
|
|
public static GearConstraint Create(Body body1, Body body2, GearConstraintSettings settings) => Jolt.PInvoke.GearConstraint_Create(body1, body2, settings);
|
|
/// <summary>
|
|
/// <para>
|
|
/// C++:
|
|
/// <see href="https://github.com/jrouwe/JoltPhysics/blob/23dadd0e603f1b321142d4c74df07fce85064989/Jolt/Physics/Constraints/GearConstraint.h#L61">Jolt/Physics/Constraints/GearConstraint.h:61</see>
|
|
/// <br/>
|
|
/// <c>virtual EConstraintSubType GetSubType() const override</c>
|
|
/// </para>
|
|
/// </summary>
|
|
/// <remarks>
|
|
/// <para>
|
|
/// Generic interface of a constraint
|
|
/// </para>
|
|
/// </remarks>
|
|
public EConstraintSubType GetSubType() => Jolt.PInvoke.GearConstraint_GetSubType(this);
|
|
/// <summary>
|
|
/// <para>
|
|
/// C++:
|
|
/// <see href="https://github.com/jrouwe/JoltPhysics/blob/23dadd0e603f1b321142d4c74df07fce85064989/Jolt/Physics/Constraints/GearConstraint.h#L62">Jolt/Physics/Constraints/GearConstraint.h:62</see>
|
|
/// <br/>
|
|
/// <c>virtual void NotifyShapeChanged(const BodyID &inBodyID, Vec3Arg inDeltaCOM) override</c>
|
|
/// </para>
|
|
/// </summary>
|
|
public void NotifyShapeChanged(uint bodyID, float3 deltaCOM) => Jolt.PInvoke.GearConstraint_NotifyShapeChanged(this, bodyID, deltaCOM);
|
|
/// <summary>
|
|
/// <para>
|
|
/// C++:
|
|
/// <see href="https://github.com/jrouwe/JoltPhysics/blob/23dadd0e603f1b321142d4c74df07fce85064989/Jolt/Physics/Constraints/GearConstraint.h#L63">Jolt/Physics/Constraints/GearConstraint.h:63</see>
|
|
/// <br/>
|
|
/// <c>virtual void SetupVelocityConstraint(float inDeltaTime) override</c>
|
|
/// </para>
|
|
/// </summary>
|
|
public void SetupVelocityConstraint(float deltaTime) => Jolt.PInvoke.GearConstraint_SetupVelocityConstraint(this, deltaTime);
|
|
/// <summary>
|
|
/// <para>
|
|
/// C++:
|
|
/// <see href="https://github.com/jrouwe/JoltPhysics/blob/23dadd0e603f1b321142d4c74df07fce85064989/Jolt/Physics/Constraints/GearConstraint.h#L64">Jolt/Physics/Constraints/GearConstraint.h:64</see>
|
|
/// <br/>
|
|
/// <c>virtual void ResetWarmStart() override</c>
|
|
/// </para>
|
|
/// </summary>
|
|
public void ResetWarmStart() => Jolt.PInvoke.GearConstraint_ResetWarmStart(this);
|
|
/// <summary>
|
|
/// <para>
|
|
/// C++:
|
|
/// <see href="https://github.com/jrouwe/JoltPhysics/blob/23dadd0e603f1b321142d4c74df07fce85064989/Jolt/Physics/Constraints/GearConstraint.h#L65">Jolt/Physics/Constraints/GearConstraint.h:65</see>
|
|
/// <br/>
|
|
/// <c>virtual void WarmStartVelocityConstraint(float inWarmStartImpulseRatio) override</c>
|
|
/// </para>
|
|
/// </summary>
|
|
public void WarmStartVelocityConstraint(float warmStartImpulseRatio) => Jolt.PInvoke.GearConstraint_WarmStartVelocityConstraint(this, warmStartImpulseRatio);
|
|
/// <summary>
|
|
/// <para>
|
|
/// C++:
|
|
/// <see href="https://github.com/jrouwe/JoltPhysics/blob/23dadd0e603f1b321142d4c74df07fce85064989/Jolt/Physics/Constraints/GearConstraint.h#L66">Jolt/Physics/Constraints/GearConstraint.h:66</see>
|
|
/// <br/>
|
|
/// <c>virtual bool SolveVelocityConstraint(float inDeltaTime) override</c>
|
|
/// </para>
|
|
/// </summary>
|
|
public bool SolveVelocityConstraint(float deltaTime) => Jolt.PInvoke.GearConstraint_SolveVelocityConstraint(this, deltaTime);
|
|
/// <summary>
|
|
/// <para>
|
|
/// C++:
|
|
/// <see href="https://github.com/jrouwe/JoltPhysics/blob/23dadd0e603f1b321142d4c74df07fce85064989/Jolt/Physics/Constraints/GearConstraint.h#L67">Jolt/Physics/Constraints/GearConstraint.h:67</see>
|
|
/// <br/>
|
|
/// <c>virtual bool SolvePositionConstraint(float inDeltaTime, float inBaumgarte) override</c>
|
|
/// </para>
|
|
/// </summary>
|
|
public bool SolvePositionConstraint(float deltaTime, float baumgarte) => Jolt.PInvoke.GearConstraint_SolvePositionConstraint(this, deltaTime, baumgarte);
|
|
/// <summary>
|
|
/// <para>
|
|
/// C++:
|
|
/// <see href="https://github.com/jrouwe/JoltPhysics/blob/23dadd0e603f1b321142d4c74df07fce85064989/Jolt/Physics/Constraints/GearConstraint.h#L69">Jolt/Physics/Constraints/GearConstraint.h:69</see>
|
|
/// <br/>
|
|
/// <c>virtual void DrawConstraint(DebugRenderer *inRenderer) const override</c>
|
|
/// </para>
|
|
/// </summary>
|
|
public void DrawConstraint(DebugRenderer renderer) => Jolt.PInvoke.GearConstraint_DrawConstraint(this, renderer);
|
|
/// <summary>
|
|
/// <para>
|
|
/// C++:
|
|
/// <see href="https://github.com/jrouwe/JoltPhysics/blob/23dadd0e603f1b321142d4c74df07fce85064989/Jolt/Physics/Constraints/GearConstraint.h#L73">Jolt/Physics/Constraints/GearConstraint.h:73</see>
|
|
/// <br/>
|
|
/// <c>virtual Ref<ConstraintSettings> GetConstraintSettings() const override</c>
|
|
/// </para>
|
|
/// </summary>
|
|
public ConstraintSettings GetConstraintSettings() => Jolt.PInvoke.GearConstraint_GetConstraintSettings(this);
|
|
/// <summary>
|
|
/// <para>
|
|
/// C++:
|
|
/// <see href="https://github.com/jrouwe/JoltPhysics/blob/23dadd0e603f1b321142d4c74df07fce85064989/Jolt/Physics/Constraints/GearConstraint.h#L76">Jolt/Physics/Constraints/GearConstraint.h:76</see>
|
|
/// <br/>
|
|
/// <c>virtual Mat44 GetConstraintToBody1Matrix() const override</c>
|
|
/// </para>
|
|
/// </summary>
|
|
/// <remarks>
|
|
/// <para>
|
|
/// See: TwoBodyConstraint
|
|
/// </para>
|
|
/// </remarks>
|
|
public float4x4 GetConstraintToBody1Matrix() => Jolt.PInvoke.GearConstraint_GetConstraintToBody1Matrix(this);
|
|
/// <summary>
|
|
/// <para>
|
|
/// C++:
|
|
/// <see href="https://github.com/jrouwe/JoltPhysics/blob/23dadd0e603f1b321142d4c74df07fce85064989/Jolt/Physics/Constraints/GearConstraint.h#L77">Jolt/Physics/Constraints/GearConstraint.h:77</see>
|
|
/// <br/>
|
|
/// <c>virtual Mat44 GetConstraintToBody2Matrix() const override</c>
|
|
/// </para>
|
|
/// </summary>
|
|
public float4x4 GetConstraintToBody2Matrix() => Jolt.PInvoke.GearConstraint_GetConstraintToBody2Matrix(this);
|
|
/// <summary>
|
|
/// <para>
|
|
/// C++:
|
|
/// <see href="https://github.com/jrouwe/JoltPhysics/blob/23dadd0e603f1b321142d4c74df07fce85064989/Jolt/Physics/Constraints/GearConstraint.h#L80">Jolt/Physics/Constraints/GearConstraint.h:80</see>
|
|
/// <br/>
|
|
/// <c>void SetConstraints(const Constraint *inGear1, const Constraint *inGear2)</c>
|
|
/// </para>
|
|
/// </summary>
|
|
/// <remarks>
|
|
/// <para>
|
|
/// The constraints that constrain both gears (2 hinges), optional and used to calculate the rotation error
|
|
/// and fix numerical drift.
|
|
/// </para>
|
|
/// </remarks>
|
|
public void SetConstraints(Constraint gear1, Constraint gear2) => Jolt.PInvoke.GearConstraint_SetConstraints(this, gear1, gear2);
|
|
/// <summary>
|
|
/// <para>
|
|
/// C++:
|
|
/// <see href="https://github.com/jrouwe/JoltPhysics/blob/23dadd0e603f1b321142d4c74df07fce85064989/Jolt/Physics/Constraints/GearConstraint.h#L83">Jolt/Physics/Constraints/GearConstraint.h:83</see>
|
|
/// <br/>
|
|
/// <c>inline float GetTotalLambda() const</c>
|
|
/// </para>
|
|
/// </summary>
|
|
/// <remarks>
|
|
/// <para>
|
|
/// @name Get Lagrange multiplier from last physics update (the angular impulse applied to satisfy the
|
|
/// constraint)
|
|
/// </para>
|
|
/// </remarks>
|
|
public float GetTotalLambda() => Jolt.PInvoke.GearConstraint_GetTotalLambda(this);
|
|
public void AddRef() => Jolt.PInvoke.GearConstraint_AddRef(this);
|
|
public void Release() => Jolt.PInvoke.GearConstraint_Release(this);
|
|
public uint GetRefCount() => Jolt.PInvoke.GearConstraint_GetRefCount(this);
|
|
public static implicit operator TwoBodyConstraint(GearConstraint value) => Jolt.PInvoke.GearConstraint_AsTwoBodyConstraint(value);
|
|
public static implicit operator Constraint(GearConstraint value) => Jolt.PInvoke.GearConstraint_AsConstraint(value);
|
|
public void Dispose()
|
|
{
|
|
if (IsNull()) return;
|
|
Release();
|
|
}
|
|
}
|
|
}
|