// // 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/RackAndPinionConstraint.h:13 ///
/// class RackAndPinionConstraintSettings final : public TwoBodyConstraintSettings ///
///
/// /// /// Rack and pinion constraint (slider & gear) settings /// /// [InteropHandle] public readonly partial struct RackAndPinionConstraintSettings : IDisposable { public static RackAndPinionConstraintSettings Create() => Jolt.PInvoke.RackAndPinionConstraintSettings_Create(); /// /// /// C++: /// Jolt/Physics/Constraints/RackAndPinionConstraint.h:15 ///
/// ///
///
/// /// /// The returned handle is borrowed from its owner; don't Dispose it. /// /// public RTTI GetRTTI() => Jolt.PInvoke.RackAndPinionConstraintSettings_GetRTTI(this); /// /// /// C++: /// Jolt/Physics/Constraints/RackAndPinionConstraint.h:15 ///
/// ///
///
public unsafe Ptr CastTo(RTTI rTTI) => Jolt.PInvoke.RackAndPinionConstraintSettings_CastTo(this, rTTI); /// /// /// C++: /// Jolt/Physics/Constraints/RackAndPinionConstraint.h:19 ///
/// virtual void SaveBinaryState(StreamOut &inStream) const override ///
///
/// /// /// See: ConstraintSettings::SaveBinaryState /// /// public void SaveBinaryState(StreamOut stream) => Jolt.PInvoke.RackAndPinionConstraintSettings_SaveBinaryState(this, stream); /// /// /// C++: /// Jolt/Physics/Constraints/RackAndPinionConstraint.h:23 ///
/// virtual TwoBodyConstraint * Create(Body &inBody1, Body &inBody2) const override ///
///
/// /// /// Create an instance of this constraint. /// Body1 should be the pinion (gear) and body 2 the rack (slider). /// /// public TwoBodyConstraint Create(Body body1, Body body2) => Jolt.PInvoke.RackAndPinionConstraintSettings_Create_2(this, body1, body2); /// /// /// C++: /// Jolt/Physics/Constraints/RackAndPinionConstraint.h:30 ///
/// void SetRatio(int inNumTeethRack, float inRackLength, int inNumTeethPinion) ///
///
/// /// /// Defines the ratio between the rotation of the pinion and the translation of the rack. /// The ratio is defined as: PinionRotation(t) = ratio * RackTranslation(t) /// @param inNumTeethRack Number of teeth that the rack has /// @param inRackLength Length of the rack /// @param inNumTeethPinion Number of teeth the pinion has /// /// public void SetRatio(int numTeethRack, float rackLength, int numTeethPinion) => Jolt.PInvoke.RackAndPinionConstraintSettings_SetRatio(this, numTeethRack, rackLength, numTeethPinion); /// /// /// C++: /// Jolt/Physics/Constraints/RackAndPinionConstraint.h:36 ///
/// 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.RackAndPinionConstraintSettings_GetSpace(this); /// /// /// C++: /// Jolt/Physics/Constraints/RackAndPinionConstraint.h:36 ///
/// 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.RackAndPinionConstraintSettings_SetSpace(this, value); /// /// /// C++: /// Jolt/Physics/Constraints/RackAndPinionConstraint.h:39 ///
/// Vec3 mHingeAxis = Vec3::sAxisX() ///
///
/// /// /// Body 1 (pinion) constraint reference frame (space determined by mSpace). /// /// public float3 GetHingeAxis() => Jolt.PInvoke.RackAndPinionConstraintSettings_GetHingeAxis(this); /// /// /// C++: /// Jolt/Physics/Constraints/RackAndPinionConstraint.h:39 ///
/// Vec3 mHingeAxis = Vec3::sAxisX() ///
///
/// /// /// Body 1 (pinion) constraint reference frame (space determined by mSpace). /// /// public void SetHingeAxis(float3 value) => Jolt.PInvoke.RackAndPinionConstraintSettings_SetHingeAxis(this, value); /// /// /// C++: /// Jolt/Physics/Constraints/RackAndPinionConstraint.h:42 ///
/// Vec3 mSliderAxis = Vec3::sAxisX() ///
///
/// /// /// Body 2 (rack) constraint reference frame (space determined by mSpace) /// /// public float3 GetSliderAxis() => Jolt.PInvoke.RackAndPinionConstraintSettings_GetSliderAxis(this); /// /// /// C++: /// Jolt/Physics/Constraints/RackAndPinionConstraint.h:42 ///
/// Vec3 mSliderAxis = Vec3::sAxisX() ///
///
/// /// /// Body 2 (rack) constraint reference frame (space determined by mSpace) /// /// public void SetSliderAxis(float3 value) => Jolt.PInvoke.RackAndPinionConstraintSettings_SetSliderAxis(this, value); /// /// /// C++: /// Jolt/Physics/Constraints/RackAndPinionConstraint.h:45 ///
/// float mRatio = 1.0f ///
///
/// /// /// Ratio between the rack and pinion, see SetRatio. /// /// public float GetRatio() => Jolt.PInvoke.RackAndPinionConstraintSettings_GetRatio(this); /// /// /// C++: /// Jolt/Physics/Constraints/RackAndPinionConstraint.h:45 ///
/// float mRatio = 1.0f ///
///
/// /// /// Ratio between the rack and pinion, see SetRatio. /// /// public void SetRatio(float value) => Jolt.PInvoke.RackAndPinionConstraintSettings_SetRatio_2(this, value); public void AddRef() => Jolt.PInvoke.RackAndPinionConstraintSettings_AddRef(this); public void Release() => Jolt.PInvoke.RackAndPinionConstraintSettings_Release(this); public uint GetRefCount() => Jolt.PInvoke.RackAndPinionConstraintSettings_GetRefCount(this); public static implicit operator TwoBodyConstraintSettings(RackAndPinionConstraintSettings value) => Jolt.PInvoke.RackAndPinionConstraintSettings_AsTwoBodyConstraintSettings(value); public static implicit operator ConstraintSettings(RackAndPinionConstraintSettings value) => Jolt.PInvoke.RackAndPinionConstraintSettings_AsConstraintSettings(value); public void Dispose() { if (IsNull()) return; Release(); } } }