brutal/Brutal.Jolt/Generated/Classes/HingeRotationConstraintPart.gen.cs
Rian Drake b578433e37 first
2026-10-15 17:10:50 +13:00

111 lines
5.3 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>
/// C++:
/// <see href="https://github.com/jrouwe/JoltPhysics/blob/e77f175595e64cb44218cc9d9d56fc365ad0e36a/Jolt/Physics/Constraints/ConstraintPart/HingeRotationConstraintPart.h#L43">Jolt/Physics/Constraints/ConstraintPart/HingeRotationConstraintPart.h:43</see>
/// <br/>
/// <c>class HingeRotationConstraintPart</c>
/// </para>
/// </summary>
[InteropHandle]
public readonly partial struct HingeRotationConstraintPart : IDisposable
{
public static HingeRotationConstraintPart Create() => Jolt.PInvoke.HingeRotationConstraintPart_Create();
/// <summary>
/// <para>
/// Calculate properties used during the functions below
/// </para>
/// <para>
/// C++:
/// <see href="https://github.com/jrouwe/JoltPhysics/blob/e77f175595e64cb44218cc9d9d56fc365ad0e36a/Jolt/Physics/Constraints/ConstraintPart/HingeRotationConstraintPart.h#L76">Jolt/Physics/Constraints/ConstraintPart/HingeRotationConstraintPart.h:76</see>
/// <br/>
/// <c>inline void CalculateConstraintProperties(const Body &amp;inBody1, Mat44Arg inRotation1, Vec3Arg inWorldSpaceHingeAxis1, const Body &amp;inBody2, Mat44Arg inRotation2, Vec3Arg inWorldSpaceHingeAxis2)</c>
/// </para>
/// </summary>
public void CalculateConstraintProperties(
Body body1,
in float4x4 rotation1,
float3 worldSpaceHingeAxis1,
Body body2,
in float4x4 rotation2,
float3 worldSpaceHingeAxis2
) =>
Jolt.PInvoke.HingeRotationConstraintPart_CalculateConstraintProperties(
this,
body1,
in rotation1,
worldSpaceHingeAxis1,
body2,
in rotation2,
worldSpaceHingeAxis2
);
/// <summary>
/// <para>
/// Deactivate this constraint
/// </para>
/// <para>
/// C++:
/// <see href="https://github.com/jrouwe/JoltPhysics/blob/e77f175595e64cb44218cc9d9d56fc365ad0e36a/Jolt/Physics/Constraints/ConstraintPart/HingeRotationConstraintPart.h#L119">Jolt/Physics/Constraints/ConstraintPart/HingeRotationConstraintPart.h:119</see>
/// <br/>
/// <c>inline void Deactivate()</c>
/// </para>
/// </summary>
public void Deactivate() => Jolt.PInvoke.HingeRotationConstraintPart_Deactivate(this);
/// <summary>
/// <para>
/// Must be called from the WarmStartVelocityConstraint call to apply the previous frame's impulses
/// </para>
/// <para>
/// C++:
/// <see href="https://github.com/jrouwe/JoltPhysics/blob/e77f175595e64cb44218cc9d9d56fc365ad0e36a/Jolt/Physics/Constraints/ConstraintPart/HingeRotationConstraintPart.h#L126">Jolt/Physics/Constraints/ConstraintPart/HingeRotationConstraintPart.h:126</see>
/// <br/>
/// <c>inline void WarmStart(Body &amp;ioBody1, Body &amp;ioBody2, float inWarmStartImpulseRatio)</c>
/// </para>
/// </summary>
public void WarmStart(Body body1, Body body2, float warmStartImpulseRatio) =>
Jolt.PInvoke.HingeRotationConstraintPart_WarmStart(this, body1, body2, warmStartImpulseRatio);
/// <summary>
/// <para>
/// Iteratively update the velocity constraint. Makes sure d/dt C(...) = 0, where C is the constraint
/// equation.
/// </para>
/// <para>
/// C++:
/// <see href="https://github.com/jrouwe/JoltPhysics/blob/e77f175595e64cb44218cc9d9d56fc365ad0e36a/Jolt/Physics/Constraints/ConstraintPart/HingeRotationConstraintPart.h#L133">Jolt/Physics/Constraints/ConstraintPart/HingeRotationConstraintPart.h:133</see>
/// <br/>
/// <c>inline bool SolveVelocityConstraint(Body &amp;ioBody1, Body &amp;ioBody2)</c>
/// </para>
/// </summary>
public bool SolveVelocityConstraint(Body body1, Body body2) =>
Jolt.PInvoke.HingeRotationConstraintPart_SolveVelocityConstraint(this, body1, body2);
/// <summary>
/// <para>
/// Iteratively update the position constraint. Makes sure C(...) = 0.
/// </para>
/// <para>
/// C++:
/// <see href="https://github.com/jrouwe/JoltPhysics/blob/e77f175595e64cb44218cc9d9d56fc365ad0e36a/Jolt/Physics/Constraints/ConstraintPart/HingeRotationConstraintPart.h#L151">Jolt/Physics/Constraints/ConstraintPart/HingeRotationConstraintPart.h:151</see>
/// <br/>
/// <c>inline bool SolvePositionConstraint(Body &amp;ioBody1, Body &amp;ioBody2, float inBaumgarte) const</c>
/// </para>
/// </summary>
public bool SolvePositionConstraint(Body body1, Body body2, float baumgarte) =>
Jolt.PInvoke.HingeRotationConstraintPart_SolvePositionConstraint(this, body1, body2, baumgarte);
public void Dispose() => Jolt.PInvoke.HingeRotationConstraintPart_Destroy(this);
}
}