// // 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/SliderConstraint.h:16 ///
/// class SliderConstraintSettings final : public TwoBodyConstraintSettings ///
///
/// /// /// Slider constraint settings, used to create a slider constraint /// /// [InteropHandle] public readonly partial struct SliderConstraintSettings : IDisposable { public static SliderConstraintSettings Create() => Jolt.PInvoke.SliderConstraintSettings_Create(); /// /// /// C++: /// Jolt/Physics/Constraints/SliderConstraint.h:18 ///
/// ///
///
/// /// /// The returned handle is borrowed from its owner; don't Dispose it. /// /// public RTTI GetRTTI() => Jolt.PInvoke.SliderConstraintSettings_GetRTTI(this); /// /// /// C++: /// Jolt/Physics/Constraints/SliderConstraint.h:18 ///
/// ///
///
public unsafe Ptr CastTo(RTTI rTTI) => Jolt.PInvoke.SliderConstraintSettings_CastTo(this, rTTI); /// /// /// C++: /// Jolt/Physics/Constraints/SliderConstraint.h:22 ///
/// virtual void SaveBinaryState(StreamOut &inStream) const override ///
///
/// /// /// See: ConstraintSettings::SaveBinaryState /// /// public void SaveBinaryState(StreamOut stream) => Jolt.PInvoke.SliderConstraintSettings_SaveBinaryState(this, stream); /// /// /// C++: /// Jolt/Physics/Constraints/SliderConstraint.h:26 ///
/// virtual TwoBodyConstraint * Create(Body &inBody1, Body &inBody2) const override ///
///
/// /// /// Create an instance of this constraint. /// Note that the rotation constraint will be solved from body 1. This means that if body 1 and body 2 have different masses / inertias (kinematic body = infinite mass / inertia), body 1 should be the heaviest body. /// /// public TwoBodyConstraint Create(Body body1, Body body2) => Jolt.PInvoke.SliderConstraintSettings_Create_2(this, body1, body2); /// /// /// C++: /// Jolt/Physics/Constraints/SliderConstraint.h:29 ///
/// void SetSliderAxis(Vec3Arg inSliderAxis) ///
///
/// /// /// Simple way of setting the slider and normal axis in world space (assumes the bodies are already oriented /// correctly when the constraint is created) /// /// public void SetSliderAxis(float3 sliderAxis) => Jolt.PInvoke.SliderConstraintSettings_SetSliderAxis(this, sliderAxis); /// /// /// C++: /// Jolt/Physics/Constraints/SliderConstraint.h:32 ///
/// 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.SliderConstraintSettings_GetSpace(this); /// /// /// C++: /// Jolt/Physics/Constraints/SliderConstraint.h:32 ///
/// 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.SliderConstraintSettings_SetSpace(this, value); /// /// /// C++: /// Jolt/Physics/Constraints/SliderConstraint.h:35 ///
/// bool mAutoDetectPoint = false ///
///
/// /// /// 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. /// /// public bool GetAutoDetectPoint() => Jolt.PInvoke.SliderConstraintSettings_GetAutoDetectPoint(this); /// /// /// C++: /// Jolt/Physics/Constraints/SliderConstraint.h:35 ///
/// bool mAutoDetectPoint = false ///
///
/// /// /// 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. /// /// public void SetAutoDetectPoint(bool value) => Jolt.PInvoke.SliderConstraintSettings_SetAutoDetectPoint(this, value); /// /// /// C++: /// Jolt/Physics/Constraints/SliderConstraint.h:39 ///
/// RVec3 mPoint1 = RVec3::sZero() ///
///
/// /// /// 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. /// /// public float3 GetPoint1() => Jolt.PInvoke.SliderConstraintSettings_GetPoint1(this); /// /// /// C++: /// Jolt/Physics/Constraints/SliderConstraint.h:39 ///
/// RVec3 mPoint1 = RVec3::sZero() ///
///
/// /// /// 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. /// /// 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); /// /// /// C++: /// Jolt/Physics/Constraints/SliderConstraint.h:44 ///
/// RVec3 mPoint2 = RVec3::sZero() ///
///
/// /// /// Body 2 constraint reference frame (space determined by mSpace) /// /// public float3 GetPoint2() => Jolt.PInvoke.SliderConstraintSettings_GetPoint2(this); /// /// /// C++: /// Jolt/Physics/Constraints/SliderConstraint.h:44 ///
/// RVec3 mPoint2 = RVec3::sZero() ///
///
/// /// /// Body 2 constraint reference frame (space determined by mSpace) /// /// 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); /// /// /// C++: /// Jolt/Physics/Constraints/SliderConstraint.h:49 ///
/// float mLimitsMin = -FLT_MAX ///
///
/// /// /// 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] /// /// public float GetLimitsMin() => Jolt.PInvoke.SliderConstraintSettings_GetLimitsMin(this); /// /// /// C++: /// Jolt/Physics/Constraints/SliderConstraint.h:49 ///
/// float mLimitsMin = -FLT_MAX ///
///
/// /// /// 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] /// /// 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); /// /// /// C++: /// Jolt/Physics/Constraints/SliderConstraint.h:56 ///
/// float mMaxFrictionForce = 0.0f ///
///
/// /// /// Maximum amount of friction force to apply (N) when not driven by a motor. /// /// public float GetMaxFrictionForce() => Jolt.PInvoke.SliderConstraintSettings_GetMaxFrictionForce(this); /// /// /// C++: /// Jolt/Physics/Constraints/SliderConstraint.h:56 ///
/// float mMaxFrictionForce = 0.0f ///
///
/// /// /// Maximum amount of friction force to apply (N) when not driven by a motor. /// /// public void SetMaxFrictionForce(float value) => Jolt.PInvoke.SliderConstraintSettings_SetMaxFrictionForce(this, value); public void AddRef() => Jolt.PInvoke.SliderConstraintSettings_AddRef(this); public void Release() => Jolt.PInvoke.SliderConstraintSettings_Release(this); public uint GetRefCount() => Jolt.PInvoke.SliderConstraintSettings_GetRefCount(this); public static implicit operator TwoBodyConstraintSettings(SliderConstraintSettings value) => Jolt.PInvoke.SliderConstraintSettings_AsTwoBodyConstraintSettings(value); public static implicit operator ConstraintSettings(SliderConstraintSettings value) => Jolt.PInvoke.SliderConstraintSettings_AsConstraintSettings(value); public void Dispose() { if (IsNull()) return; Release(); } } }