//
// Generated by Brutal.Jolt.Generate; do not edit by hand.
#nullable enable
using Brutal.Interop;
using Brutal.Numerics;
namespace Brutal.JoltApi
{
public static partial class Jolt
{
public static unsafe partial class PInvoke
{
[LibraryImport("jolt", EntryPoint = "IndependentAxisConstraintPart_Create")]
public static partial IndependentAxisConstraintPart IndependentAxisConstraintPart_Create();
[LibraryImport("jolt", EntryPoint = "IndependentAxisConstraintPart_Destroy")]
public static partial void IndependentAxisConstraintPart_Destroy(IndependentAxisConstraintPart self);
///
///
/// C++:
/// Jolt/Physics/Constraints/ConstraintPart/IndependentAxisConstraintPart.h:89
///
/// inline void CalculateConstraintProperties(const Body &inBody1, const Body &inBody2, Vec3Arg inR1, Vec3Arg inN1, Vec3Arg inR2, Vec3Arg inN2, float inRatio)
///
///
///
///
/// 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 inR1 The position on which the constraint operates on body 1 relative to COM
/// @param inN1 The world space normal in which the constraint operates for body 1
/// @param inR2 The position on which the constraint operates on body 1 relative to COM
/// @param inN2 The world space normal in which the constraint operates for body 2
/// @param inRatio The ratio how forces are applied between bodies
///
///
[LibraryImport("jolt", EntryPoint = "IndependentAxisConstraintPart_CalculateConstraintProperties")]
public static partial void IndependentAxisConstraintPart_CalculateConstraintProperties(IndependentAxisConstraintPart self, Body body1, Body body2, float3 r1, float3 n1, float3 r2, float3 n2, float ratio);
///
///
/// C++:
/// Jolt/Physics/Constraints/ConstraintPart/IndependentAxisConstraintPart.h:123
///
/// inline void Deactivate()
///
///
///
///
/// Deactivate this constraint
///
///
[LibraryImport("jolt", EntryPoint = "IndependentAxisConstraintPart_Deactivate")]
public static partial void IndependentAxisConstraintPart_Deactivate(IndependentAxisConstraintPart self);
///
///
/// C++:
/// Jolt/Physics/Constraints/ConstraintPart/IndependentAxisConstraintPart.h:130
///
/// inline bool IsActive() const
///
///
///
///
/// Check if constraint is active
///
///
[LibraryImport("jolt", EntryPoint = "IndependentAxisConstraintPart_IsActive")]
public static partial Brutal.Bool8 IndependentAxisConstraintPart_IsActive(IndependentAxisConstraintPart self);
///
///
/// C++:
/// Jolt/Physics/Constraints/ConstraintPart/IndependentAxisConstraintPart.h:142
///
/// inline void WarmStart(Body &ioBody1, Body &ioBody2, Vec3Arg inN1, Vec3Arg inN2, float inRatio, float inWarmStartImpulseRatio)
///
///
///
///
/// 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 inN1 The world space normal in which the constraint operates for body 1
/// @param inN2 The world space normal in which the constraint operates for body 2
/// @param inRatio The ratio how forces are applied between bodies
/// @param inWarmStartImpulseRatio Ratio of new step to old time step (dt_new / dt_old) for scaling the lagrange multiplier of the previous frame
///
///
[LibraryImport("jolt", EntryPoint = "IndependentAxisConstraintPart_WarmStart")]
public static partial void IndependentAxisConstraintPart_WarmStart(IndependentAxisConstraintPart self, Body body1, Body body2, float3 n1, float3 n2, float ratio, float warmStartImpulseRatio);
///
///
/// C++:
/// Jolt/Physics/Constraints/ConstraintPart/IndependentAxisConstraintPart.h:156
///
/// inline bool SolveVelocityConstraint(Body &ioBody1, Body &ioBody2, Vec3Arg inN1, Vec3Arg inN2, float inRatio, float inMinLambda, float inMaxLambda)
///
///
///
///
/// 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 inN1 The world space normal in which the constraint operates for body 1
/// @param inN2 The world space normal in which the constraint operates for body 2
/// @param inRatio The ratio how forces are applied between bodies
/// @param inMinLambda Minimum angular impulse to apply (N m s)
/// @param inMaxLambda Maximum angular impulse to apply (N m s)
///
///
[LibraryImport("jolt", EntryPoint = "IndependentAxisConstraintPart_SolveVelocityConstraint")]
public static partial Brutal.Bool8 IndependentAxisConstraintPart_SolveVelocityConstraint(IndependentAxisConstraintPart self, Body body1, Body body2, float3 n1, float3 n2, float ratio, float minLambda, float maxLambda);
///
///
/// C++:
/// Jolt/Physics/Constraints/ConstraintPart/IndependentAxisConstraintPart.h:170
///
/// float GetTotalLambda() const
///
///
///
///
/// Return lagrange multiplier
///
///
[LibraryImport("jolt", EntryPoint = "IndependentAxisConstraintPart_GetTotalLambda")]
public static partial float IndependentAxisConstraintPart_GetTotalLambda(IndependentAxisConstraintPart self);
///
///
/// C++:
/// Jolt/Physics/Constraints/ConstraintPart/IndependentAxisConstraintPart.h:183
///
/// inline bool SolvePositionConstraint(Body &ioBody1, Body &ioBody2, Vec3Arg inN1, Vec3Arg inN2, float inRatio, float inC, float inBaumgarte) const
///
///
///
///
/// 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 inN1 The world space normal in which the constraint operates for body 1
/// @param inN2 The world space normal in which the constraint operates for body 2
/// @param inRatio The ratio how forces are applied between bodies
/// @param inC Value of the constraint equation (C)
/// @param inBaumgarte Baumgarte constant (fraction of the error to correct)
///
///
[LibraryImport("jolt", EntryPoint = "IndependentAxisConstraintPart_SolvePositionConstraint")]
public static partial Brutal.Bool8 IndependentAxisConstraintPart_SolvePositionConstraint(IndependentAxisConstraintPart self, Body body1, Body body2, float3 n1, float3 n2, float ratio, float c, float baumgarte);
}
}
}