//
// 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/PulleyConstraint.h:18
///
/// class PulleyConstraintSettings final : public TwoBodyConstraintSettings
///
///
///
///
/// 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
///
///
[InteropHandle]
public readonly partial struct PulleyConstraintSettings : IDisposable
{
public static PulleyConstraintSettings Create() => Jolt.PInvoke.PulleyConstraintSettings_Create();
///
///
/// C++:
/// Jolt/Physics/Constraints/PulleyConstraint.h:20
///
///
///
///
///
///
/// The returned handle is borrowed from its owner; don't Dispose it.
///
///
public RTTI GetRTTI() => Jolt.PInvoke.PulleyConstraintSettings_GetRTTI(this);
///
///
/// C++:
/// Jolt/Physics/Constraints/PulleyConstraint.h:20
///
///
///
///
public unsafe Ptr CastTo(RTTI rTTI) => Jolt.PInvoke.PulleyConstraintSettings_CastTo(this, rTTI);
///
///
/// C++:
/// Jolt/Physics/Constraints/PulleyConstraint.h:24
///
/// virtual void SaveBinaryState(StreamOut &inStream) const override
///
///
///
///
/// See: ConstraintSettings::SaveBinaryState
///
///
public void SaveBinaryState(StreamOut stream) => Jolt.PInvoke.PulleyConstraintSettings_SaveBinaryState(this, stream);
///
///
/// C++:
/// Jolt/Physics/Constraints/PulleyConstraint.h:27
///
/// virtual TwoBodyConstraint * Create(Body &inBody1, Body &inBody2) const override
///
///
///
///
/// Create an instance of this constraint
///
///
public TwoBodyConstraint Create(Body body1, Body body2) => Jolt.PInvoke.PulleyConstraintSettings_Create_2(this, body1, body2);
///
///
/// C++:
/// Jolt/Physics/Constraints/PulleyConstraint.h:30
///
/// EConstraintSpace mSpace = EConstraintSpace::WorldSpace
///
///
///
///
/// This determines in which space the constraint is setup, specified properties below should be in the
/// specified space
///
///
public EConstraintSpace GetSpace() => Jolt.PInvoke.PulleyConstraintSettings_GetSpace(this);
///
///
/// C++:
/// Jolt/Physics/Constraints/PulleyConstraint.h:30
///
/// EConstraintSpace mSpace = EConstraintSpace::WorldSpace
///
///
///
///
/// This determines in which space the constraint is setup, specified properties below should be in the
/// specified space
///
///
public void SetSpace(EConstraintSpace value) => Jolt.PInvoke.PulleyConstraintSettings_SetSpace(this, value);
///
///
/// C++:
/// Jolt/Physics/Constraints/PulleyConstraint.h:33
///
/// RVec3 mBodyPoint1 = RVec3::sZero()
///
///
///
///
/// Body 1 constraint attachment point (space determined by mSpace).
///
///
public float3 GetBodyPoint1() => Jolt.PInvoke.PulleyConstraintSettings_GetBodyPoint1(this);
///
///
/// C++:
/// Jolt/Physics/Constraints/PulleyConstraint.h:33
///
/// RVec3 mBodyPoint1 = RVec3::sZero()
///
///
///
///
/// Body 1 constraint attachment point (space determined by mSpace).
///
///
public void SetBodyPoint1(float3 value) => Jolt.PInvoke.PulleyConstraintSettings_SetBodyPoint1(this, value);
///
///
/// C++:
/// Jolt/Physics/Constraints/PulleyConstraint.h:36
///
/// RVec3 mFixedPoint1 = RVec3::sZero()
///
///
///
///
/// Fixed world point to which body 1 is connected (always world space)
///
///
public float3 GetFixedPoint1() => Jolt.PInvoke.PulleyConstraintSettings_GetFixedPoint1(this);
///
///
/// C++:
/// Jolt/Physics/Constraints/PulleyConstraint.h:36
///
/// RVec3 mFixedPoint1 = RVec3::sZero()
///
///
///
///
/// Fixed world point to which body 1 is connected (always world space)
///
///
public void SetFixedPoint1(float3 value) => Jolt.PInvoke.PulleyConstraintSettings_SetFixedPoint1(this, value);
///
///
/// C++:
/// Jolt/Physics/Constraints/PulleyConstraint.h:39
///
/// RVec3 mBodyPoint2 = RVec3::sZero()
///
///
///
///
/// Body 2 constraint attachment point (space determined by mSpace)
///
///
public float3 GetBodyPoint2() => Jolt.PInvoke.PulleyConstraintSettings_GetBodyPoint2(this);
///
///
/// C++:
/// Jolt/Physics/Constraints/PulleyConstraint.h:39
///
/// RVec3 mBodyPoint2 = RVec3::sZero()
///
///
///
///
/// Body 2 constraint attachment point (space determined by mSpace)
///
///
public void SetBodyPoint2(float3 value) => Jolt.PInvoke.PulleyConstraintSettings_SetBodyPoint2(this, value);
///
///
/// C++:
/// Jolt/Physics/Constraints/PulleyConstraint.h:42
///
/// RVec3 mFixedPoint2 = RVec3::sZero()
///
///
///
///
/// Fixed world point to which body 2 is connected (always world space)
///
///
public float3 GetFixedPoint2() => Jolt.PInvoke.PulleyConstraintSettings_GetFixedPoint2(this);
///
///
/// C++:
/// Jolt/Physics/Constraints/PulleyConstraint.h:42
///
/// RVec3 mFixedPoint2 = RVec3::sZero()
///
///
///
///
/// Fixed world point to which body 2 is connected (always world space)
///
///
public void SetFixedPoint2(float3 value) => Jolt.PInvoke.PulleyConstraintSettings_SetFixedPoint2(this, value);
///
///
/// C++:
/// Jolt/Physics/Constraints/PulleyConstraint.h:45
///
/// float mRatio = 1.0f
///
///
///
///
/// Ratio between the two line segments (see formula above), can be used to create a block and tackle
///
///
public float GetRatio() => Jolt.PInvoke.PulleyConstraintSettings_GetRatio(this);
///
///
/// C++:
/// Jolt/Physics/Constraints/PulleyConstraint.h:45
///
/// float mRatio = 1.0f
///
///
///
///
/// Ratio between the two line segments (see formula above), can be used to create a block and tackle
///
///
public void SetRatio(float value) => Jolt.PInvoke.PulleyConstraintSettings_SetRatio(this, value);
///
///
/// C++:
/// Jolt/Physics/Constraints/PulleyConstraint.h:48
///
/// float mMinLength = 0.0f
///
///
///
///
/// 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.
///
///
public float GetMinLength() => Jolt.PInvoke.PulleyConstraintSettings_GetMinLength(this);
///
///
/// C++:
/// Jolt/Physics/Constraints/PulleyConstraint.h:48
///
/// float mMinLength = 0.0f
///
///
///
///
/// 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.
///
///
public void SetMinLength(float value) => Jolt.PInvoke.PulleyConstraintSettings_SetMinLength(this, value);
///
///
/// C++:
/// Jolt/Physics/Constraints/PulleyConstraint.h:51
///
/// float mMaxLength = -1.0f
///
///
///
///
/// 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.
///
///
public float GetMaxLength() => Jolt.PInvoke.PulleyConstraintSettings_GetMaxLength(this);
///
///
/// C++:
/// Jolt/Physics/Constraints/PulleyConstraint.h:51
///
/// float mMaxLength = -1.0f
///
///
///
///
/// 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.
///
///
public void SetMaxLength(float value) => Jolt.PInvoke.PulleyConstraintSettings_SetMaxLength(this, value);
public void AddRef() => Jolt.PInvoke.PulleyConstraintSettings_AddRef(this);
public void Release() => Jolt.PInvoke.PulleyConstraintSettings_Release(this);
public uint GetRefCount() => Jolt.PInvoke.PulleyConstraintSettings_GetRefCount(this);
public static implicit operator TwoBodyConstraintSettings(PulleyConstraintSettings value) => Jolt.PInvoke.PulleyConstraintSettings_AsTwoBodyConstraintSettings(value);
public static implicit operator ConstraintSettings(PulleyConstraintSettings value) => Jolt.PInvoke.PulleyConstraintSettings_AsConstraintSettings(value);
public void Dispose()
{
if (IsNull()) return;
Release();
}
}
}