mirror of
https://github.com/ahwootech/BRUTAL.git
synced 2026-11-26 04:58:24 +01:00
643 lines
30 KiB
C#
643 lines
30 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>
|
|
/// 6 Degree Of Freedom Constraint. Allows control over each of the 6 degrees of freedom.
|
|
/// </para>
|
|
/// <para>
|
|
/// C++:
|
|
/// <see href="https://github.com/jrouwe/JoltPhysics/blob/e77f175595e64cb44218cc9d9d56fc365ad0e36a/Jolt/Physics/Constraints/SixDOFConstraint.h#L105">Jolt/Physics/Constraints/SixDOFConstraint.h:105</see>
|
|
/// <br/>
|
|
/// <c>class SixDOFConstraint final : public TwoBodyConstraint</c>
|
|
/// </para>
|
|
/// </summary>
|
|
[InteropHandle]
|
|
public readonly partial struct SixDOFConstraint : IDisposable
|
|
{
|
|
/// <summary>
|
|
/// <para>
|
|
/// Construct six DOF constraint
|
|
/// </para>
|
|
/// <para>
|
|
/// C++:
|
|
/// <see href="https://github.com/jrouwe/JoltPhysics/blob/e77f175595e64cb44218cc9d9d56fc365ad0e36a/Jolt/Physics/Constraints/SixDOFConstraint.h#L114">Jolt/Physics/Constraints/SixDOFConstraint.h:114</see>
|
|
/// <br/>
|
|
/// <c>SixDOFConstraint(Body &inBody1, Body &inBody2, const SixDOFConstraintSettings &inSettings)</c>
|
|
/// </para>
|
|
/// </summary>
|
|
public static SixDOFConstraint Create(Body body1, Body body2, SixDOFConstraintSettings settings) =>
|
|
Jolt.PInvoke.SixDOFConstraint_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>
|
|
/// Update the translation limits for this constraint
|
|
/// </para>
|
|
/// <para>
|
|
/// C++:
|
|
/// <see href="https://github.com/jrouwe/JoltPhysics/blob/e77f175595e64cb44218cc9d9d56fc365ad0e36a/Jolt/Physics/Constraints/SixDOFConstraint.h#L137">Jolt/Physics/Constraints/SixDOFConstraint.h:137</see>
|
|
/// <br/>
|
|
/// <c>void SetTranslationLimits(Vec3Arg inLimitMin, Vec3Arg inLimitMax)</c>
|
|
/// </para>
|
|
/// </summary>
|
|
public void SetTranslationLimits(float3 limitMin, float3 limitMax) =>
|
|
Jolt.PInvoke.SixDOFConstraint_SetTranslationLimits(this, limitMin, limitMax);
|
|
|
|
/// <summary>
|
|
/// <para>
|
|
/// Update the rotational limits for this constraint
|
|
/// </para>
|
|
/// <para>
|
|
/// C++:
|
|
/// <see href="https://github.com/jrouwe/JoltPhysics/blob/e77f175595e64cb44218cc9d9d56fc365ad0e36a/Jolt/Physics/Constraints/SixDOFConstraint.h#L140">Jolt/Physics/Constraints/SixDOFConstraint.h:140</see>
|
|
/// <br/>
|
|
/// <c>void SetRotationLimits(Vec3Arg inLimitMin, Vec3Arg inLimitMax)</c>
|
|
/// </para>
|
|
/// </summary>
|
|
public void SetRotationLimits(float3 limitMin, float3 limitMax) =>
|
|
Jolt.PInvoke.SixDOFConstraint_SetRotationLimits(this, limitMin, limitMax);
|
|
|
|
/// <summary>
|
|
/// <para>
|
|
/// Get constraint Limits
|
|
/// </para>
|
|
/// <para>
|
|
/// C++:
|
|
/// <see href="https://github.com/jrouwe/JoltPhysics/blob/e77f175595e64cb44218cc9d9d56fc365ad0e36a/Jolt/Physics/Constraints/SixDOFConstraint.h#L143">Jolt/Physics/Constraints/SixDOFConstraint.h:143</see>
|
|
/// <br/>
|
|
/// <c>float GetLimitsMin(EAxis inAxis) const</c>
|
|
/// </para>
|
|
/// </summary>
|
|
public float GetLimitsMin(SixDOFConstraintSettings.Axis axis)
|
|
{
|
|
var _result = Jolt.PInvoke.SixDOFConstraint_GetLimitsMin(this, axis, out var _inRange);
|
|
if (_inRange == 0)
|
|
throw new ArgumentOutOfRangeException(
|
|
nameof(axis),
|
|
axis,
|
|
"Expected an index below the number of axes."
|
|
);
|
|
return _result;
|
|
}
|
|
|
|
/// <summary>
|
|
/// <para>
|
|
/// C++:
|
|
/// <see href="https://github.com/jrouwe/JoltPhysics/blob/e77f175595e64cb44218cc9d9d56fc365ad0e36a/Jolt/Physics/Constraints/SixDOFConstraint.h#L144">Jolt/Physics/Constraints/SixDOFConstraint.h:144</see>
|
|
/// <br/>
|
|
/// <c>float GetLimitsMax(EAxis inAxis) const</c>
|
|
/// </para>
|
|
/// </summary>
|
|
public float GetLimitsMax(SixDOFConstraintSettings.Axis axis)
|
|
{
|
|
var _result = Jolt.PInvoke.SixDOFConstraint_GetLimitsMax(this, axis, out var _inRange);
|
|
if (_inRange == 0)
|
|
throw new ArgumentOutOfRangeException(
|
|
nameof(axis),
|
|
axis,
|
|
"Expected an index below the number of axes."
|
|
);
|
|
return _result;
|
|
}
|
|
|
|
/// <summary>
|
|
/// <para>
|
|
/// C++:
|
|
/// <see href="https://github.com/jrouwe/JoltPhysics/blob/e77f175595e64cb44218cc9d9d56fc365ad0e36a/Jolt/Physics/Constraints/SixDOFConstraint.h#L145">Jolt/Physics/Constraints/SixDOFConstraint.h:145</see>
|
|
/// <br/>
|
|
/// <c>Vec3 GetTranslationLimitsMin() const</c>
|
|
/// </para>
|
|
/// </summary>
|
|
public float3 GetTranslationLimitsMin() => Jolt.PInvoke.SixDOFConstraint_GetTranslationLimitsMin(this);
|
|
|
|
/// <summary>
|
|
/// <para>
|
|
/// C++:
|
|
/// <see href="https://github.com/jrouwe/JoltPhysics/blob/e77f175595e64cb44218cc9d9d56fc365ad0e36a/Jolt/Physics/Constraints/SixDOFConstraint.h#L146">Jolt/Physics/Constraints/SixDOFConstraint.h:146</see>
|
|
/// <br/>
|
|
/// <c>Vec3 GetTranslationLimitsMax() const</c>
|
|
/// </para>
|
|
/// </summary>
|
|
public float3 GetTranslationLimitsMax() => Jolt.PInvoke.SixDOFConstraint_GetTranslationLimitsMax(this);
|
|
|
|
/// <summary>
|
|
/// <para>
|
|
/// C++:
|
|
/// <see href="https://github.com/jrouwe/JoltPhysics/blob/e77f175595e64cb44218cc9d9d56fc365ad0e36a/Jolt/Physics/Constraints/SixDOFConstraint.h#L147">Jolt/Physics/Constraints/SixDOFConstraint.h:147</see>
|
|
/// <br/>
|
|
/// <c>Vec3 GetRotationLimitsMin() const</c>
|
|
/// </para>
|
|
/// </summary>
|
|
public float3 GetRotationLimitsMin() => Jolt.PInvoke.SixDOFConstraint_GetRotationLimitsMin(this);
|
|
|
|
/// <summary>
|
|
/// <para>
|
|
/// C++:
|
|
/// <see href="https://github.com/jrouwe/JoltPhysics/blob/e77f175595e64cb44218cc9d9d56fc365ad0e36a/Jolt/Physics/Constraints/SixDOFConstraint.h#L148">Jolt/Physics/Constraints/SixDOFConstraint.h:148</see>
|
|
/// <br/>
|
|
/// <c>Vec3 GetRotationLimitsMax() const</c>
|
|
/// </para>
|
|
/// </summary>
|
|
public float3 GetRotationLimitsMax() => Jolt.PInvoke.SixDOFConstraint_GetRotationLimitsMax(this);
|
|
|
|
/// <summary>
|
|
/// <para>
|
|
/// Check which axis are fixed/free
|
|
/// </para>
|
|
/// <para>
|
|
/// C++:
|
|
/// <see href="https://github.com/jrouwe/JoltPhysics/blob/e77f175595e64cb44218cc9d9d56fc365ad0e36a/Jolt/Physics/Constraints/SixDOFConstraint.h#L151">Jolt/Physics/Constraints/SixDOFConstraint.h:151</see>
|
|
/// <br/>
|
|
/// <c>inline bool IsFixedAxis(EAxis inAxis) const</c>
|
|
/// </para>
|
|
/// </summary>
|
|
public bool IsFixedAxis(SixDOFConstraintSettings.Axis axis)
|
|
{
|
|
var _result = Jolt.PInvoke.SixDOFConstraint_IsFixedAxis(this, axis, out var _inRange);
|
|
if (_inRange == 0)
|
|
throw new ArgumentOutOfRangeException(
|
|
nameof(axis),
|
|
axis,
|
|
"Expected an index below the number of axes."
|
|
);
|
|
return _result;
|
|
}
|
|
|
|
/// <summary>
|
|
/// <para>
|
|
/// C++:
|
|
/// <see href="https://github.com/jrouwe/JoltPhysics/blob/e77f175595e64cb44218cc9d9d56fc365ad0e36a/Jolt/Physics/Constraints/SixDOFConstraint.h#L152">Jolt/Physics/Constraints/SixDOFConstraint.h:152</see>
|
|
/// <br/>
|
|
/// <c>inline bool IsFreeAxis(EAxis inAxis) const</c>
|
|
/// </para>
|
|
/// </summary>
|
|
public bool IsFreeAxis(SixDOFConstraintSettings.Axis axis)
|
|
{
|
|
var _result = Jolt.PInvoke.SixDOFConstraint_IsFreeAxis(this, axis, out var _inRange);
|
|
if (_inRange == 0)
|
|
throw new ArgumentOutOfRangeException(
|
|
nameof(axis),
|
|
axis,
|
|
"Expected an index below the number of axes."
|
|
);
|
|
return _result;
|
|
}
|
|
|
|
/// <summary>
|
|
/// <para>
|
|
/// Update the limits spring settings
|
|
/// </para>
|
|
/// <para>
|
|
/// C++:
|
|
/// <see href="https://github.com/jrouwe/JoltPhysics/blob/e77f175595e64cb44218cc9d9d56fc365ad0e36a/Jolt/Physics/Constraints/SixDOFConstraint.h#L155">Jolt/Physics/Constraints/SixDOFConstraint.h:155</see>
|
|
/// <br/>
|
|
/// <c>const SpringSettings & GetLimitsSpringSettings(EAxis inAxis) const</c>
|
|
/// </para>
|
|
/// </summary>
|
|
/// <remarks>
|
|
/// <para>
|
|
/// The returned handle is borrowed from its owner; don't Dispose it.
|
|
/// </para>
|
|
/// </remarks>
|
|
public SpringSettings GetLimitsSpringSettings(SixDOFConstraintSettings.Axis axis)
|
|
{
|
|
var _result = Jolt.PInvoke.SixDOFConstraint_GetLimitsSpringSettings(this, axis, out var _inRange);
|
|
if (_inRange == 0)
|
|
throw new ArgumentOutOfRangeException(
|
|
nameof(axis),
|
|
axis,
|
|
"Expected an index below the number of translation axes."
|
|
);
|
|
return _result;
|
|
}
|
|
|
|
/// <summary>
|
|
/// <para>
|
|
/// C++:
|
|
/// <see href="https://github.com/jrouwe/JoltPhysics/blob/e77f175595e64cb44218cc9d9d56fc365ad0e36a/Jolt/Physics/Constraints/SixDOFConstraint.h#L156">Jolt/Physics/Constraints/SixDOFConstraint.h:156</see>
|
|
/// <br/>
|
|
/// <c>void SetLimitsSpringSettings(EAxis inAxis, const SpringSettings& inLimitsSpringSettings)</c>
|
|
/// </para>
|
|
/// </summary>
|
|
public void SetLimitsSpringSettings(SixDOFConstraintSettings.Axis axis, SpringSettings limitsSpringSettings)
|
|
{
|
|
Jolt.PInvoke.SixDOFConstraint_SetLimitsSpringSettings(this, axis, limitsSpringSettings, out var _inRange);
|
|
if (_inRange == 0)
|
|
throw new ArgumentOutOfRangeException(
|
|
nameof(axis),
|
|
axis,
|
|
"Expected an index below the number of translation axes."
|
|
);
|
|
}
|
|
|
|
/// <summary>
|
|
/// <para>
|
|
/// Set the max friction for each axis
|
|
/// </para>
|
|
/// <para>
|
|
/// C++:
|
|
/// <see href="https://github.com/jrouwe/JoltPhysics/blob/e77f175595e64cb44218cc9d9d56fc365ad0e36a/Jolt/Physics/Constraints/SixDOFConstraint.h#L159">Jolt/Physics/Constraints/SixDOFConstraint.h:159</see>
|
|
/// <br/>
|
|
/// <c>void SetMaxFriction(EAxis inAxis, float inFriction)</c>
|
|
/// </para>
|
|
/// </summary>
|
|
public void SetMaxFriction(SixDOFConstraintSettings.Axis axis, float friction)
|
|
{
|
|
Jolt.PInvoke.SixDOFConstraint_SetMaxFriction(this, axis, friction, out var _inRange);
|
|
if (_inRange == 0)
|
|
throw new ArgumentOutOfRangeException(
|
|
nameof(axis),
|
|
axis,
|
|
"Expected an index below the number of axes."
|
|
);
|
|
}
|
|
|
|
/// <summary>
|
|
/// <para>
|
|
/// C++:
|
|
/// <see href="https://github.com/jrouwe/JoltPhysics/blob/e77f175595e64cb44218cc9d9d56fc365ad0e36a/Jolt/Physics/Constraints/SixDOFConstraint.h#L160">Jolt/Physics/Constraints/SixDOFConstraint.h:160</see>
|
|
/// <br/>
|
|
/// <c>float GetMaxFriction(EAxis inAxis) const</c>
|
|
/// </para>
|
|
/// </summary>
|
|
public float GetMaxFriction(SixDOFConstraintSettings.Axis axis)
|
|
{
|
|
var _result = Jolt.PInvoke.SixDOFConstraint_GetMaxFriction(this, axis, out var _inRange);
|
|
if (_inRange == 0)
|
|
throw new ArgumentOutOfRangeException(
|
|
nameof(axis),
|
|
axis,
|
|
"Expected an index below the number of axes."
|
|
);
|
|
return _result;
|
|
}
|
|
|
|
/// <summary>
|
|
/// <para>
|
|
/// Get rotation of constraint in constraint space
|
|
/// </para>
|
|
/// <para>
|
|
/// C++:
|
|
/// <see href="https://github.com/jrouwe/JoltPhysics/blob/e77f175595e64cb44218cc9d9d56fc365ad0e36a/Jolt/Physics/Constraints/SixDOFConstraint.h#L163">Jolt/Physics/Constraints/SixDOFConstraint.h:163</see>
|
|
/// <br/>
|
|
/// <c>Quat GetRotationInConstraintSpace() const</c>
|
|
/// </para>
|
|
/// </summary>
|
|
public floatQuat GetRotationInConstraintSpace() =>
|
|
Jolt.PInvoke.SixDOFConstraint_GetRotationInConstraintSpace(this);
|
|
|
|
/// <summary>
|
|
/// <para>
|
|
/// Motor settings
|
|
/// </para>
|
|
/// <para>
|
|
/// C++:
|
|
/// <see href="https://github.com/jrouwe/JoltPhysics/blob/e77f175595e64cb44218cc9d9d56fc365ad0e36a/Jolt/Physics/Constraints/SixDOFConstraint.h#L166">Jolt/Physics/Constraints/SixDOFConstraint.h:166</see>
|
|
/// <br/>
|
|
/// <c>MotorSettings & GetMotorSettings(EAxis inAxis)</c>
|
|
/// </para>
|
|
/// </summary>
|
|
/// <remarks>
|
|
/// <para>
|
|
/// The returned handle is borrowed from its owner; don't Dispose it.
|
|
/// </para>
|
|
/// </remarks>
|
|
public MotorSettings GetMotorSettings(SixDOFConstraintSettings.Axis axis)
|
|
{
|
|
var _result = Jolt.PInvoke.SixDOFConstraint_GetMotorSettings(this, axis, out var _inRange);
|
|
if (_inRange == 0)
|
|
throw new ArgumentOutOfRangeException(
|
|
nameof(axis),
|
|
axis,
|
|
"Expected an index below the number of axes."
|
|
);
|
|
return _result;
|
|
}
|
|
|
|
/// <summary>
|
|
/// <para>
|
|
/// Motor controls. Translation motors work in constraint space of body 1. Rotation motors work in
|
|
/// constraint space of body 2 (!).
|
|
/// </para>
|
|
/// <para>
|
|
/// C++:
|
|
/// <see href="https://github.com/jrouwe/JoltPhysics/blob/e77f175595e64cb44218cc9d9d56fc365ad0e36a/Jolt/Physics/Constraints/SixDOFConstraint.h#L172">Jolt/Physics/Constraints/SixDOFConstraint.h:172</see>
|
|
/// <br/>
|
|
/// <c>void SetMotorState(EAxis inAxis, EMotorState inState)</c>
|
|
/// </para>
|
|
/// </summary>
|
|
public void SetMotorState(SixDOFConstraintSettings.Axis axis, MotorState state)
|
|
{
|
|
Jolt.PInvoke.SixDOFConstraint_SetMotorState(this, axis, state, out var _inRange);
|
|
if (_inRange == 0)
|
|
throw new ArgumentOutOfRangeException(
|
|
nameof(axis),
|
|
axis,
|
|
"Expected an index below the number of axes."
|
|
);
|
|
}
|
|
|
|
/// <summary>
|
|
/// <para>
|
|
/// C++:
|
|
/// <see href="https://github.com/jrouwe/JoltPhysics/blob/e77f175595e64cb44218cc9d9d56fc365ad0e36a/Jolt/Physics/Constraints/SixDOFConstraint.h#L173">Jolt/Physics/Constraints/SixDOFConstraint.h:173</see>
|
|
/// <br/>
|
|
/// <c>EMotorState GetMotorState(EAxis inAxis) const</c>
|
|
/// </para>
|
|
/// </summary>
|
|
public MotorState GetMotorState(SixDOFConstraintSettings.Axis axis)
|
|
{
|
|
var _result = Jolt.PInvoke.SixDOFConstraint_GetMotorState(this, axis, out var _inRange);
|
|
if (_inRange == 0)
|
|
throw new ArgumentOutOfRangeException(
|
|
nameof(axis),
|
|
axis,
|
|
"Expected an index below the number of axes."
|
|
);
|
|
return _result;
|
|
}
|
|
|
|
/// <summary>
|
|
/// <para>
|
|
/// Set the target velocity in body 1 constraint space
|
|
/// </para>
|
|
/// <para>
|
|
/// C++:
|
|
/// <see href="https://github.com/jrouwe/JoltPhysics/blob/e77f175595e64cb44218cc9d9d56fc365ad0e36a/Jolt/Physics/Constraints/SixDOFConstraint.h#L176">Jolt/Physics/Constraints/SixDOFConstraint.h:176</see>
|
|
/// <br/>
|
|
/// <c>Vec3 GetTargetVelocityCS() const</c>
|
|
/// </para>
|
|
/// </summary>
|
|
public float3 GetTargetVelocityCS() => Jolt.PInvoke.SixDOFConstraint_GetTargetVelocityCS(this);
|
|
|
|
/// <summary>
|
|
/// <para>
|
|
/// C++:
|
|
/// <see href="https://github.com/jrouwe/JoltPhysics/blob/e77f175595e64cb44218cc9d9d56fc365ad0e36a/Jolt/Physics/Constraints/SixDOFConstraint.h#L177">Jolt/Physics/Constraints/SixDOFConstraint.h:177</see>
|
|
/// <br/>
|
|
/// <c>void SetTargetVelocityCS(Vec3Arg inVelocity)</c>
|
|
/// </para>
|
|
/// </summary>
|
|
public void SetTargetVelocityCS(float3 velocity) =>
|
|
Jolt.PInvoke.SixDOFConstraint_SetTargetVelocityCS(this, velocity);
|
|
|
|
/// <summary>
|
|
/// <para>
|
|
/// Set the target angular velocity in body 2 constraint space (!)
|
|
/// </para>
|
|
/// <para>
|
|
/// C++:
|
|
/// <see href="https://github.com/jrouwe/JoltPhysics/blob/e77f175595e64cb44218cc9d9d56fc365ad0e36a/Jolt/Physics/Constraints/SixDOFConstraint.h#L180">Jolt/Physics/Constraints/SixDOFConstraint.h:180</see>
|
|
/// <br/>
|
|
/// <c>void SetTargetAngularVelocityCS(Vec3Arg inAngularVelocity)</c>
|
|
/// </para>
|
|
/// </summary>
|
|
public void SetTargetAngularVelocityCS(float3 angularVelocity) =>
|
|
Jolt.PInvoke.SixDOFConstraint_SetTargetAngularVelocityCS(this, angularVelocity);
|
|
|
|
/// <summary>
|
|
/// <para>
|
|
/// C++:
|
|
/// <see href="https://github.com/jrouwe/JoltPhysics/blob/e77f175595e64cb44218cc9d9d56fc365ad0e36a/Jolt/Physics/Constraints/SixDOFConstraint.h#L181">Jolt/Physics/Constraints/SixDOFConstraint.h:181</see>
|
|
/// <br/>
|
|
/// <c>Vec3 GetTargetAngularVelocityCS() const</c>
|
|
/// </para>
|
|
/// </summary>
|
|
public float3 GetTargetAngularVelocityCS() => Jolt.PInvoke.SixDOFConstraint_GetTargetAngularVelocityCS(this);
|
|
|
|
/// <summary>
|
|
/// <para>
|
|
/// Set the target position in body 1 constraint space
|
|
/// </para>
|
|
/// <para>
|
|
/// C++:
|
|
/// <see href="https://github.com/jrouwe/JoltPhysics/blob/e77f175595e64cb44218cc9d9d56fc365ad0e36a/Jolt/Physics/Constraints/SixDOFConstraint.h#L184">Jolt/Physics/Constraints/SixDOFConstraint.h:184</see>
|
|
/// <br/>
|
|
/// <c>Vec3 GetTargetPositionCS() const</c>
|
|
/// </para>
|
|
/// </summary>
|
|
public float3 GetTargetPositionCS() => Jolt.PInvoke.SixDOFConstraint_GetTargetPositionCS(this);
|
|
|
|
/// <summary>
|
|
/// <para>
|
|
/// C++:
|
|
/// <see href="https://github.com/jrouwe/JoltPhysics/blob/e77f175595e64cb44218cc9d9d56fc365ad0e36a/Jolt/Physics/Constraints/SixDOFConstraint.h#L185">Jolt/Physics/Constraints/SixDOFConstraint.h:185</see>
|
|
/// <br/>
|
|
/// <c>void SetTargetPositionCS(Vec3Arg inPosition)</c>
|
|
/// </para>
|
|
/// </summary>
|
|
public void SetTargetPositionCS(float3 position) =>
|
|
Jolt.PInvoke.SixDOFConstraint_SetTargetPositionCS(this, position);
|
|
|
|
/// <summary>
|
|
/// <para>
|
|
/// Set the target orientation in body 1 constraint space
|
|
/// </para>
|
|
/// <para>
|
|
/// C++:
|
|
/// <see href="https://github.com/jrouwe/JoltPhysics/blob/e77f175595e64cb44218cc9d9d56fc365ad0e36a/Jolt/Physics/Constraints/SixDOFConstraint.h#L188">Jolt/Physics/Constraints/SixDOFConstraint.h:188</see>
|
|
/// <br/>
|
|
/// <c>void SetTargetOrientationCS(QuatArg inOrientation)</c>
|
|
/// </para>
|
|
/// </summary>
|
|
public void SetTargetOrientationCS(floatQuat orientation) =>
|
|
Jolt.PInvoke.SixDOFConstraint_SetTargetOrientationCS(this, orientation);
|
|
|
|
/// <summary>
|
|
/// <para>
|
|
/// C++:
|
|
/// <see href="https://github.com/jrouwe/JoltPhysics/blob/e77f175595e64cb44218cc9d9d56fc365ad0e36a/Jolt/Physics/Constraints/SixDOFConstraint.h#L189">Jolt/Physics/Constraints/SixDOFConstraint.h:189</see>
|
|
/// <br/>
|
|
/// <c>Quat GetTargetOrientationCS() const</c>
|
|
/// </para>
|
|
/// </summary>
|
|
public floatQuat GetTargetOrientationCS() => Jolt.PInvoke.SixDOFConstraint_GetTargetOrientationCS(this);
|
|
|
|
/// <summary>
|
|
/// <para>
|
|
/// Set the target orientation in body space (R2 = R1 * inOrientation, where R1 and R2 are the world space
|
|
/// rotations for body 1 and 2). Solve: R2 * ConstraintToBody2 = R1 * ConstraintToBody1 * q (see
|
|
/// SwingTwistConstraint::GetSwingTwist) and R2 = R1 * inOrientation for q.
|
|
/// </para>
|
|
/// <para>
|
|
/// C++:
|
|
/// <see href="https://github.com/jrouwe/JoltPhysics/blob/e77f175595e64cb44218cc9d9d56fc365ad0e36a/Jolt/Physics/Constraints/SixDOFConstraint.h#L193">Jolt/Physics/Constraints/SixDOFConstraint.h:193</see>
|
|
/// <br/>
|
|
/// <c>void SetTargetOrientationBS(QuatArg inOrientation)</c>
|
|
/// </para>
|
|
/// </summary>
|
|
public void SetTargetOrientationBS(floatQuat orientation) =>
|
|
Jolt.PInvoke.SixDOFConstraint_SetTargetOrientationBS(this, orientation);
|
|
|
|
/// <summary>
|
|
/// <para>
|
|
/// C++:
|
|
/// <see href="https://github.com/jrouwe/JoltPhysics/blob/e77f175595e64cb44218cc9d9d56fc365ad0e36a/Jolt/Physics/Constraints/SixDOFConstraint.h#L196">Jolt/Physics/Constraints/SixDOFConstraint.h:196</see>
|
|
/// <br/>
|
|
/// <c>inline Vec3 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 float3 GetTotalLambdaPosition() => Jolt.PInvoke.SixDOFConstraint_GetTotalLambdaPosition(this);
|
|
|
|
/// <summary>
|
|
/// <para>
|
|
/// C++:
|
|
/// <see href="https://github.com/jrouwe/JoltPhysics/blob/e77f175595e64cb44218cc9d9d56fc365ad0e36a/Jolt/Physics/Constraints/SixDOFConstraint.h#L197">Jolt/Physics/Constraints/SixDOFConstraint.h:197</see>
|
|
/// <br/>
|
|
/// <c>inline Vec3 GetTotalLambdaRotation() const</c>
|
|
/// </para>
|
|
/// </summary>
|
|
public float3 GetTotalLambdaRotation() => Jolt.PInvoke.SixDOFConstraint_GetTotalLambdaRotation(this);
|
|
|
|
/// <summary>
|
|
/// <para>
|
|
/// C++:
|
|
/// <see href="https://github.com/jrouwe/JoltPhysics/blob/e77f175595e64cb44218cc9d9d56fc365ad0e36a/Jolt/Physics/Constraints/SixDOFConstraint.h#L198">Jolt/Physics/Constraints/SixDOFConstraint.h:198</see>
|
|
/// <br/>
|
|
/// <c>inline Vec3 GetTotalLambdaMotorTranslation() const</c>
|
|
/// </para>
|
|
/// </summary>
|
|
public float3 GetTotalLambdaMotorTranslation() =>
|
|
Jolt.PInvoke.SixDOFConstraint_GetTotalLambdaMotorTranslation(this);
|
|
|
|
/// <summary>
|
|
/// <para>
|
|
/// C++:
|
|
/// <see href="https://github.com/jrouwe/JoltPhysics/blob/e77f175595e64cb44218cc9d9d56fc365ad0e36a/Jolt/Physics/Constraints/SixDOFConstraint.h#L199">Jolt/Physics/Constraints/SixDOFConstraint.h:199</see>
|
|
/// <br/>
|
|
/// <c>inline Vec3 GetTotalLambdaMotorRotation() const</c>
|
|
/// </para>
|
|
/// </summary>
|
|
public float3 GetTotalLambdaMotorRotation() => Jolt.PInvoke.SixDOFConstraint_GetTotalLambdaMotorRotation(this);
|
|
|
|
public void AddRef() => ((Constraint)this).AddRef();
|
|
|
|
public void Release() => ((Constraint)this).Release();
|
|
|
|
public uint GetRefCount() => ((Constraint)this).GetRefCount();
|
|
|
|
public static implicit operator TwoBodyConstraint(SixDOFConstraint value) =>
|
|
Unsafe.BitCast<SixDOFConstraint, TwoBodyConstraint>(value);
|
|
|
|
public static implicit operator Constraint(SixDOFConstraint value) =>
|
|
Unsafe.BitCast<SixDOFConstraint, 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);
|
|
}
|
|
}
|