// // 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:13 ///
/// class GearConstraintSettings final : public TwoBodyConstraintSettings ///
///
/// /// /// Gear constraint settings /// /// [InteropHandle] public readonly partial struct GearConstraintSettings : IDisposable { public static GearConstraintSettings Create() => Jolt.PInvoke.GearConstraintSettings_Create(); /// /// /// C++: /// Jolt/Physics/Constraints/GearConstraint.h:15 ///
/// ///
///
/// /// /// The returned handle is borrowed from its owner; don't Dispose it. /// /// public RTTI GetRTTI() => Jolt.PInvoke.GearConstraintSettings_GetRTTI(this); /// /// /// C++: /// Jolt/Physics/Constraints/GearConstraint.h:15 ///
/// ///
///
public unsafe Ptr CastTo(RTTI rTTI) => Jolt.PInvoke.GearConstraintSettings_CastTo(this, rTTI); /// /// /// C++: /// Jolt/Physics/Constraints/GearConstraint.h:19 ///
/// virtual void SaveBinaryState(StreamOut &inStream) const override ///
///
/// /// /// See: ConstraintSettings::SaveBinaryState /// /// public void SaveBinaryState(StreamOut stream) => Jolt.PInvoke.GearConstraintSettings_SaveBinaryState(this, stream); /// /// /// C++: /// Jolt/Physics/Constraints/GearConstraint.h:22 ///
/// virtual TwoBodyConstraint * Create(Body &inBody1, Body &inBody2) const override ///
///
/// /// /// Create an instance of this constraint. /// /// public TwoBodyConstraint Create(Body body1, Body body2) => Jolt.PInvoke.GearConstraintSettings_Create_2(this, body1, body2); /// /// /// C++: /// Jolt/Physics/Constraints/GearConstraint.h:28 ///
/// void SetRatio(int inNumTeethGear1, int inNumTeethGear2) ///
///
/// /// /// Defines the ratio between the rotation of both gears /// The ratio is defined as: Gear1Rotation(t) = -ratio * Gear2Rotation(t) /// @param inNumTeethGear1 Number of teeth that body 1 has /// @param inNumTeethGear2 Number of teeth that body 2 has /// /// public void SetRatio(int numTeethGear1, int numTeethGear2) => Jolt.PInvoke.GearConstraintSettings_SetRatio(this, numTeethGear1, numTeethGear2); /// /// /// C++: /// Jolt/Physics/Constraints/GearConstraint.h:34 ///
/// EConstraintSpace mSpace = EConstraintSpace::WorldSpace ///
///
/// /// /// This determines in which space the constraint is setup, all properties below should be in the specified /// space /// /// public EConstraintSpace GetSpace() => Jolt.PInvoke.GearConstraintSettings_GetSpace(this); /// /// /// C++: /// Jolt/Physics/Constraints/GearConstraint.h:34 ///
/// EConstraintSpace mSpace = EConstraintSpace::WorldSpace ///
///
/// /// /// This determines in which space the constraint is setup, all properties below should be in the specified /// space /// /// public void SetSpace(EConstraintSpace value) => Jolt.PInvoke.GearConstraintSettings_SetSpace(this, value); /// /// /// C++: /// Jolt/Physics/Constraints/GearConstraint.h:37 ///
/// Vec3 mHingeAxis1 = Vec3::sAxisX() ///
///
/// /// /// Body 1 constraint reference frame (space determined by mSpace). /// /// public float3 GetHingeAxis1() => Jolt.PInvoke.GearConstraintSettings_GetHingeAxis1(this); /// /// /// C++: /// Jolt/Physics/Constraints/GearConstraint.h:37 ///
/// Vec3 mHingeAxis1 = Vec3::sAxisX() ///
///
/// /// /// Body 1 constraint reference frame (space determined by mSpace). /// /// public void SetHingeAxis1(float3 value) => Jolt.PInvoke.GearConstraintSettings_SetHingeAxis1(this, value); /// /// /// C++: /// Jolt/Physics/Constraints/GearConstraint.h:40 ///
/// Vec3 mHingeAxis2 = Vec3::sAxisX() ///
///
/// /// /// Body 2 constraint reference frame (space determined by mSpace) /// /// public float3 GetHingeAxis2() => Jolt.PInvoke.GearConstraintSettings_GetHingeAxis2(this); /// /// /// C++: /// Jolt/Physics/Constraints/GearConstraint.h:40 ///
/// Vec3 mHingeAxis2 = Vec3::sAxisX() ///
///
/// /// /// Body 2 constraint reference frame (space determined by mSpace) /// /// public void SetHingeAxis2(float3 value) => Jolt.PInvoke.GearConstraintSettings_SetHingeAxis2(this, value); /// /// /// C++: /// Jolt/Physics/Constraints/GearConstraint.h:43 ///
/// float mRatio = 1.0f ///
///
/// /// /// Ratio between both gears, see SetRatio. /// /// public float GetRatio() => Jolt.PInvoke.GearConstraintSettings_GetRatio(this); /// /// /// C++: /// Jolt/Physics/Constraints/GearConstraint.h:43 ///
/// float mRatio = 1.0f ///
///
/// /// /// Ratio between both gears, see SetRatio. /// /// public void SetRatio(float value) => Jolt.PInvoke.GearConstraintSettings_SetRatio_2(this, value); public void AddRef() => Jolt.PInvoke.GearConstraintSettings_AddRef(this); public void Release() => Jolt.PInvoke.GearConstraintSettings_Release(this); public uint GetRefCount() => Jolt.PInvoke.GearConstraintSettings_GetRefCount(this); public static implicit operator TwoBodyConstraintSettings(GearConstraintSettings value) => Jolt.PInvoke.GearConstraintSettings_AsTwoBodyConstraintSettings(value); public static implicit operator ConstraintSettings(GearConstraintSettings value) => Jolt.PInvoke.GearConstraintSettings_AsConstraintSettings(value); public void Dispose() { if (IsNull()) return; Release(); } } }