mirror of
https://github.com/ahwootech/BRUTAL.git
synced 2026-11-25 20:48:24 +01:00
271 lines
13 KiB
C#
271 lines
13 KiB
C#
// <auto-generated/>
|
|
// 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
|
|
{
|
|
/// <summary>
|
|
/// <para>
|
|
/// Distance constraint settings, used to create a distance constraint
|
|
/// </para>
|
|
/// <para>
|
|
/// C++:
|
|
/// <see href="https://github.com/jrouwe/JoltPhysics/blob/e77f175595e64cb44218cc9d9d56fc365ad0e36a/Jolt/Physics/Constraints/DistanceConstraint.h#L13">Jolt/Physics/Constraints/DistanceConstraint.h:13</see>
|
|
/// <br/>
|
|
/// <c>class DistanceConstraintSettings final : public TwoBodyConstraintSettings</c>
|
|
/// </para>
|
|
/// </summary>
|
|
[InteropHandle]
|
|
public readonly partial struct DistanceConstraintSettings : IDisposable
|
|
{
|
|
public static DistanceConstraintSettings Create() => Jolt.PInvoke.DistanceConstraintSettings_Create();
|
|
|
|
/// <inheritdoc cref="ConstraintSettings.GetRTTI()"/>
|
|
public RTTI GetRTTI() => ((ConstraintSettings)this).GetRTTI();
|
|
|
|
/// <inheritdoc cref="ConstraintSettings.CastTo(RTTI)"/>
|
|
public unsafe Ptr CastTo(RTTI rtti) => ((ConstraintSettings)this).CastTo(rtti);
|
|
|
|
/// <inheritdoc cref="ConstraintSettings.SaveBinaryState(StreamOut)"/>
|
|
public void SaveBinaryState(StreamOut stream) => ((ConstraintSettings)this).SaveBinaryState(stream);
|
|
|
|
/// <inheritdoc cref="TwoBodyConstraintSettings.Create(Body, Body)"/>
|
|
public TwoBodyConstraint Create(Body body1, Body body2) =>
|
|
((TwoBodyConstraintSettings)this).Create(body1, body2);
|
|
|
|
/// <summary>
|
|
/// <para>
|
|
/// This determines in which space the constraint is setup, all properties below should be in the specified
|
|
/// space
|
|
/// </para>
|
|
/// <para>
|
|
/// C++:
|
|
/// <see href="https://github.com/jrouwe/JoltPhysics/blob/e77f175595e64cb44218cc9d9d56fc365ad0e36a/Jolt/Physics/Constraints/DistanceConstraint.h#L25">Jolt/Physics/Constraints/DistanceConstraint.h:25</see>
|
|
/// <br/>
|
|
/// <c>EConstraintSpace mSpace = EConstraintSpace::WorldSpace</c>
|
|
/// </para>
|
|
/// </summary>
|
|
public ConstraintSpace GetSpace() => Jolt.PInvoke.DistanceConstraintSettings_GetSpace(this);
|
|
|
|
/// <summary>
|
|
/// <para>
|
|
/// This determines in which space the constraint is setup, all properties below should be in the specified
|
|
/// space
|
|
/// </para>
|
|
/// <para>
|
|
/// C++:
|
|
/// <see href="https://github.com/jrouwe/JoltPhysics/blob/e77f175595e64cb44218cc9d9d56fc365ad0e36a/Jolt/Physics/Constraints/DistanceConstraint.h#L25">Jolt/Physics/Constraints/DistanceConstraint.h:25</see>
|
|
/// <br/>
|
|
/// <c>EConstraintSpace mSpace = EConstraintSpace::WorldSpace</c>
|
|
/// </para>
|
|
/// </summary>
|
|
public void SetSpace(ConstraintSpace value) => Jolt.PInvoke.DistanceConstraintSettings_SetSpace(this, value);
|
|
|
|
/// <summary>
|
|
/// <para>
|
|
/// Body 1 constraint reference frame (space determined by mSpace). Constraint will keep mPoint1 (a point on
|
|
/// body 1) and mPoint2 (a point on body 2) at the same distance. Note that this constraint can be used as a
|
|
/// cheap PointConstraint by setting mPoint1 = mPoint2 (but this removes only 1 degree of freedom instead of
|
|
/// 3).
|
|
/// </para>
|
|
/// <para>
|
|
/// C++:
|
|
/// <see href="https://github.com/jrouwe/JoltPhysics/blob/e77f175595e64cb44218cc9d9d56fc365ad0e36a/Jolt/Physics/Constraints/DistanceConstraint.h#L30">Jolt/Physics/Constraints/DistanceConstraint.h:30</see>
|
|
/// <br/>
|
|
/// <c>RVec3 mPoint1 = RVec3::sZero()</c>
|
|
/// </para>
|
|
/// </summary>
|
|
public float3 GetPoint1() => Jolt.PInvoke.DistanceConstraintSettings_GetPoint1(this);
|
|
|
|
/// <summary>
|
|
/// <para>
|
|
/// Body 1 constraint reference frame (space determined by mSpace). Constraint will keep mPoint1 (a point on
|
|
/// body 1) and mPoint2 (a point on body 2) at the same distance. Note that this constraint can be used as a
|
|
/// cheap PointConstraint by setting mPoint1 = mPoint2 (but this removes only 1 degree of freedom instead of
|
|
/// 3).
|
|
/// </para>
|
|
/// <para>
|
|
/// C++:
|
|
/// <see href="https://github.com/jrouwe/JoltPhysics/blob/e77f175595e64cb44218cc9d9d56fc365ad0e36a/Jolt/Physics/Constraints/DistanceConstraint.h#L30">Jolt/Physics/Constraints/DistanceConstraint.h:30</see>
|
|
/// <br/>
|
|
/// <c>RVec3 mPoint1 = RVec3::sZero()</c>
|
|
/// </para>
|
|
/// </summary>
|
|
public void SetPoint1(float3 value) => Jolt.PInvoke.DistanceConstraintSettings_SetPoint1(this, value);
|
|
|
|
/// <summary>
|
|
/// <para>
|
|
/// Body 2 constraint reference frame (space determined by mSpace)
|
|
/// </para>
|
|
/// <para>
|
|
/// C++:
|
|
/// <see href="https://github.com/jrouwe/JoltPhysics/blob/e77f175595e64cb44218cc9d9d56fc365ad0e36a/Jolt/Physics/Constraints/DistanceConstraint.h#L33">Jolt/Physics/Constraints/DistanceConstraint.h:33</see>
|
|
/// <br/>
|
|
/// <c>RVec3 mPoint2 = RVec3::sZero()</c>
|
|
/// </para>
|
|
/// </summary>
|
|
public float3 GetPoint2() => Jolt.PInvoke.DistanceConstraintSettings_GetPoint2(this);
|
|
|
|
/// <summary>
|
|
/// <para>
|
|
/// Body 2 constraint reference frame (space determined by mSpace)
|
|
/// </para>
|
|
/// <para>
|
|
/// C++:
|
|
/// <see href="https://github.com/jrouwe/JoltPhysics/blob/e77f175595e64cb44218cc9d9d56fc365ad0e36a/Jolt/Physics/Constraints/DistanceConstraint.h#L33">Jolt/Physics/Constraints/DistanceConstraint.h:33</see>
|
|
/// <br/>
|
|
/// <c>RVec3 mPoint2 = RVec3::sZero()</c>
|
|
/// </para>
|
|
/// </summary>
|
|
public void SetPoint2(float3 value) => Jolt.PInvoke.DistanceConstraintSettings_SetPoint2(this, value);
|
|
|
|
/// <summary>
|
|
/// <para>
|
|
/// Ability to override the distance range at which the two points are kept apart. If the value is negative,
|
|
/// it will be replaced by the distance between mPoint1 and mPoint2 (works only if mSpace is world space).
|
|
/// </para>
|
|
/// <para>
|
|
/// C++:
|
|
/// <see href="https://github.com/jrouwe/JoltPhysics/blob/e77f175595e64cb44218cc9d9d56fc365ad0e36a/Jolt/Physics/Constraints/DistanceConstraint.h#L36">Jolt/Physics/Constraints/DistanceConstraint.h:36</see>
|
|
/// <br/>
|
|
/// <c>float mMinDistance = -1.0f</c>
|
|
/// </para>
|
|
/// </summary>
|
|
public float GetMinDistance() => Jolt.PInvoke.DistanceConstraintSettings_GetMinDistance(this);
|
|
|
|
/// <summary>
|
|
/// <para>
|
|
/// Ability to override the distance range at which the two points are kept apart. If the value is negative,
|
|
/// it will be replaced by the distance between mPoint1 and mPoint2 (works only if mSpace is world space).
|
|
/// </para>
|
|
/// <para>
|
|
/// C++:
|
|
/// <see href="https://github.com/jrouwe/JoltPhysics/blob/e77f175595e64cb44218cc9d9d56fc365ad0e36a/Jolt/Physics/Constraints/DistanceConstraint.h#L36">Jolt/Physics/Constraints/DistanceConstraint.h:36</see>
|
|
/// <br/>
|
|
/// <c>float mMinDistance = -1.0f</c>
|
|
/// </para>
|
|
/// </summary>
|
|
public void SetMinDistance(float value) => Jolt.PInvoke.DistanceConstraintSettings_SetMinDistance(this, value);
|
|
|
|
/// <summary>
|
|
/// <para>
|
|
/// C++:
|
|
/// <see href="https://github.com/jrouwe/JoltPhysics/blob/e77f175595e64cb44218cc9d9d56fc365ad0e36a/Jolt/Physics/Constraints/DistanceConstraint.h#L37">Jolt/Physics/Constraints/DistanceConstraint.h:37</see>
|
|
/// <br/>
|
|
/// <c>float mMaxDistance = -1.0f</c>
|
|
/// </para>
|
|
/// </summary>
|
|
public float GetMaxDistance() => Jolt.PInvoke.DistanceConstraintSettings_GetMaxDistance(this);
|
|
|
|
/// <summary>
|
|
/// <para>
|
|
/// C++:
|
|
/// <see href="https://github.com/jrouwe/JoltPhysics/blob/e77f175595e64cb44218cc9d9d56fc365ad0e36a/Jolt/Physics/Constraints/DistanceConstraint.h#L37">Jolt/Physics/Constraints/DistanceConstraint.h:37</see>
|
|
/// <br/>
|
|
/// <c>float mMaxDistance = -1.0f</c>
|
|
/// </para>
|
|
/// </summary>
|
|
public void SetMaxDistance(float value) => Jolt.PInvoke.DistanceConstraintSettings_SetMaxDistance(this, value);
|
|
|
|
/// <summary>
|
|
/// <para>
|
|
/// When enabled, this makes the limits soft. When the constraint exceeds the limits, a spring force will
|
|
/// pull it back.
|
|
/// </para>
|
|
/// <para>
|
|
/// C++:
|
|
/// <see href="https://github.com/jrouwe/JoltPhysics/blob/e77f175595e64cb44218cc9d9d56fc365ad0e36a/Jolt/Physics/Constraints/DistanceConstraint.h#L40">Jolt/Physics/Constraints/DistanceConstraint.h:40</see>
|
|
/// <br/>
|
|
/// <c>SpringSettings mLimitsSpringSettings</c>
|
|
/// </para>
|
|
/// </summary>
|
|
/// <remarks>
|
|
/// <para>
|
|
/// The returned handle is an owned copy; Dispose it when you're done with it.
|
|
/// </para>
|
|
/// </remarks>
|
|
public SpringSettings GetLimitsSpringSettings() =>
|
|
Jolt.PInvoke.DistanceConstraintSettings_GetLimitsSpringSettings(this);
|
|
|
|
/// <summary>
|
|
/// <para>
|
|
/// When enabled, this makes the limits soft. When the constraint exceeds the limits, a spring force will
|
|
/// pull it back.
|
|
/// </para>
|
|
/// <para>
|
|
/// C++:
|
|
/// <see href="https://github.com/jrouwe/JoltPhysics/blob/e77f175595e64cb44218cc9d9d56fc365ad0e36a/Jolt/Physics/Constraints/DistanceConstraint.h#L40">Jolt/Physics/Constraints/DistanceConstraint.h:40</see>
|
|
/// <br/>
|
|
/// <c>SpringSettings mLimitsSpringSettings</c>
|
|
/// </para>
|
|
/// </summary>
|
|
/// <remarks>
|
|
/// <para>
|
|
/// The value is copied into the field; the handle you pass stays yours to Dispose.
|
|
/// </para>
|
|
/// </remarks>
|
|
public void SetLimitsSpringSettings(SpringSettings value) =>
|
|
Jolt.PInvoke.DistanceConstraintSettings_SetLimitsSpringSettings(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(DistanceConstraintSettings value) =>
|
|
Unsafe.BitCast<DistanceConstraintSettings, TwoBodyConstraintSettings>(value);
|
|
|
|
public static implicit operator ConstraintSettings(DistanceConstraintSettings value) =>
|
|
Unsafe.BitCast<DistanceConstraintSettings, ConstraintSettings>(value);
|
|
|
|
public void Dispose()
|
|
{
|
|
if (IsNull())
|
|
return;
|
|
Release();
|
|
}
|
|
|
|
/// <inheritdoc cref="ConstraintSettings.GetEnabled()"/>
|
|
public bool GetEnabled() => ((ConstraintSettings)this).GetEnabled();
|
|
|
|
/// <inheritdoc cref="ConstraintSettings.SetEnabled(bool)"/>
|
|
public void SetEnabled(bool value) => ((ConstraintSettings)this).SetEnabled(value);
|
|
|
|
/// <inheritdoc cref="ConstraintSettings.GetConstraintPriority()"/>
|
|
public uint GetConstraintPriority() => ((ConstraintSettings)this).GetConstraintPriority();
|
|
|
|
/// <inheritdoc cref="ConstraintSettings.SetConstraintPriority(uint)"/>
|
|
public void SetConstraintPriority(uint value) => ((ConstraintSettings)this).SetConstraintPriority(value);
|
|
|
|
/// <inheritdoc cref="ConstraintSettings.GetNumVelocityStepsOverride()"/>
|
|
public uint GetNumVelocityStepsOverride() => ((ConstraintSettings)this).GetNumVelocityStepsOverride();
|
|
|
|
/// <inheritdoc cref="ConstraintSettings.SetNumVelocityStepsOverride(uint)"/>
|
|
public void SetNumVelocityStepsOverride(uint value) =>
|
|
((ConstraintSettings)this).SetNumVelocityStepsOverride(value);
|
|
|
|
/// <inheritdoc cref="ConstraintSettings.GetNumPositionStepsOverride()"/>
|
|
public uint GetNumPositionStepsOverride() => ((ConstraintSettings)this).GetNumPositionStepsOverride();
|
|
|
|
/// <inheritdoc cref="ConstraintSettings.SetNumPositionStepsOverride(uint)"/>
|
|
public void SetNumPositionStepsOverride(uint value) =>
|
|
((ConstraintSettings)this).SetNumPositionStepsOverride(value);
|
|
|
|
/// <inheritdoc cref="ConstraintSettings.GetDrawConstraintSize()"/>
|
|
public float GetDrawConstraintSize() => ((ConstraintSettings)this).GetDrawConstraintSize();
|
|
|
|
/// <inheritdoc cref="ConstraintSettings.SetDrawConstraintSize(float)"/>
|
|
public void SetDrawConstraintSize(float value) => ((ConstraintSettings)this).SetDrawConstraintSize(value);
|
|
|
|
/// <inheritdoc cref="ConstraintSettings.GetUserData()"/>
|
|
public ulong GetUserData() => ((ConstraintSettings)this).GetUserData();
|
|
|
|
/// <inheritdoc cref="ConstraintSettings.SetUserData(ulong)"/>
|
|
public void SetUserData(ulong value) => ((ConstraintSettings)this).SetUserData(value);
|
|
}
|
|
}
|