mirror of
https://github.com/ahwootech/BRUTAL.git
synced 2026-11-25 20:48:24 +01:00
395 lines
19 KiB
C#
395 lines
19 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>
|
|
/// A slider constraint allows movement in only 1 axis (and no rotation). Also known as a prismatic constraint.
|
|
/// </para>
|
|
/// <para>
|
|
/// C++:
|
|
/// <see href="https://github.com/jrouwe/JoltPhysics/blob/e77f175595e64cb44218cc9d9d56fc365ad0e36a/Jolt/Physics/Constraints/SliderConstraint.h#L67">Jolt/Physics/Constraints/SliderConstraint.h:67</see>
|
|
/// <br/>
|
|
/// <c>class SliderConstraint final : public TwoBodyConstraint</c>
|
|
/// </para>
|
|
/// </summary>
|
|
[InteropHandle]
|
|
public readonly partial struct SliderConstraint : IDisposable
|
|
{
|
|
/// <summary>
|
|
/// <para>
|
|
/// Construct slider constraint
|
|
/// </para>
|
|
/// <para>
|
|
/// C++:
|
|
/// <see href="https://github.com/jrouwe/JoltPhysics/blob/e77f175595e64cb44218cc9d9d56fc365ad0e36a/Jolt/Physics/Constraints/SliderConstraint.h#L73">Jolt/Physics/Constraints/SliderConstraint.h:73</see>
|
|
/// <br/>
|
|
/// <c>SliderConstraint(Body &inBody1, Body &inBody2, const SliderConstraintSettings &inSettings)</c>
|
|
/// </para>
|
|
/// </summary>
|
|
public static SliderConstraint Create(Body body1, Body body2, SliderConstraintSettings settings) =>
|
|
Jolt.PInvoke.SliderConstraint_Create(body1, body2, settings);
|
|
|
|
/// <inheritdoc cref="Constraint.GetSubType()"/>
|
|
public ConstraintSubType GetSubType() => ((Constraint)this).GetSubType();
|
|
|
|
/// <inheritdoc cref="Constraint.NotifyShapeChanged(uint, float3)"/>
|
|
public void NotifyShapeChanged(uint bodyID, float3 deltaCOM) =>
|
|
((Constraint)this).NotifyShapeChanged(bodyID, deltaCOM);
|
|
|
|
/// <inheritdoc cref="Constraint.SetupVelocityConstraint(float)"/>
|
|
public void SetupVelocityConstraint(float deltaTime) => ((Constraint)this).SetupVelocityConstraint(deltaTime);
|
|
|
|
/// <inheritdoc cref="Constraint.ResetWarmStart()"/>
|
|
public void ResetWarmStart() => ((Constraint)this).ResetWarmStart();
|
|
|
|
/// <inheritdoc cref="Constraint.WarmStartVelocityConstraint(float)"/>
|
|
public void WarmStartVelocityConstraint(float warmStartImpulseRatio) =>
|
|
((Constraint)this).WarmStartVelocityConstraint(warmStartImpulseRatio);
|
|
|
|
/// <inheritdoc cref="Constraint.SolveVelocityConstraint(float)"/>
|
|
public bool SolveVelocityConstraint(float deltaTime) => ((Constraint)this).SolveVelocityConstraint(deltaTime);
|
|
|
|
/// <inheritdoc cref="Constraint.SolvePositionConstraint(float, float)"/>
|
|
public bool SolvePositionConstraint(float deltaTime, float baumgarte) =>
|
|
((Constraint)this).SolvePositionConstraint(deltaTime, baumgarte);
|
|
|
|
/// <inheritdoc cref="Constraint.DrawConstraint(DebugRenderer)"/>
|
|
public void DrawConstraint(DebugRenderer renderer) => ((Constraint)this).DrawConstraint(renderer);
|
|
|
|
/// <inheritdoc cref="Constraint.DrawConstraintLimits(DebugRenderer)"/>
|
|
public void DrawConstraintLimits(DebugRenderer renderer) => ((Constraint)this).DrawConstraintLimits(renderer);
|
|
|
|
/// <inheritdoc cref="Constraint.GetConstraintSettings()"/>
|
|
public ConstraintSettings GetConstraintSettings() => ((Constraint)this).GetConstraintSettings();
|
|
|
|
/// <inheritdoc cref="TwoBodyConstraint.GetConstraintToBody1Matrix()"/>
|
|
public float4x4 GetConstraintToBody1Matrix() => ((TwoBodyConstraint)this).GetConstraintToBody1Matrix();
|
|
|
|
/// <inheritdoc cref="TwoBodyConstraint.GetConstraintToBody2Matrix()"/>
|
|
public float4x4 GetConstraintToBody2Matrix() => ((TwoBodyConstraint)this).GetConstraintToBody2Matrix();
|
|
|
|
/// <summary>
|
|
/// <para>
|
|
/// Get the current distance from the rest position
|
|
/// </para>
|
|
/// <para>
|
|
/// C++:
|
|
/// <see href="https://github.com/jrouwe/JoltPhysics/blob/e77f175595e64cb44218cc9d9d56fc365ad0e36a/Jolt/Physics/Constraints/SliderConstraint.h#L96">Jolt/Physics/Constraints/SliderConstraint.h:96</see>
|
|
/// <br/>
|
|
/// <c>float GetCurrentPosition() const</c>
|
|
/// </para>
|
|
/// </summary>
|
|
public float GetCurrentPosition() => Jolt.PInvoke.SliderConstraint_GetCurrentPosition(this);
|
|
|
|
/// <summary>
|
|
/// <para>
|
|
/// Friction control
|
|
/// </para>
|
|
/// <para>
|
|
/// C++:
|
|
/// <see href="https://github.com/jrouwe/JoltPhysics/blob/e77f175595e64cb44218cc9d9d56fc365ad0e36a/Jolt/Physics/Constraints/SliderConstraint.h#L99">Jolt/Physics/Constraints/SliderConstraint.h:99</see>
|
|
/// <br/>
|
|
/// <c>void SetMaxFrictionForce(float inFrictionForce)</c>
|
|
/// </para>
|
|
/// </summary>
|
|
public void SetMaxFrictionForce(float frictionForce) =>
|
|
Jolt.PInvoke.SliderConstraint_SetMaxFrictionForce(this, frictionForce);
|
|
|
|
/// <summary>
|
|
/// <para>
|
|
/// C++:
|
|
/// <see href="https://github.com/jrouwe/JoltPhysics/blob/e77f175595e64cb44218cc9d9d56fc365ad0e36a/Jolt/Physics/Constraints/SliderConstraint.h#L100">Jolt/Physics/Constraints/SliderConstraint.h:100</see>
|
|
/// <br/>
|
|
/// <c>float GetMaxFrictionForce() const</c>
|
|
/// </para>
|
|
/// </summary>
|
|
public float GetMaxFrictionForce() => Jolt.PInvoke.SliderConstraint_GetMaxFrictionForce(this);
|
|
|
|
/// <summary>
|
|
/// <para>
|
|
/// Motor settings
|
|
/// </para>
|
|
/// <para>
|
|
/// C++:
|
|
/// <see href="https://github.com/jrouwe/JoltPhysics/blob/e77f175595e64cb44218cc9d9d56fc365ad0e36a/Jolt/Physics/Constraints/SliderConstraint.h#L103">Jolt/Physics/Constraints/SliderConstraint.h:103</see>
|
|
/// <br/>
|
|
/// <c>MotorSettings & GetMotorSettings()</c>
|
|
/// </para>
|
|
/// </summary>
|
|
/// <remarks>
|
|
/// <para>
|
|
/// The returned handle is borrowed from its owner; don't Dispose it.
|
|
/// </para>
|
|
/// </remarks>
|
|
public MotorSettings GetMotorSettings() => Jolt.PInvoke.SliderConstraint_GetMotorSettings(this);
|
|
|
|
/// <summary>
|
|
/// <para>
|
|
/// Motor controls
|
|
/// </para>
|
|
/// <para>
|
|
/// C++:
|
|
/// <see href="https://github.com/jrouwe/JoltPhysics/blob/e77f175595e64cb44218cc9d9d56fc365ad0e36a/Jolt/Physics/Constraints/SliderConstraint.h#L107">Jolt/Physics/Constraints/SliderConstraint.h:107</see>
|
|
/// <br/>
|
|
/// <c>void SetMotorState(EMotorState inState)</c>
|
|
/// </para>
|
|
/// </summary>
|
|
public void SetMotorState(MotorState state) => Jolt.PInvoke.SliderConstraint_SetMotorState(this, state);
|
|
|
|
/// <summary>
|
|
/// <para>
|
|
/// C++:
|
|
/// <see href="https://github.com/jrouwe/JoltPhysics/blob/e77f175595e64cb44218cc9d9d56fc365ad0e36a/Jolt/Physics/Constraints/SliderConstraint.h#L108">Jolt/Physics/Constraints/SliderConstraint.h:108</see>
|
|
/// <br/>
|
|
/// <c>EMotorState GetMotorState() const</c>
|
|
/// </para>
|
|
/// </summary>
|
|
public MotorState GetMotorState() => Jolt.PInvoke.SliderConstraint_GetMotorState(this);
|
|
|
|
/// <summary>
|
|
/// <para>
|
|
/// C++:
|
|
/// <see href="https://github.com/jrouwe/JoltPhysics/blob/e77f175595e64cb44218cc9d9d56fc365ad0e36a/Jolt/Physics/Constraints/SliderConstraint.h#L109">Jolt/Physics/Constraints/SliderConstraint.h:109</see>
|
|
/// <br/>
|
|
/// <c>void SetTargetVelocity(float inVelocity)</c>
|
|
/// </para>
|
|
/// </summary>
|
|
public void SetTargetVelocity(float velocity) =>
|
|
Jolt.PInvoke.SliderConstraint_SetTargetVelocity(this, velocity);
|
|
|
|
/// <summary>
|
|
/// <para>
|
|
/// C++:
|
|
/// <see href="https://github.com/jrouwe/JoltPhysics/blob/e77f175595e64cb44218cc9d9d56fc365ad0e36a/Jolt/Physics/Constraints/SliderConstraint.h#L110">Jolt/Physics/Constraints/SliderConstraint.h:110</see>
|
|
/// <br/>
|
|
/// <c>float GetTargetVelocity() const</c>
|
|
/// </para>
|
|
/// </summary>
|
|
public float GetTargetVelocity() => Jolt.PInvoke.SliderConstraint_GetTargetVelocity(this);
|
|
|
|
/// <summary>
|
|
/// <para>
|
|
/// C++:
|
|
/// <see href="https://github.com/jrouwe/JoltPhysics/blob/e77f175595e64cb44218cc9d9d56fc365ad0e36a/Jolt/Physics/Constraints/SliderConstraint.h#L111">Jolt/Physics/Constraints/SliderConstraint.h:111</see>
|
|
/// <br/>
|
|
/// <c>void SetTargetPosition(float inPosition)</c>
|
|
/// </para>
|
|
/// </summary>
|
|
public void SetTargetPosition(float position) =>
|
|
Jolt.PInvoke.SliderConstraint_SetTargetPosition(this, position);
|
|
|
|
/// <summary>
|
|
/// <para>
|
|
/// C++:
|
|
/// <see href="https://github.com/jrouwe/JoltPhysics/blob/e77f175595e64cb44218cc9d9d56fc365ad0e36a/Jolt/Physics/Constraints/SliderConstraint.h#L112">Jolt/Physics/Constraints/SliderConstraint.h:112</see>
|
|
/// <br/>
|
|
/// <c>float GetTargetPosition() const</c>
|
|
/// </para>
|
|
/// </summary>
|
|
public float GetTargetPosition() => Jolt.PInvoke.SliderConstraint_GetTargetPosition(this);
|
|
|
|
/// <summary>
|
|
/// <para>
|
|
/// Update the limits of the slider constraint (see SliderConstraintSettings)
|
|
/// </para>
|
|
/// <para>
|
|
/// C++:
|
|
/// <see href="https://github.com/jrouwe/JoltPhysics/blob/e77f175595e64cb44218cc9d9d56fc365ad0e36a/Jolt/Physics/Constraints/SliderConstraint.h#L115">Jolt/Physics/Constraints/SliderConstraint.h:115</see>
|
|
/// <br/>
|
|
/// <c>void SetLimits(float inLimitsMin, float inLimitsMax)</c>
|
|
/// </para>
|
|
/// </summary>
|
|
public void SetLimits(float limitsMin, float limitsMax) =>
|
|
Jolt.PInvoke.SliderConstraint_SetLimits(this, limitsMin, limitsMax);
|
|
|
|
/// <summary>
|
|
/// <para>
|
|
/// C++:
|
|
/// <see href="https://github.com/jrouwe/JoltPhysics/blob/e77f175595e64cb44218cc9d9d56fc365ad0e36a/Jolt/Physics/Constraints/SliderConstraint.h#L116">Jolt/Physics/Constraints/SliderConstraint.h:116</see>
|
|
/// <br/>
|
|
/// <c>float GetLimitsMin() const</c>
|
|
/// </para>
|
|
/// </summary>
|
|
public float GetLimitsMin() => Jolt.PInvoke.SliderConstraint_GetLimitsMin(this);
|
|
|
|
/// <summary>
|
|
/// <para>
|
|
/// C++:
|
|
/// <see href="https://github.com/jrouwe/JoltPhysics/blob/e77f175595e64cb44218cc9d9d56fc365ad0e36a/Jolt/Physics/Constraints/SliderConstraint.h#L117">Jolt/Physics/Constraints/SliderConstraint.h:117</see>
|
|
/// <br/>
|
|
/// <c>float GetLimitsMax() const</c>
|
|
/// </para>
|
|
/// </summary>
|
|
public float GetLimitsMax() => Jolt.PInvoke.SliderConstraint_GetLimitsMax(this);
|
|
|
|
/// <summary>
|
|
/// <para>
|
|
/// C++:
|
|
/// <see href="https://github.com/jrouwe/JoltPhysics/blob/e77f175595e64cb44218cc9d9d56fc365ad0e36a/Jolt/Physics/Constraints/SliderConstraint.h#L118">Jolt/Physics/Constraints/SliderConstraint.h:118</see>
|
|
/// <br/>
|
|
/// <c>bool HasLimits() const</c>
|
|
/// </para>
|
|
/// </summary>
|
|
public bool HasLimits() => Jolt.PInvoke.SliderConstraint_HasLimits(this);
|
|
|
|
/// <summary>
|
|
/// <para>
|
|
/// Update the limits spring settings
|
|
/// </para>
|
|
/// <para>
|
|
/// C++:
|
|
/// <see href="https://github.com/jrouwe/JoltPhysics/blob/e77f175595e64cb44218cc9d9d56fc365ad0e36a/Jolt/Physics/Constraints/SliderConstraint.h#L121">Jolt/Physics/Constraints/SliderConstraint.h:121</see>
|
|
/// <br/>
|
|
/// <c>const SpringSettings & GetLimitsSpringSettings() const</c>
|
|
/// </para>
|
|
/// </summary>
|
|
/// <remarks>
|
|
/// <para>
|
|
/// The returned handle is borrowed from its owner; don't Dispose it.
|
|
/// </para>
|
|
/// </remarks>
|
|
public SpringSettings GetLimitsSpringSettings() => Jolt.PInvoke.SliderConstraint_GetLimitsSpringSettings(this);
|
|
|
|
/// <summary>
|
|
/// <para>
|
|
/// C++:
|
|
/// <see href="https://github.com/jrouwe/JoltPhysics/blob/e77f175595e64cb44218cc9d9d56fc365ad0e36a/Jolt/Physics/Constraints/SliderConstraint.h#L123">Jolt/Physics/Constraints/SliderConstraint.h:123</see>
|
|
/// <br/>
|
|
/// <c>void SetLimitsSpringSettings(const SpringSettings &inLimitsSpringSettings)</c>
|
|
/// </para>
|
|
/// </summary>
|
|
public void SetLimitsSpringSettings(SpringSettings limitsSpringSettings) =>
|
|
Jolt.PInvoke.SliderConstraint_SetLimitsSpringSettings(this, limitsSpringSettings);
|
|
|
|
/// <summary>
|
|
/// <para>
|
|
/// C++:
|
|
/// <see href="https://github.com/jrouwe/JoltPhysics/blob/e77f175595e64cb44218cc9d9d56fc365ad0e36a/Jolt/Physics/Constraints/SliderConstraint.h#L126">Jolt/Physics/Constraints/SliderConstraint.h:126</see>
|
|
/// <br/>
|
|
/// <c>inline Vector<2> GetTotalLambdaPosition() const</c>
|
|
/// </para>
|
|
/// </summary>
|
|
/// <remarks>
|
|
/// <para>
|
|
/// @name Get Lagrange multiplier from last physics update (the linear/angular impulse applied to satisfy
|
|
/// the constraint)
|
|
/// </para>
|
|
/// </remarks>
|
|
public float2 GetTotalLambdaPosition() => Jolt.PInvoke.SliderConstraint_GetTotalLambdaPosition(this);
|
|
|
|
/// <summary>
|
|
/// <para>
|
|
/// C++:
|
|
/// <see href="https://github.com/jrouwe/JoltPhysics/blob/e77f175595e64cb44218cc9d9d56fc365ad0e36a/Jolt/Physics/Constraints/SliderConstraint.h#L127">Jolt/Physics/Constraints/SliderConstraint.h:127</see>
|
|
/// <br/>
|
|
/// <c>inline float GetTotalLambdaPositionLimits() const</c>
|
|
/// </para>
|
|
/// </summary>
|
|
public float GetTotalLambdaPositionLimits() => Jolt.PInvoke.SliderConstraint_GetTotalLambdaPositionLimits(this);
|
|
|
|
/// <summary>
|
|
/// <para>
|
|
/// C++:
|
|
/// <see href="https://github.com/jrouwe/JoltPhysics/blob/e77f175595e64cb44218cc9d9d56fc365ad0e36a/Jolt/Physics/Constraints/SliderConstraint.h#L128">Jolt/Physics/Constraints/SliderConstraint.h:128</see>
|
|
/// <br/>
|
|
/// <c>inline Vec3 GetTotalLambdaRotation() const</c>
|
|
/// </para>
|
|
/// </summary>
|
|
public float3 GetTotalLambdaRotation() => Jolt.PInvoke.SliderConstraint_GetTotalLambdaRotation(this);
|
|
|
|
/// <summary>
|
|
/// <para>
|
|
/// C++:
|
|
/// <see href="https://github.com/jrouwe/JoltPhysics/blob/e77f175595e64cb44218cc9d9d56fc365ad0e36a/Jolt/Physics/Constraints/SliderConstraint.h#L129">Jolt/Physics/Constraints/SliderConstraint.h:129</see>
|
|
/// <br/>
|
|
/// <c>inline float GetTotalLambdaMotor() const</c>
|
|
/// </para>
|
|
/// </summary>
|
|
public float GetTotalLambdaMotor() => Jolt.PInvoke.SliderConstraint_GetTotalLambdaMotor(this);
|
|
|
|
public void AddRef() => ((Constraint)this).AddRef();
|
|
|
|
public void Release() => ((Constraint)this).Release();
|
|
|
|
public uint GetRefCount() => ((Constraint)this).GetRefCount();
|
|
|
|
public static implicit operator TwoBodyConstraint(SliderConstraint value) =>
|
|
Unsafe.BitCast<SliderConstraint, TwoBodyConstraint>(value);
|
|
|
|
public static implicit operator Constraint(SliderConstraint value) =>
|
|
Unsafe.BitCast<SliderConstraint, Constraint>(value);
|
|
|
|
public void Dispose()
|
|
{
|
|
if (IsNull())
|
|
return;
|
|
Release();
|
|
}
|
|
|
|
/// <inheritdoc cref="TwoBodyConstraint.GetBody1()"/>
|
|
public Body GetBody1() => ((TwoBodyConstraint)this).GetBody1();
|
|
|
|
/// <inheritdoc cref="TwoBodyConstraint.GetBody2()"/>
|
|
public Body GetBody2() => ((TwoBodyConstraint)this).GetBody2();
|
|
|
|
/// <inheritdoc cref="Constraint.GetConstraintType()"/>
|
|
public ConstraintType GetConstraintType() => ((Constraint)this).GetConstraintType();
|
|
|
|
/// <inheritdoc cref="Constraint.GetConstraintPriority()"/>
|
|
public uint GetConstraintPriority() => ((Constraint)this).GetConstraintPriority();
|
|
|
|
/// <inheritdoc cref="Constraint.SetConstraintPriority(uint)"/>
|
|
public void SetConstraintPriority(uint priority) => ((Constraint)this).SetConstraintPriority(priority);
|
|
|
|
/// <inheritdoc cref="Constraint.SetNumVelocityStepsOverride(uint)"/>
|
|
public void SetNumVelocityStepsOverride(uint n) => ((Constraint)this).SetNumVelocityStepsOverride(n);
|
|
|
|
/// <inheritdoc cref="Constraint.GetNumVelocityStepsOverride()"/>
|
|
public uint GetNumVelocityStepsOverride() => ((Constraint)this).GetNumVelocityStepsOverride();
|
|
|
|
/// <inheritdoc cref="Constraint.SetNumPositionStepsOverride(uint)"/>
|
|
public void SetNumPositionStepsOverride(uint n) => ((Constraint)this).SetNumPositionStepsOverride(n);
|
|
|
|
/// <inheritdoc cref="Constraint.GetNumPositionStepsOverride()"/>
|
|
public uint GetNumPositionStepsOverride() => ((Constraint)this).GetNumPositionStepsOverride();
|
|
|
|
/// <inheritdoc cref="Constraint.SetEnabled(bool)"/>
|
|
public void SetEnabled(bool enabled) => ((Constraint)this).SetEnabled(enabled);
|
|
|
|
/// <inheritdoc cref="Constraint.GetEnabled()"/>
|
|
public bool GetEnabled() => ((Constraint)this).GetEnabled();
|
|
|
|
/// <inheritdoc cref="Constraint.GetUserData()"/>
|
|
public ulong GetUserData() => ((Constraint)this).GetUserData();
|
|
|
|
/// <inheritdoc cref="Constraint.SetUserData(ulong)"/>
|
|
public void SetUserData(ulong userData) => ((Constraint)this).SetUserData(userData);
|
|
|
|
/// <inheritdoc cref="Constraint.IsActive()"/>
|
|
public bool IsActive() => ((Constraint)this).IsActive();
|
|
|
|
/// <inheritdoc cref="Constraint.BuildIslands(uint, IslandBuilder, BodyManager)"/>
|
|
public void BuildIslands(uint constraintIndex, IslandBuilder builder, BodyManager bodyManager) =>
|
|
((Constraint)this).BuildIslands(constraintIndex, builder, bodyManager);
|
|
|
|
/// <inheritdoc cref="Constraint.BuildIslandSplits(LargeIslandSplitter)"/>
|
|
public uint BuildIslandSplits(LargeIslandSplitter splitter) => ((Constraint)this).BuildIslandSplits(splitter);
|
|
|
|
/// <inheritdoc cref="Constraint.DrawConstraintReferenceFrame(DebugRenderer)"/>
|
|
public void DrawConstraintReferenceFrame(DebugRenderer renderer) =>
|
|
((Constraint)this).DrawConstraintReferenceFrame(renderer);
|
|
|
|
/// <inheritdoc cref="Constraint.GetDrawConstraintSize()"/>
|
|
public float GetDrawConstraintSize() => ((Constraint)this).GetDrawConstraintSize();
|
|
|
|
/// <inheritdoc cref="Constraint.SetDrawConstraintSize(float)"/>
|
|
public void SetDrawConstraintSize(float size) => ((Constraint)this).SetDrawConstraintSize(size);
|
|
}
|
|
}
|