mirror of
https://github.com/ahwootech/BRUTAL.git
synced 2026-11-28 22:18:25 +01:00
first
This commit is contained in:
parent
bd62d51ec9
commit
b578433e37
1 changed files with 784842 additions and 0 deletions
219
Brutal.Jolt/Generated/Classes/RackAndPinionConstraintPart.gen.cs
Normal file
219
Brutal.Jolt/Generated/Classes/RackAndPinionConstraintPart.gen.cs
Normal file
|
|
@ -0,0 +1,219 @@
|
|||
// <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>
|
||||
/// Constraint that constrains a rotation to a translation
|
||||
/// </para>
|
||||
/// <para>
|
||||
/// C++:
|
||||
/// <see href="https://github.com/jrouwe/JoltPhysics/blob/e77f175595e64cb44218cc9d9d56fc365ad0e36a/Jolt/Physics/Constraints/ConstraintPart/RackAndPinionConstraintPart.h#L39">Jolt/Physics/Constraints/ConstraintPart/RackAndPinionConstraintPart.h:39</see>
|
||||
/// <br/>
|
||||
/// <c>class RackAndPinionConstraintPart</c>
|
||||
/// </para>
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// <code>
|
||||
/// Constraint that constrains a rotation to a translation
|
||||
///
|
||||
/// Constraint equation:
|
||||
///
|
||||
/// C = Theta(t) - r d(t)
|
||||
///
|
||||
/// Derivative:
|
||||
///
|
||||
/// d/dt C = 0
|
||||
/// <=> w1 . a - r v2 . b = 0
|
||||
///
|
||||
/// Jacobian:
|
||||
///
|
||||
/// \f[J = \begin{bmatrix}0 & a^T & -r b^T & 0\end{bmatrix}\f]
|
||||
///
|
||||
/// Used terms (here and below, everything in world space):\n
|
||||
/// a = axis around which body 1 rotates (normalized).\n
|
||||
/// b = axis along which body 2 slides (normalized).\n
|
||||
/// Theta(t) = rotation around a of body 1.\n
|
||||
/// d(t) = distance body 2 slides.\n
|
||||
/// r = ratio between rotation and translation.\n
|
||||
/// v = [v1, w1, v2, w2].\n
|
||||
/// v1, v2 = linear velocity of body 1 and 2.\n
|
||||
/// w1, w2 = angular velocity of body 1 and 2.\n
|
||||
/// M = mass matrix, a diagonal matrix of the mass and inertia with diagonal [m1, I1, m2, I2].\n
|
||||
/// \f$K^{-1} = \left( J M^{-1} J^T \right)^{-1}\f$ = effective mass.\n
|
||||
/// \f$\beta\f$ = baumgarte constant.
|
||||
/// </code>
|
||||
/// </remarks>
|
||||
[InteropHandle]
|
||||
public readonly partial struct RackAndPinionConstraintPart : IDisposable
|
||||
{
|
||||
public static RackAndPinionConstraintPart Create() => Jolt.PInvoke.RackAndPinionConstraintPart_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/RackAndPinionConstraintPart.h#L69">Jolt/Physics/Constraints/ConstraintPart/RackAndPinionConstraintPart.h:69</see>
|
||||
/// <br/>
|
||||
/// <c>inline void CalculateConstraintProperties(const Body &inBody1, Vec3Arg inWorldSpaceHingeAxis, const Body &inBody2, Vec3Arg inWorldSpaceSliderAxis, float inRatio)</c>
|
||||
/// </para>
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// <code>
|
||||
/// Calculate properties used during the functions below
|
||||
/// @param inBody1 The first body that this constraint is attached to
|
||||
/// @param inBody2 The second body that this constraint is attached to
|
||||
/// @param inWorldSpaceHingeAxis The axis around which body 1 rotates
|
||||
/// @param inWorldSpaceSliderAxis The axis along which body 2 slides
|
||||
/// @param inRatio The ratio between rotation and translation
|
||||
/// </code>
|
||||
/// </remarks>
|
||||
public void CalculateConstraintProperties(
|
||||
Body body1,
|
||||
float3 worldSpaceHingeAxis,
|
||||
Body body2,
|
||||
float3 worldSpaceSliderAxis,
|
||||
float ratio
|
||||
) =>
|
||||
Jolt.PInvoke.RackAndPinionConstraintPart_CalculateConstraintProperties(
|
||||
this,
|
||||
body1,
|
||||
worldSpaceHingeAxis,
|
||||
body2,
|
||||
worldSpaceSliderAxis,
|
||||
ratio
|
||||
);
|
||||
|
||||
/// <summary>
|
||||
/// <para>
|
||||
/// Deactivate this constraint
|
||||
/// </para>
|
||||
/// <para>
|
||||
/// C++:
|
||||
/// <see href="https://github.com/jrouwe/JoltPhysics/blob/e77f175595e64cb44218cc9d9d56fc365ad0e36a/Jolt/Physics/Constraints/ConstraintPart/RackAndPinionConstraintPart.h#L90">Jolt/Physics/Constraints/ConstraintPart/RackAndPinionConstraintPart.h:90</see>
|
||||
/// <br/>
|
||||
/// <c>inline void Deactivate()</c>
|
||||
/// </para>
|
||||
/// </summary>
|
||||
public void Deactivate() => Jolt.PInvoke.RackAndPinionConstraintPart_Deactivate(this);
|
||||
|
||||
/// <summary>
|
||||
/// <para>
|
||||
/// Check if constraint is active
|
||||
/// </para>
|
||||
/// <para>
|
||||
/// C++:
|
||||
/// <see href="https://github.com/jrouwe/JoltPhysics/blob/e77f175595e64cb44218cc9d9d56fc365ad0e36a/Jolt/Physics/Constraints/ConstraintPart/RackAndPinionConstraintPart.h#L97">Jolt/Physics/Constraints/ConstraintPart/RackAndPinionConstraintPart.h:97</see>
|
||||
/// <br/>
|
||||
/// <c>inline bool IsActive() const</c>
|
||||
/// </para>
|
||||
/// </summary>
|
||||
public bool IsActive() => Jolt.PInvoke.RackAndPinionConstraintPart_IsActive(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/RackAndPinionConstraintPart.h#L106">Jolt/Physics/Constraints/ConstraintPart/RackAndPinionConstraintPart.h:106</see>
|
||||
/// <br/>
|
||||
/// <c>inline void WarmStart(Body &ioBody1, Body &ioBody2, float inWarmStartImpulseRatio)</c>
|
||||
/// </para>
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// <code>
|
||||
/// Must be called from the WarmStartVelocityConstraint call to apply the previous frame's impulses
|
||||
/// @param ioBody1 The first body that this constraint is attached to
|
||||
/// @param ioBody2 The second body that this constraint is attached to
|
||||
/// @param inWarmStartImpulseRatio Ratio of new step to old time step (dt_new / dt_old) for scaling the lagrange multiplier of the previous frame
|
||||
/// </code>
|
||||
/// </remarks>
|
||||
public void WarmStart(Body body1, Body body2, float warmStartImpulseRatio) =>
|
||||
Jolt.PInvoke.RackAndPinionConstraintPart_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/RackAndPinionConstraintPart.h#L118">Jolt/Physics/Constraints/ConstraintPart/RackAndPinionConstraintPart.h:118</see>
|
||||
/// <br/>
|
||||
/// <c>inline bool SolveVelocityConstraint(Body &ioBody1, Vec3Arg inWorldSpaceHingeAxis, Body &ioBody2, Vec3Arg inWorldSpaceSliderAxis, float inRatio)</c>
|
||||
/// </para>
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// <code>
|
||||
/// Iteratively update the velocity constraint. Makes sure d/dt C(...) = 0, where C is the constraint equation.
|
||||
/// @param ioBody1 The first body that this constraint is attached to
|
||||
/// @param ioBody2 The second body that this constraint is attached to
|
||||
/// @param inWorldSpaceHingeAxis The axis around which body 1 rotates
|
||||
/// @param inWorldSpaceSliderAxis The axis along which body 2 slides
|
||||
/// @param inRatio The ratio between rotation and translation
|
||||
/// </code>
|
||||
/// </remarks>
|
||||
public bool SolveVelocityConstraint(
|
||||
Body body1,
|
||||
float3 worldSpaceHingeAxis,
|
||||
Body body2,
|
||||
float3 worldSpaceSliderAxis,
|
||||
float ratio
|
||||
) =>
|
||||
Jolt.PInvoke.RackAndPinionConstraintPart_SolveVelocityConstraint(
|
||||
this,
|
||||
body1,
|
||||
worldSpaceHingeAxis,
|
||||
body2,
|
||||
worldSpaceSliderAxis,
|
||||
ratio
|
||||
);
|
||||
|
||||
/// <summary>
|
||||
/// <para>
|
||||
/// Return lagrange multiplier
|
||||
/// </para>
|
||||
/// <para>
|
||||
/// C++:
|
||||
/// <see href="https://github.com/jrouwe/JoltPhysics/blob/e77f175595e64cb44218cc9d9d56fc365ad0e36a/Jolt/Physics/Constraints/ConstraintPart/RackAndPinionConstraintPart.h#L130">Jolt/Physics/Constraints/ConstraintPart/RackAndPinionConstraintPart.h:130</see>
|
||||
/// <br/>
|
||||
/// <c>float GetTotalLambda() const</c>
|
||||
/// </para>
|
||||
/// </summary>
|
||||
public float GetTotalLambda() => Jolt.PInvoke.RackAndPinionConstraintPart_GetTotalLambda(this);
|
||||
|
||||
/// <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/RackAndPinionConstraintPart.h#L140">Jolt/Physics/Constraints/ConstraintPart/RackAndPinionConstraintPart.h:140</see>
|
||||
/// <br/>
|
||||
/// <c>inline bool SolvePositionConstraint(Body &ioBody1, Body &ioBody2, float inC, float inBaumgarte) const</c>
|
||||
/// </para>
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// <code>
|
||||
/// Iteratively update the position constraint. Makes sure C(...) == 0.
|
||||
/// @param ioBody1 The first body that this constraint is attached to
|
||||
/// @param ioBody2 The second body that this constraint is attached to
|
||||
/// @param inC Value of the constraint equation (C)
|
||||
/// @param inBaumgarte Baumgarte constant (fraction of the error to correct)
|
||||
/// </code>
|
||||
/// </remarks>
|
||||
public bool SolvePositionConstraint(Body body1, Body body2, float c, float baumgarte) =>
|
||||
Jolt.PInvoke.RackAndPinionConstraintPart_SolvePositionConstraint(this, body1, body2, c, baumgarte);
|
||||
|
||||
public void Dispose() => Jolt.PInvoke.RackAndPinionConstraintPart_Destroy(this);
|
||||
}
|
||||
}
|
||||
Loading…
Reference in a new issue