//
// 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
{
///
///
/// Pulley constraint settings, used to create a pulley constraint. A pulley connects two bodies via two fixed
/// world points to each other similar to a distance constraint. We define Length1 = |BodyPoint1 - FixedPoint1|
/// where Body1 is a point on body 1 in world space and FixedPoint1 a fixed point in world space Length2 =
/// |BodyPoint2 - FixedPoint2| The constraint keeps the two line segments constrained so that MinDistance <=
/// Length1 + Ratio * Length2 <= MaxDistance
///
///
/// C++:
/// Jolt/Physics/Constraints/PulleyConstraint.h:18
///
/// class PulleyConstraintSettings final : public TwoBodyConstraintSettings
///
///
[InteropHandle]
public readonly partial struct PulleyConstraintSettings : IDisposable
{
public static PulleyConstraintSettings Create() => Jolt.PInvoke.PulleyConstraintSettings_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);
///
///
/// This determines in which space the constraint is setup, specified properties below should be in the
/// specified space
///
///
/// C++:
/// Jolt/Physics/Constraints/PulleyConstraint.h:30
///
/// EConstraintSpace mSpace = EConstraintSpace::WorldSpace
///
///
public ConstraintSpace GetSpace() => Jolt.PInvoke.PulleyConstraintSettings_GetSpace(this);
///
///
/// This determines in which space the constraint is setup, specified properties below should be in the
/// specified space
///
///
/// C++:
/// Jolt/Physics/Constraints/PulleyConstraint.h:30
///
/// EConstraintSpace mSpace = EConstraintSpace::WorldSpace
///
///
public void SetSpace(ConstraintSpace value) => Jolt.PInvoke.PulleyConstraintSettings_SetSpace(this, value);
///
///
/// Body 1 constraint attachment point (space determined by mSpace).
///
///
/// C++:
/// Jolt/Physics/Constraints/PulleyConstraint.h:33
///
/// RVec3 mBodyPoint1 = RVec3::sZero()
///
///
public float3 GetBodyPoint1() => Jolt.PInvoke.PulleyConstraintSettings_GetBodyPoint1(this);
///
///
/// Body 1 constraint attachment point (space determined by mSpace).
///
///
/// C++:
/// Jolt/Physics/Constraints/PulleyConstraint.h:33
///
/// RVec3 mBodyPoint1 = RVec3::sZero()
///
///
public void SetBodyPoint1(float3 value) => Jolt.PInvoke.PulleyConstraintSettings_SetBodyPoint1(this, value);
///
///
/// Fixed world point to which body 1 is connected (always world space)
///
///
/// C++:
/// Jolt/Physics/Constraints/PulleyConstraint.h:36
///
/// RVec3 mFixedPoint1 = RVec3::sZero()
///
///
public float3 GetFixedPoint1() => Jolt.PInvoke.PulleyConstraintSettings_GetFixedPoint1(this);
///
///
/// Fixed world point to which body 1 is connected (always world space)
///
///
/// C++:
/// Jolt/Physics/Constraints/PulleyConstraint.h:36
///
/// RVec3 mFixedPoint1 = RVec3::sZero()
///
///
public void SetFixedPoint1(float3 value) => Jolt.PInvoke.PulleyConstraintSettings_SetFixedPoint1(this, value);
///
///
/// Body 2 constraint attachment point (space determined by mSpace)
///
///
/// C++:
/// Jolt/Physics/Constraints/PulleyConstraint.h:39
///
/// RVec3 mBodyPoint2 = RVec3::sZero()
///
///
public float3 GetBodyPoint2() => Jolt.PInvoke.PulleyConstraintSettings_GetBodyPoint2(this);
///
///
/// Body 2 constraint attachment point (space determined by mSpace)
///
///
/// C++:
/// Jolt/Physics/Constraints/PulleyConstraint.h:39
///
/// RVec3 mBodyPoint2 = RVec3::sZero()
///
///
public void SetBodyPoint2(float3 value) => Jolt.PInvoke.PulleyConstraintSettings_SetBodyPoint2(this, value);
///
///
/// Fixed world point to which body 2 is connected (always world space)
///
///
/// C++:
/// Jolt/Physics/Constraints/PulleyConstraint.h:42
///
/// RVec3 mFixedPoint2 = RVec3::sZero()
///
///
public float3 GetFixedPoint2() => Jolt.PInvoke.PulleyConstraintSettings_GetFixedPoint2(this);
///
///
/// Fixed world point to which body 2 is connected (always world space)
///
///
/// C++:
/// Jolt/Physics/Constraints/PulleyConstraint.h:42
///
/// RVec3 mFixedPoint2 = RVec3::sZero()
///
///
public void SetFixedPoint2(float3 value) => Jolt.PInvoke.PulleyConstraintSettings_SetFixedPoint2(this, value);
///
///
/// Ratio between the two line segments (see formula above), can be used to create a block and tackle
///
///
/// C++:
/// Jolt/Physics/Constraints/PulleyConstraint.h:45
///
/// float mRatio = 1.0f
///
///
public float GetRatio() => Jolt.PInvoke.PulleyConstraintSettings_GetRatio(this);
///
///
/// Ratio between the two line segments (see formula above), can be used to create a block and tackle
///
///
/// C++:
/// Jolt/Physics/Constraints/PulleyConstraint.h:45
///
/// float mRatio = 1.0f
///
///
public void SetRatio(float value) => Jolt.PInvoke.PulleyConstraintSettings_SetRatio(this, value);
///
///
/// The minimum length of the line segments (see formula above), use -1 to calculate the length based on the
/// positions of the objects when the constraint is created.
///
///
/// C++:
/// Jolt/Physics/Constraints/PulleyConstraint.h:48
///
/// float mMinLength = 0.0f
///
///
public float GetMinLength() => Jolt.PInvoke.PulleyConstraintSettings_GetMinLength(this);
///
///
/// The minimum length of the line segments (see formula above), use -1 to calculate the length based on the
/// positions of the objects when the constraint is created.
///
///
/// C++:
/// Jolt/Physics/Constraints/PulleyConstraint.h:48
///
/// float mMinLength = 0.0f
///
///
public void SetMinLength(float value) => Jolt.PInvoke.PulleyConstraintSettings_SetMinLength(this, value);
///
///
/// The maximum length of the line segments (see formula above), use -1 to calculate the length based on the
/// positions of the objects when the constraint is created.
///
///
/// C++:
/// Jolt/Physics/Constraints/PulleyConstraint.h:51
///
/// float mMaxLength = -1.0f
///
///
public float GetMaxLength() => Jolt.PInvoke.PulleyConstraintSettings_GetMaxLength(this);
///
///
/// The maximum length of the line segments (see formula above), use -1 to calculate the length based on the
/// positions of the objects when the constraint is created.
///
///
/// C++:
/// Jolt/Physics/Constraints/PulleyConstraint.h:51
///
/// float mMaxLength = -1.0f
///
///
public void SetMaxLength(float value) => Jolt.PInvoke.PulleyConstraintSettings_SetMaxLength(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(PulleyConstraintSettings value) =>
Unsafe.BitCast(value);
public static implicit operator ConstraintSettings(PulleyConstraintSettings 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);
}
}