//
// 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
{
///
///
/// Gear constraint settings
///
///
/// C++:
/// Jolt/Physics/Constraints/GearConstraint.h:13
///
/// class GearConstraintSettings final : public TwoBodyConstraintSettings
///
///
[InteropHandle]
public readonly partial struct GearConstraintSettings : IDisposable
{
public static GearConstraintSettings Create() => Jolt.PInvoke.GearConstraintSettings_Create();
///
public RTTI GetRTTI() => ((ConstraintSettings)this).GetRTTI();
///
public unsafe Ptr CastTo(RTTI rtti) => ((ConstraintSettings)this).CastTo(rtti);
///
public void SaveBinaryState(StreamOut stream) => ((ConstraintSettings)this).SaveBinaryState(stream);
///
public TwoBodyConstraint Create(Body body1, Body body2) =>
((TwoBodyConstraintSettings)this).Create(body1, body2);
///
///
/// Defines the ratio between the rotation of both gears The ratio is defined as: Gear1Rotation(t) = -ratio
/// * Gear2Rotation(t)
///
///
/// 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);
///
///
/// This determines in which space the constraint is setup, all properties below should be in the specified
/// space
///
///
/// C++:
/// Jolt/Physics/Constraints/GearConstraint.h:34
///
/// EConstraintSpace mSpace = EConstraintSpace::WorldSpace
///
///
public ConstraintSpace GetSpace() => Jolt.PInvoke.GearConstraintSettings_GetSpace(this);
///
///
/// This determines in which space the constraint is setup, all properties below should be in the specified
/// space
///
///
/// C++:
/// Jolt/Physics/Constraints/GearConstraint.h:34
///
/// EConstraintSpace mSpace = EConstraintSpace::WorldSpace
///
///
public void SetSpace(ConstraintSpace value) => Jolt.PInvoke.GearConstraintSettings_SetSpace(this, value);
///
///
/// Body 1 constraint reference frame (space determined by mSpace).
///
///
/// C++:
/// Jolt/Physics/Constraints/GearConstraint.h:37
///
/// Vec3 mHingeAxis1 = Vec3::sAxisX()
///
///
public float3 GetHingeAxis1() => Jolt.PInvoke.GearConstraintSettings_GetHingeAxis1(this);
///
///
/// Body 1 constraint reference frame (space determined by mSpace).
///
///
/// C++:
/// Jolt/Physics/Constraints/GearConstraint.h:37
///
/// Vec3 mHingeAxis1 = Vec3::sAxisX()
///
///
public void SetHingeAxis1(float3 value) => Jolt.PInvoke.GearConstraintSettings_SetHingeAxis1(this, value);
///
///
/// Body 2 constraint reference frame (space determined by mSpace)
///
///
/// C++:
/// Jolt/Physics/Constraints/GearConstraint.h:40
///
/// Vec3 mHingeAxis2 = Vec3::sAxisX()
///
///
public float3 GetHingeAxis2() => Jolt.PInvoke.GearConstraintSettings_GetHingeAxis2(this);
///
///
/// Body 2 constraint reference frame (space determined by mSpace)
///
///
/// C++:
/// Jolt/Physics/Constraints/GearConstraint.h:40
///
/// Vec3 mHingeAxis2 = Vec3::sAxisX()
///
///
public void SetHingeAxis2(float3 value) => Jolt.PInvoke.GearConstraintSettings_SetHingeAxis2(this, value);
///
///
/// Ratio between both gears, see SetRatio.
///
///
/// C++:
/// Jolt/Physics/Constraints/GearConstraint.h:43
///
/// float mRatio = 1.0f
///
///
public float GetRatio() => Jolt.PInvoke.GearConstraintSettings_GetRatio(this);
///
///
/// Ratio between both gears, see SetRatio.
///
///
/// C++:
/// Jolt/Physics/Constraints/GearConstraint.h:43
///
/// float mRatio = 1.0f
///
///
public void SetRatio(float value) => Jolt.PInvoke.GearConstraintSettings_SetRatio_2(this, value);
public void AddRef() => ((ConstraintSettings)this).AddRef();
public void Release() => ((ConstraintSettings)this).Release();
public uint GetRefCount() => ((ConstraintSettings)this).GetRefCount();
public static implicit operator TwoBodyConstraintSettings(GearConstraintSettings value) =>
Unsafe.BitCast(value);
public static implicit operator ConstraintSettings(GearConstraintSettings value) =>
Unsafe.BitCast(value);
public void Dispose()
{
if (IsNull())
return;
Release();
}
///
public bool GetEnabled() => ((ConstraintSettings)this).GetEnabled();
///
public void SetEnabled(bool value) => ((ConstraintSettings)this).SetEnabled(value);
///
public uint GetConstraintPriority() => ((ConstraintSettings)this).GetConstraintPriority();
///
public void SetConstraintPriority(uint value) => ((ConstraintSettings)this).SetConstraintPriority(value);
///
public uint GetNumVelocityStepsOverride() => ((ConstraintSettings)this).GetNumVelocityStepsOverride();
///
public void SetNumVelocityStepsOverride(uint value) =>
((ConstraintSettings)this).SetNumVelocityStepsOverride(value);
///
public uint GetNumPositionStepsOverride() => ((ConstraintSettings)this).GetNumPositionStepsOverride();
///
public void SetNumPositionStepsOverride(uint value) =>
((ConstraintSettings)this).SetNumPositionStepsOverride(value);
///
public float GetDrawConstraintSize() => ((ConstraintSettings)this).GetDrawConstraintSize();
///
public void SetDrawConstraintSize(float value) => ((ConstraintSettings)this).SetDrawConstraintSize(value);
///
public ulong GetUserData() => ((ConstraintSettings)this).GetUserData();
///
public void SetUserData(ulong value) => ((ConstraintSettings)this).SetUserData(value);
}
}