//
// 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
{
///
///
/// C++:
/// Jolt/Physics/Constraints/Constraint.h:131
///
/// virtual EConstraintType GetType() const
///
///
///
///
/// Get the type of a constraint
///
///
[LibraryImport("jolt", EntryPoint = "Constraint_GetConstraintType")]
public static partial EConstraintType Constraint_GetConstraintType(Constraint self);
///
///
/// C++:
/// Jolt/Physics/Constraints/Constraint.h:134
///
/// virtual EConstraintSubType GetSubType() const = 0
///
///
///
///
/// Get the sub type of a constraint
///
///
[LibraryImport("jolt", EntryPoint = "Constraint_GetSubType")]
public static partial EConstraintSubType Constraint_GetSubType(Constraint self);
///
///
/// C++:
/// Jolt/Physics/Constraints/Constraint.h:138
///
/// uint32 GetConstraintPriority() const
///
///
///
///
/// Priority of the constraint when solving. Higher numbers have are more likely to be solved correctly.
/// Note that if you want a deterministic simulation and you cannot guarantee the order in which constraints are added/removed, you can make the priority for all constraints unique to get a deterministic ordering.
///
///
[LibraryImport("jolt", EntryPoint = "Constraint_GetConstraintPriority")]
public static partial uint Constraint_GetConstraintPriority(Constraint self);
///
///
/// C++:
/// Jolt/Physics/Constraints/Constraint.h:139
///
/// void SetConstraintPriority(uint32 inPriority)
///
///
[LibraryImport("jolt", EntryPoint = "Constraint_SetConstraintPriority")]
public static partial void Constraint_SetConstraintPriority(Constraint self, uint priority);
///
///
/// C++:
/// Jolt/Physics/Constraints/Constraint.h:142
///
/// void SetNumVelocityStepsOverride(uint inN)
///
///
///
///
/// Used only when the constraint is active. Override for the number of solver velocity iterations to
/// run, 0 means use the default in PhysicsSettings::mNumVelocitySteps. The number of iterations to use
/// is the max of all contacts and constraints in the island.
///
///
[LibraryImport("jolt", EntryPoint = "Constraint_SetNumVelocityStepsOverride")]
public static partial void Constraint_SetNumVelocityStepsOverride(Constraint self, uint n);
///
///
/// C++:
/// Jolt/Physics/Constraints/Constraint.h:143
///
/// uint GetNumVelocityStepsOverride() const
///
///
[LibraryImport("jolt", EntryPoint = "Constraint_GetNumVelocityStepsOverride")]
public static partial uint Constraint_GetNumVelocityStepsOverride(Constraint self);
///
///
/// C++:
/// Jolt/Physics/Constraints/Constraint.h:146
///
/// void SetNumPositionStepsOverride(uint inN)
///
///
///
///
/// Used only when the constraint is active. Override for the number of solver position iterations to
/// run, 0 means use the default in PhysicsSettings::mNumPositionSteps. The number of iterations to use
/// is the max of all contacts and constraints in the island.
///
///
[LibraryImport("jolt", EntryPoint = "Constraint_SetNumPositionStepsOverride")]
public static partial void Constraint_SetNumPositionStepsOverride(Constraint self, uint n);
///
///
/// C++:
/// Jolt/Physics/Constraints/Constraint.h:147
///
/// uint GetNumPositionStepsOverride() const
///
///
[LibraryImport("jolt", EntryPoint = "Constraint_GetNumPositionStepsOverride")]
public static partial uint Constraint_GetNumPositionStepsOverride(Constraint self);
///
///
/// C++:
/// Jolt/Physics/Constraints/Constraint.h:153
///
/// void SetEnabled(bool inEnabled)
///
///
///
///
/// Enable / disable this constraint. This can e.g. be used to implement a breakable constraint by detecting that the constraint impulse
/// (see e.g. PointConstraint::GetTotalLambdaPosition) went over a certain limit and then disabling the constraint.
/// Note that although a disabled constraint will not affect the simulation in any way anymore, it does incur some processing overhead.
/// Alternatively you can remove a constraint from the constraint manager (which may be more costly if you want to disable the constraint for a short while).
///
///
[LibraryImport("jolt", EntryPoint = "Constraint_SetEnabled")]
public static partial void Constraint_SetEnabled(Constraint self, Brutal.Bool8 enabled);
///
///
/// C++:
/// Jolt/Physics/Constraints/Constraint.h:156
///
/// bool GetEnabled() const
///
///
///
///
/// Test if a constraint is enabled.
///
///
[LibraryImport("jolt", EntryPoint = "Constraint_GetEnabled")]
public static partial Brutal.Bool8 Constraint_GetEnabled(Constraint self);
///
///
/// C++:
/// Jolt/Physics/Constraints/Constraint.h:159
///
/// uint64 GetUserData() const
///
///
///
///
/// Access to the user data, can be used for anything by the application
///
///
[LibraryImport("jolt", EntryPoint = "Constraint_GetUserData")]
public static partial ulong Constraint_GetUserData(Constraint self);
///
///
/// C++:
/// Jolt/Physics/Constraints/Constraint.h:160
///
/// void SetUserData(uint64 inUserData)
///
///
[LibraryImport("jolt", EntryPoint = "Constraint_SetUserData")]
public static partial void Constraint_SetUserData(Constraint self, ulong userData);
///
///
/// C++:
/// Jolt/Physics/Constraints/Constraint.h:166
///
/// virtual void NotifyShapeChanged(const BodyID &inBodyID, Vec3Arg inDeltaCOM) = 0
///
///
///
///
/// Notify the constraint that the shape of a body has changed and that its center of mass has moved by inDeltaCOM.
/// Bodies don't know which constraints are connected to them so the user is responsible for notifying the relevant constraints when a body changes.
/// @param inBodyID ID of the body that has changed
/// @param inDeltaCOM The delta of the center of mass of the body (shape->GetCenterOfMass() - shape_before_change->GetCenterOfMass())
///
///
[LibraryImport("jolt", EntryPoint = "Constraint_NotifyShapeChanged")]
public static partial void Constraint_NotifyShapeChanged(Constraint self, uint bodyID, float3 deltaCOM);
///
///
/// C++:
/// Jolt/Physics/Constraints/Constraint.h:172
///
/// virtual void ResetWarmStart() = 0
///
///
///
///
/// Notify the system that the configuration of the bodies and/or constraint has changed enough so that the warm start impulses should not be applied the next frame.
/// You can use this function for example when repositioning a ragdoll through Ragdoll::SetPose in such a way that the orientation of the bodies completely changes so that
/// the previous frame impulses are no longer a good approximation of what the impulses will be in the next frame. Calling this function when there are no big changes
/// will result in the constraints being much 'softer' than usual so they are more easily violated (e.g. a long chain of bodies might sag a bit if you call this every frame).
///
///
[LibraryImport("jolt", EntryPoint = "Constraint_ResetWarmStart")]
public static partial void Constraint_ResetWarmStart(Constraint self);
///
///
/// C++:
/// Jolt/Physics/Constraints/Constraint.h:176
///
/// virtual bool IsActive() const
///
///
///
///
/// @name Solver interface
/// @{
///
///
[LibraryImport("jolt", EntryPoint = "Constraint_IsActive")]
public static partial Brutal.Bool8 Constraint_IsActive(Constraint self);
///
///
/// C++:
/// Jolt/Physics/Constraints/Constraint.h:177
///
/// virtual void SetupVelocityConstraint(float inDeltaTime) = 0
///
///
[LibraryImport("jolt", EntryPoint = "Constraint_SetupVelocityConstraint")]
public static partial void Constraint_SetupVelocityConstraint(Constraint self, float deltaTime);
///
///
/// C++:
/// Jolt/Physics/Constraints/Constraint.h:178
///
/// virtual void WarmStartVelocityConstraint(float inWarmStartImpulseRatio) = 0
///
///
[LibraryImport("jolt", EntryPoint = "Constraint_WarmStartVelocityConstraint")]
public static partial void Constraint_WarmStartVelocityConstraint(Constraint self, float warmStartImpulseRatio);
///
///
/// C++:
/// Jolt/Physics/Constraints/Constraint.h:179
///
/// virtual bool SolveVelocityConstraint(float inDeltaTime) = 0
///
///
[LibraryImport("jolt", EntryPoint = "Constraint_SolveVelocityConstraint")]
public static partial Brutal.Bool8 Constraint_SolveVelocityConstraint(Constraint self, float deltaTime);
///
///
/// C++:
/// Jolt/Physics/Constraints/Constraint.h:180
///
/// virtual bool SolvePositionConstraint(float inDeltaTime, float inBaumgarte) = 0
///
///
[LibraryImport("jolt", EntryPoint = "Constraint_SolvePositionConstraint")]
public static partial Brutal.Bool8 Constraint_SolvePositionConstraint(Constraint self, float deltaTime, float baumgarte);
///
///
/// C++:
/// Jolt/Physics/Constraints/Constraint.h:184
///
/// virtual void BuildIslands(uint32 inConstraintIndex, IslandBuilder &ioBuilder, BodyManager &inBodyManager) = 0
///
///
///
///
/// Link bodies that are connected by this constraint in the island builder
///
///
[LibraryImport("jolt", EntryPoint = "Constraint_BuildIslands")]
public static partial void Constraint_BuildIslands(Constraint self, uint constraintIndex, IslandBuilder builder, BodyManager bodyManager);
///
///
/// C++:
/// Jolt/Physics/Constraints/Constraint.h:187
///
/// virtual uint BuildIslandSplits(LargeIslandSplitter &ioSplitter) const = 0
///
///
///
///
/// Link bodies that are connected by this constraint in the same split. Returns the split index.
///
///
[LibraryImport("jolt", EntryPoint = "Constraint_BuildIslandSplits")]
public static partial uint Constraint_BuildIslandSplits(Constraint self, LargeIslandSplitter splitter);
///
///
/// C++:
/// Jolt/Physics/Constraints/Constraint.h:191
///
/// virtual void DrawConstraint(DebugRenderer *inRenderer) const = 0
///
///
///
///
/// Drawing interface
///
///
[LibraryImport("jolt", EntryPoint = "Constraint_DrawConstraint")]
public static partial void Constraint_DrawConstraint(Constraint self, DebugRenderer renderer);
///
///
/// C++:
/// Jolt/Physics/Constraints/Constraint.h:192
///
/// virtual void DrawConstraintLimits(DebugRenderer *inRenderer) const
///
///
[LibraryImport("jolt", EntryPoint = "Constraint_DrawConstraintLimits")]
public static partial void Constraint_DrawConstraintLimits(Constraint self, DebugRenderer renderer);
///
///
/// C++:
/// Jolt/Physics/Constraints/Constraint.h:193
///
/// virtual void DrawConstraintReferenceFrame(DebugRenderer *inRenderer) const
///
///
[LibraryImport("jolt", EntryPoint = "Constraint_DrawConstraintReferenceFrame")]
public static partial void Constraint_DrawConstraintReferenceFrame(Constraint self, DebugRenderer renderer);
///
///
/// C++:
/// Jolt/Physics/Constraints/Constraint.h:196
///
/// float GetDrawConstraintSize() const
///
///
///
///
/// Size of constraint when drawing it through the debug renderer
///
///
[LibraryImport("jolt", EntryPoint = "Constraint_GetDrawConstraintSize")]
public static partial float Constraint_GetDrawConstraintSize(Constraint self);
///
///
/// C++:
/// Jolt/Physics/Constraints/Constraint.h:197
///
/// void SetDrawConstraintSize(float inSize)
///
///
[LibraryImport("jolt", EntryPoint = "Constraint_SetDrawConstraintSize")]
public static partial void Constraint_SetDrawConstraintSize(Constraint self, float size);
///
///
/// C++:
/// Jolt/Physics/Constraints/Constraint.h:207
///
/// virtual Ref<ConstraintSettings> GetConstraintSettings() const = 0
///
///
///
///
/// Debug function to convert a constraint to its settings, note that this will not save to which bodies
/// the constraint is connected to
///
///
[LibraryImport("jolt", EntryPoint = "Constraint_GetConstraintSettings")]
public static partial ConstraintSettings Constraint_GetConstraintSettings(Constraint self);
[LibraryImport("jolt", EntryPoint = "Constraint_AddRef")]
public static partial void Constraint_AddRef(Constraint self);
[LibraryImport("jolt", EntryPoint = "Constraint_Release")]
public static partial void Constraint_Release(Constraint self);
[LibraryImport("jolt", EntryPoint = "Constraint_GetRefCount")]
public static partial uint Constraint_GetRefCount(Constraint self);
}
}
}