// // 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/GearConstraint.h:52 ///
/// class GearConstraint final : public TwoBodyConstraint ///
///
/// /// /// 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. /// /// [InteropHandle] public readonly partial struct GearConstraint : IDisposable { /// /// /// C++: /// Jolt/Physics/Constraints/GearConstraint.h:58 ///
/// GearConstraint(Body &inBody1, Body &inBody2, const GearConstraintSettings &inSettings) ///
///
/// /// /// Construct gear constraint /// /// public static GearConstraint Create(Body body1, Body body2, GearConstraintSettings settings) => Jolt.PInvoke.GearConstraint_Create(body1, body2, settings); /// /// /// C++: /// Jolt/Physics/Constraints/GearConstraint.h:61 ///
/// virtual EConstraintSubType GetSubType() const override ///
///
/// /// /// Generic interface of a constraint /// /// public EConstraintSubType GetSubType() => Jolt.PInvoke.GearConstraint_GetSubType(this); /// /// /// C++: /// Jolt/Physics/Constraints/GearConstraint.h:62 ///
/// virtual void NotifyShapeChanged(const BodyID &inBodyID, Vec3Arg inDeltaCOM) override ///
///
public void NotifyShapeChanged(uint bodyID, float3 deltaCOM) => Jolt.PInvoke.GearConstraint_NotifyShapeChanged(this, bodyID, deltaCOM); /// /// /// C++: /// Jolt/Physics/Constraints/GearConstraint.h:63 ///
/// virtual void SetupVelocityConstraint(float inDeltaTime) override ///
///
public void SetupVelocityConstraint(float deltaTime) => Jolt.PInvoke.GearConstraint_SetupVelocityConstraint(this, deltaTime); /// /// /// C++: /// Jolt/Physics/Constraints/GearConstraint.h:64 ///
/// virtual void ResetWarmStart() override ///
///
public void ResetWarmStart() => Jolt.PInvoke.GearConstraint_ResetWarmStart(this); /// /// /// C++: /// Jolt/Physics/Constraints/GearConstraint.h:65 ///
/// virtual void WarmStartVelocityConstraint(float inWarmStartImpulseRatio) override ///
///
public void WarmStartVelocityConstraint(float warmStartImpulseRatio) => Jolt.PInvoke.GearConstraint_WarmStartVelocityConstraint(this, warmStartImpulseRatio); /// /// /// C++: /// Jolt/Physics/Constraints/GearConstraint.h:66 ///
/// virtual bool SolveVelocityConstraint(float inDeltaTime) override ///
///
public bool SolveVelocityConstraint(float deltaTime) => Jolt.PInvoke.GearConstraint_SolveVelocityConstraint(this, deltaTime); /// /// /// C++: /// Jolt/Physics/Constraints/GearConstraint.h:67 ///
/// virtual bool SolvePositionConstraint(float inDeltaTime, float inBaumgarte) override ///
///
public bool SolvePositionConstraint(float deltaTime, float baumgarte) => Jolt.PInvoke.GearConstraint_SolvePositionConstraint(this, deltaTime, baumgarte); /// /// /// C++: /// Jolt/Physics/Constraints/GearConstraint.h:69 ///
/// virtual void DrawConstraint(DebugRenderer *inRenderer) const override ///
///
public void DrawConstraint(DebugRenderer renderer) => Jolt.PInvoke.GearConstraint_DrawConstraint(this, renderer); /// /// /// C++: /// Jolt/Physics/Constraints/GearConstraint.h:73 ///
/// virtual Ref<ConstraintSettings> GetConstraintSettings() const override ///
///
public ConstraintSettings GetConstraintSettings() => Jolt.PInvoke.GearConstraint_GetConstraintSettings(this); /// /// /// C++: /// Jolt/Physics/Constraints/GearConstraint.h:76 ///
/// virtual Mat44 GetConstraintToBody1Matrix() const override ///
///
/// /// /// See: TwoBodyConstraint /// /// public float4x4 GetConstraintToBody1Matrix() => Jolt.PInvoke.GearConstraint_GetConstraintToBody1Matrix(this); /// /// /// C++: /// Jolt/Physics/Constraints/GearConstraint.h:77 ///
/// virtual Mat44 GetConstraintToBody2Matrix() const override ///
///
public float4x4 GetConstraintToBody2Matrix() => Jolt.PInvoke.GearConstraint_GetConstraintToBody2Matrix(this); /// /// /// C++: /// Jolt/Physics/Constraints/GearConstraint.h:80 ///
/// void SetConstraints(const Constraint *inGear1, const Constraint *inGear2) ///
///
/// /// /// The constraints that constrain both gears (2 hinges), optional and used to calculate the rotation error /// and fix numerical drift. /// /// public void SetConstraints(Constraint gear1, Constraint gear2) => Jolt.PInvoke.GearConstraint_SetConstraints(this, gear1, gear2); /// /// /// C++: /// Jolt/Physics/Constraints/GearConstraint.h:83 ///
/// inline float GetTotalLambda() const ///
///
/// /// /// @name Get Lagrange multiplier from last physics update (the angular impulse applied to satisfy the /// constraint) /// /// 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(); } } }