//
// 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
{
///
///
/// Slider constraint settings, used to create a slider constraint
///
///
/// C++:
/// Jolt/Physics/Constraints/SliderConstraint.h:16
///
/// class SliderConstraintSettings final : public TwoBodyConstraintSettings
///
///
[InteropHandle]
public readonly partial struct SliderConstraintSettings : IDisposable
{
public static SliderConstraintSettings Create() => Jolt.PInvoke.SliderConstraintSettings_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);
///
///
/// Simple way of setting the slider and normal axis in world space (assumes the bodies are already oriented
/// correctly when the constraint is created)
///
///
/// C++:
/// Jolt/Physics/Constraints/SliderConstraint.h:29
///
/// void SetSliderAxis(Vec3Arg inSliderAxis)
///
///
public void SetSliderAxis(float3 sliderAxis) =>
Jolt.PInvoke.SliderConstraintSettings_SetSliderAxis(this, sliderAxis);
///
///
/// This determines in which space the constraint is setup, all properties below should be in the specified
/// space
///
///
/// C++:
/// Jolt/Physics/Constraints/SliderConstraint.h:32
///
/// EConstraintSpace mSpace = EConstraintSpace::WorldSpace
///
///
public ConstraintSpace GetSpace() => Jolt.PInvoke.SliderConstraintSettings_GetSpace(this);
///
///
/// This determines in which space the constraint is setup, all properties below should be in the specified
/// space
///
///
/// C++:
/// Jolt/Physics/Constraints/SliderConstraint.h:32
///
/// EConstraintSpace mSpace = EConstraintSpace::WorldSpace
///
///
public void SetSpace(ConstraintSpace value) => Jolt.PInvoke.SliderConstraintSettings_SetSpace(this, value);
///
///
/// When mSpace is WorldSpace mPoint1 and mPoint2 can be automatically calculated based on the positions of
/// the bodies when the constraint is created (the current relative position/orientation is chosen as the
/// '0' position). Set this to false if you want to supply the attachment points yourself.
///
///
/// C++:
/// Jolt/Physics/Constraints/SliderConstraint.h:35
///
/// bool mAutoDetectPoint = false
///
///
public bool GetAutoDetectPoint() => Jolt.PInvoke.SliderConstraintSettings_GetAutoDetectPoint(this);
///
///
/// When mSpace is WorldSpace mPoint1 and mPoint2 can be automatically calculated based on the positions of
/// the bodies when the constraint is created (the current relative position/orientation is chosen as the
/// '0' position). Set this to false if you want to supply the attachment points yourself.
///
///
/// C++:
/// Jolt/Physics/Constraints/SliderConstraint.h:35
///
/// bool mAutoDetectPoint = false
///
///
public void SetAutoDetectPoint(bool value) =>
Jolt.PInvoke.SliderConstraintSettings_SetAutoDetectPoint(this, value);
///
///
/// Body 1 constraint reference frame (space determined by mSpace). Slider axis is the axis along which
/// movement is possible (direction), normal axis is a perpendicular vector to define the frame.
///
///
/// C++:
/// Jolt/Physics/Constraints/SliderConstraint.h:39
///
/// RVec3 mPoint1 = RVec3::sZero()
///
///
public float3 GetPoint1() => Jolt.PInvoke.SliderConstraintSettings_GetPoint1(this);
///
///
/// Body 1 constraint reference frame (space determined by mSpace). Slider axis is the axis along which
/// movement is possible (direction), normal axis is a perpendicular vector to define the frame.
///
///
/// C++:
/// Jolt/Physics/Constraints/SliderConstraint.h:39
///
/// RVec3 mPoint1 = RVec3::sZero()
///
///
public void SetPoint1(float3 value) => Jolt.PInvoke.SliderConstraintSettings_SetPoint1(this, value);
///
///
/// C++:
/// Jolt/Physics/Constraints/SliderConstraint.h:40
///
/// Vec3 mSliderAxis1 = Vec3::sAxisX()
///
///
public float3 GetSliderAxis1() => Jolt.PInvoke.SliderConstraintSettings_GetSliderAxis1(this);
///
///
/// C++:
/// Jolt/Physics/Constraints/SliderConstraint.h:40
///
/// Vec3 mSliderAxis1 = Vec3::sAxisX()
///
///
public void SetSliderAxis1(float3 value) => Jolt.PInvoke.SliderConstraintSettings_SetSliderAxis1(this, value);
///
///
/// C++:
/// Jolt/Physics/Constraints/SliderConstraint.h:41
///
/// Vec3 mNormalAxis1 = Vec3::sAxisY()
///
///
public float3 GetNormalAxis1() => Jolt.PInvoke.SliderConstraintSettings_GetNormalAxis1(this);
///
///
/// C++:
/// Jolt/Physics/Constraints/SliderConstraint.h:41
///
/// Vec3 mNormalAxis1 = Vec3::sAxisY()
///
///
public void SetNormalAxis1(float3 value) => Jolt.PInvoke.SliderConstraintSettings_SetNormalAxis1(this, value);
///
///
/// Body 2 constraint reference frame (space determined by mSpace)
///
///
/// C++:
/// Jolt/Physics/Constraints/SliderConstraint.h:44
///
/// RVec3 mPoint2 = RVec3::sZero()
///
///
public float3 GetPoint2() => Jolt.PInvoke.SliderConstraintSettings_GetPoint2(this);
///
///
/// Body 2 constraint reference frame (space determined by mSpace)
///
///
/// C++:
/// Jolt/Physics/Constraints/SliderConstraint.h:44
///
/// RVec3 mPoint2 = RVec3::sZero()
///
///
public void SetPoint2(float3 value) => Jolt.PInvoke.SliderConstraintSettings_SetPoint2(this, value);
///
///
/// C++:
/// Jolt/Physics/Constraints/SliderConstraint.h:45
///
/// Vec3 mSliderAxis2 = Vec3::sAxisX()
///
///
public float3 GetSliderAxis2() => Jolt.PInvoke.SliderConstraintSettings_GetSliderAxis2(this);
///
///
/// C++:
/// Jolt/Physics/Constraints/SliderConstraint.h:45
///
/// Vec3 mSliderAxis2 = Vec3::sAxisX()
///
///
public void SetSliderAxis2(float3 value) => Jolt.PInvoke.SliderConstraintSettings_SetSliderAxis2(this, value);
///
///
/// C++:
/// Jolt/Physics/Constraints/SliderConstraint.h:46
///
/// Vec3 mNormalAxis2 = Vec3::sAxisY()
///
///
public float3 GetNormalAxis2() => Jolt.PInvoke.SliderConstraintSettings_GetNormalAxis2(this);
///
///
/// C++:
/// Jolt/Physics/Constraints/SliderConstraint.h:46
///
/// Vec3 mNormalAxis2 = Vec3::sAxisY()
///
///
public void SetNormalAxis2(float3 value) => Jolt.PInvoke.SliderConstraintSettings_SetNormalAxis2(this, value);
///
///
/// When the bodies move so that mPoint1 coincides with mPoint2 the slider position is defined to be 0,
/// movement will be limited between [mLimitsMin, mLimitsMax] where mLimitsMin e [-inf, 0] and mLimitsMax e
/// [0, inf]
///
///
/// C++:
/// Jolt/Physics/Constraints/SliderConstraint.h:49
///
/// float mLimitsMin = -FLT_MAX
///
///
public float GetLimitsMin() => Jolt.PInvoke.SliderConstraintSettings_GetLimitsMin(this);
///
///
/// When the bodies move so that mPoint1 coincides with mPoint2 the slider position is defined to be 0,
/// movement will be limited between [mLimitsMin, mLimitsMax] where mLimitsMin e [-inf, 0] and mLimitsMax e
/// [0, inf]
///
///
/// C++:
/// Jolt/Physics/Constraints/SliderConstraint.h:49
///
/// float mLimitsMin = -FLT_MAX
///
///
public void SetLimitsMin(float value) => Jolt.PInvoke.SliderConstraintSettings_SetLimitsMin(this, value);
///
///
/// C++:
/// Jolt/Physics/Constraints/SliderConstraint.h:50
///
/// float mLimitsMax = FLT_MAX
///
///
public float GetLimitsMax() => Jolt.PInvoke.SliderConstraintSettings_GetLimitsMax(this);
///
///
/// C++:
/// Jolt/Physics/Constraints/SliderConstraint.h:50
///
/// float mLimitsMax = FLT_MAX
///
///
public void SetLimitsMax(float value) => Jolt.PInvoke.SliderConstraintSettings_SetLimitsMax(this, value);
///
///
/// When enabled, this makes the limits soft. When the constraint exceeds the limits, a spring force will
/// pull it back.
///
///
/// C++:
/// Jolt/Physics/Constraints/SliderConstraint.h:53
///
/// SpringSettings mLimitsSpringSettings
///
///
///
///
/// The returned handle is an owned copy; Dispose it when you're done with it.
///
///
public SpringSettings GetLimitsSpringSettings() =>
Jolt.PInvoke.SliderConstraintSettings_GetLimitsSpringSettings(this);
///
///
/// When enabled, this makes the limits soft. When the constraint exceeds the limits, a spring force will
/// pull it back.
///
///
/// C++:
/// Jolt/Physics/Constraints/SliderConstraint.h:53
///
/// SpringSettings mLimitsSpringSettings
///
///
///
///
/// The value is copied into the field; the handle you pass stays yours to Dispose.
///
///
public void SetLimitsSpringSettings(SpringSettings value) =>
Jolt.PInvoke.SliderConstraintSettings_SetLimitsSpringSettings(this, value);
///
///
/// Maximum amount of friction force to apply (N) when not driven by a motor.
///
///
/// C++:
/// Jolt/Physics/Constraints/SliderConstraint.h:56
///
/// float mMaxFrictionForce = 0.0f
///
///
public float GetMaxFrictionForce() => Jolt.PInvoke.SliderConstraintSettings_GetMaxFrictionForce(this);
///
///
/// Maximum amount of friction force to apply (N) when not driven by a motor.
///
///
/// C++:
/// Jolt/Physics/Constraints/SliderConstraint.h:56
///
/// float mMaxFrictionForce = 0.0f
///
///
public void SetMaxFrictionForce(float value) =>
Jolt.PInvoke.SliderConstraintSettings_SetMaxFrictionForce(this, value);
///
///
/// In case the constraint is powered, this determines the motor settings around the sliding axis
///
///
/// C++:
/// Jolt/Physics/Constraints/SliderConstraint.h:59
///
/// MotorSettings mMotorSettings
///
///
///
///
/// The returned handle is an owned copy; Dispose it when you're done with it.
///
///
public MotorSettings GetMotorSettings() => Jolt.PInvoke.SliderConstraintSettings_GetMotorSettings(this);
///
///
/// In case the constraint is powered, this determines the motor settings around the sliding axis
///
///
/// C++:
/// Jolt/Physics/Constraints/SliderConstraint.h:59
///
/// MotorSettings mMotorSettings
///
///
///
///
/// The value is copied into the field; the handle you pass stays yours to Dispose.
///
///
public void SetMotorSettings(MotorSettings value) =>
Jolt.PInvoke.SliderConstraintSettings_SetMotorSettings(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(SliderConstraintSettings value) =>
Unsafe.BitCast(value);
public static implicit operator ConstraintSettings(SliderConstraintSettings 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);
}
}