brutal/brutal.jolt/Brutal.Jolt/Generated/Classes/Ragdoll.gen.cs
2026-10-15 14:12:02 +13:00

333 lines
16 KiB
C#

// <auto-generated/>
// Generated by Brutal.Jolt.Generate; do not edit by hand.
#nullable enable
using Brutal.Interop;
using Brutal.Numerics;
namespace Brutal.JoltApi
{
/// <summary>
/// <para>
/// C++:
/// <see href="https://github.com/jrouwe/JoltPhysics/blob/23dadd0e603f1b321142d4c74df07fce85064989/Jolt/Physics/Ragdoll/Ragdoll.h#L136">Jolt/Physics/Ragdoll/Ragdoll.h:136</see>
/// <br/>
/// <c>class Ragdoll : public RefTarget&lt;Ragdoll&gt;, public NonCopyable</c>
/// </para>
/// </summary>
/// <remarks>
/// <para>
/// Runtime ragdoll information
/// </para>
/// </remarks>
[InteropHandle]
public readonly partial struct Ragdoll : IDisposable
{
/// <summary>
/// <para>
/// C++:
/// <see href="https://github.com/jrouwe/JoltPhysics/blob/23dadd0e603f1b321142d4c74df07fce85064989/Jolt/Physics/Ragdoll/Ragdoll.h#L142">Jolt/Physics/Ragdoll/Ragdoll.h:142</see>
/// <br/>
/// <c>explicit Ragdoll(PhysicsSystem *inSystem)</c>
/// </para>
/// </summary>
/// <remarks>
/// <para>
/// Constructor
/// </para>
/// </remarks>
public static Ragdoll Create(PhysicsSystem system) => Jolt.PInvoke.Ragdoll_Create(system);
/// <summary>
/// <para>
/// C++:
/// <see href="https://github.com/jrouwe/JoltPhysics/blob/23dadd0e603f1b321142d4c74df07fce85064989/Jolt/Physics/Ragdoll/Ragdoll.h#L148">Jolt/Physics/Ragdoll/Ragdoll.h:148</see>
/// <br/>
/// <c>void AddToPhysicsSystem(EActivation inActivationMode, bool inLockBodies = true)</c>
/// </para>
/// </summary>
/// <remarks>
/// <para>
/// Add bodies and constraints to the system and optionally activate the bodies
/// </para>
/// </remarks>
public void AddToPhysicsSystem(EActivation activationMode, bool lockBodies) => Jolt.PInvoke.Ragdoll_AddToPhysicsSystem(this, activationMode, lockBodies);
/// <summary>
/// <para>
/// C++:
/// <see href="https://github.com/jrouwe/JoltPhysics/blob/23dadd0e603f1b321142d4c74df07fce85064989/Jolt/Physics/Ragdoll/Ragdoll.h#L151">Jolt/Physics/Ragdoll/Ragdoll.h:151</see>
/// <br/>
/// <c>void RemoveFromPhysicsSystem(bool inLockBodies = true)</c>
/// </para>
/// </summary>
/// <remarks>
/// <para>
/// Remove bodies and constraints from the system
/// </para>
/// </remarks>
public void RemoveFromPhysicsSystem(bool lockBodies) => Jolt.PInvoke.Ragdoll_RemoveFromPhysicsSystem(this, lockBodies);
/// <summary>
/// <para>
/// C++:
/// <see href="https://github.com/jrouwe/JoltPhysics/blob/23dadd0e603f1b321142d4c74df07fce85064989/Jolt/Physics/Ragdoll/Ragdoll.h#L154">Jolt/Physics/Ragdoll/Ragdoll.h:154</see>
/// <br/>
/// <c>void Activate(bool inLockBodies = true)</c>
/// </para>
/// </summary>
/// <remarks>
/// <para>
/// Wake up all bodies in the ragdoll
/// </para>
/// </remarks>
public void Activate(bool lockBodies) => Jolt.PInvoke.Ragdoll_Activate(this, lockBodies);
/// <summary>
/// <para>
/// C++:
/// <see href="https://github.com/jrouwe/JoltPhysics/blob/23dadd0e603f1b321142d4c74df07fce85064989/Jolt/Physics/Ragdoll/Ragdoll.h#L160">Jolt/Physics/Ragdoll/Ragdoll.h:160</see>
/// <br/>
/// <c>bool IsActive(bool inLockBodies = true) const</c>
/// </para>
/// </summary>
/// <remarks>
/// <code>
/// Check if one or more of the bodies in the ragdoll are active.
/// Note that this involves locking the bodies (if inLockBodies is true) and looping over them. An alternative and possibly faster
/// way could be to install a BodyActivationListener and count the number of active bodies of a ragdoll as they're activated / deactivated
/// (basically check if the body that activates / deactivates is in GetBodyIDs() and increment / decrement a counter).
/// </code>
/// </remarks>
public bool IsActive(bool lockBodies) => Jolt.PInvoke.Ragdoll_IsActive(this, lockBodies);
/// <summary>
/// <para>
/// C++:
/// <see href="https://github.com/jrouwe/JoltPhysics/blob/23dadd0e603f1b321142d4c74df07fce85064989/Jolt/Physics/Ragdoll/Ragdoll.h#L163">Jolt/Physics/Ragdoll/Ragdoll.h:163</see>
/// <br/>
/// <c>void SetGroupID(CollisionGroup::GroupID inGroupID, bool inLockBodies = true)</c>
/// </para>
/// </summary>
/// <remarks>
/// <para>
/// Set the group ID on all bodies in the ragdoll
/// </para>
/// </remarks>
public void SetGroupID(uint groupID, bool lockBodies) => Jolt.PInvoke.Ragdoll_SetGroupID(this, groupID, lockBodies);
/// <summary>
/// <para>
/// C++:
/// <see href="https://github.com/jrouwe/JoltPhysics/blob/23dadd0e603f1b321142d4c74df07fce85064989/Jolt/Physics/Ragdoll/Ragdoll.h#L166">Jolt/Physics/Ragdoll/Ragdoll.h:166</see>
/// <br/>
/// <c>void SetPose(const SkeletonPose &amp;inPose, bool inLockBodies = true)</c>
/// </para>
/// </summary>
/// <remarks>
/// <para>
/// Set the ragdoll to a pose (calls BodyInterface::SetPositionAndRotation to instantly move the ragdoll)
/// </para>
/// </remarks>
public void SetPose(SkeletonPose pose, bool lockBodies) => Jolt.PInvoke.Ragdoll_SetPose(this, pose, lockBodies);
/// <summary>
/// <para>
/// C++:
/// <see href="https://github.com/jrouwe/JoltPhysics/blob/23dadd0e603f1b321142d4c74df07fce85064989/Jolt/Physics/Ragdoll/Ragdoll.h#L172">Jolt/Physics/Ragdoll/Ragdoll.h:172</see>
/// <br/>
/// <c>void GetPose(SkeletonPose &amp;outPose, bool inLockBodies = true)</c>
/// </para>
/// </summary>
/// <remarks>
/// <para>
/// Get the ragdoll pose (uses the world transform of the bodies to calculate the pose)
/// </para>
/// </remarks>
public void GetPose(SkeletonPose pose, bool lockBodies) => Jolt.PInvoke.Ragdoll_GetPose(this, pose, lockBodies);
/// <summary>
/// <para>
/// C++:
/// <see href="https://github.com/jrouwe/JoltPhysics/blob/23dadd0e603f1b321142d4c74df07fce85064989/Jolt/Physics/Ragdoll/Ragdoll.h#L178">Jolt/Physics/Ragdoll/Ragdoll.h:178</see>
/// <br/>
/// <c>void ResetWarmStart()</c>
/// </para>
/// </summary>
/// <remarks>
/// <para>
/// This function calls ResetWarmStart on all constraints. It can be used after calling SetPose to reset
/// previous frames impulses. See: Constraint::ResetWarmStart.
/// </para>
/// </remarks>
public void ResetWarmStart() => Jolt.PInvoke.Ragdoll_ResetWarmStart(this);
/// <summary>
/// <para>
/// C++:
/// <see href="https://github.com/jrouwe/JoltPhysics/blob/23dadd0e603f1b321142d4c74df07fce85064989/Jolt/Physics/Ragdoll/Ragdoll.h#L181">Jolt/Physics/Ragdoll/Ragdoll.h:181</see>
/// <br/>
/// <c>void DriveToPoseUsingKinematics(const SkeletonPose &amp;inPose, float inDeltaTime, bool inLockBodies = true)</c>
/// </para>
/// </summary>
/// <remarks>
/// <para>
/// Drive the ragdoll to a specific pose by setting velocities on each of the bodies so that it will reach
/// inPose in inDeltaTime
/// </para>
/// </remarks>
public void DriveToPoseUsingKinematics(SkeletonPose pose, float deltaTime, bool lockBodies) => Jolt.PInvoke.Ragdoll_DriveToPoseUsingKinematics(this, pose, deltaTime, lockBodies);
/// <summary>
/// <para>
/// C++:
/// <see href="https://github.com/jrouwe/JoltPhysics/blob/23dadd0e603f1b321142d4c74df07fce85064989/Jolt/Physics/Ragdoll/Ragdoll.h#L187">Jolt/Physics/Ragdoll/Ragdoll.h:187</see>
/// <br/>
/// <c>void DriveToPoseUsingMotors(const SkeletonPose &amp;inPose)</c>
/// </para>
/// </summary>
/// <remarks>
/// <para>
/// Drive the ragdoll to a specific pose by activating the motors on each constraint
/// </para>
/// </remarks>
public void DriveToPoseUsingMotors(SkeletonPose pose) => Jolt.PInvoke.Ragdoll_DriveToPoseUsingMotors(this, pose);
/// <summary>
/// <para>
/// C++:
/// <see href="https://github.com/jrouwe/JoltPhysics/blob/23dadd0e603f1b321142d4c74df07fce85064989/Jolt/Physics/Ragdoll/Ragdoll.h#L190">Jolt/Physics/Ragdoll/Ragdoll.h:190</see>
/// <br/>
/// <c>void SetLinearAndAngularVelocity(Vec3Arg inLinearVelocity, Vec3Arg inAngularVelocity, bool inLockBodies = true)</c>
/// </para>
/// </summary>
/// <remarks>
/// <para>
/// Control the linear and velocity of all bodies in the ragdoll
/// </para>
/// </remarks>
public void SetLinearAndAngularVelocity(float3 linearVelocity, float3 angularVelocity, bool lockBodies) => Jolt.PInvoke.Ragdoll_SetLinearAndAngularVelocity(this, linearVelocity, angularVelocity, lockBodies);
/// <summary>
/// <para>
/// C++:
/// <see href="https://github.com/jrouwe/JoltPhysics/blob/23dadd0e603f1b321142d4c74df07fce85064989/Jolt/Physics/Ragdoll/Ragdoll.h#L193">Jolt/Physics/Ragdoll/Ragdoll.h:193</see>
/// <br/>
/// <c>void SetLinearVelocity(Vec3Arg inLinearVelocity, bool inLockBodies = true)</c>
/// </para>
/// </summary>
/// <remarks>
/// <para>
/// Set the world space linear velocity of all bodies in the ragdoll.
/// </para>
/// </remarks>
public void SetLinearVelocity(float3 linearVelocity, bool lockBodies) => Jolt.PInvoke.Ragdoll_SetLinearVelocity(this, linearVelocity, lockBodies);
/// <summary>
/// <para>
/// C++:
/// <see href="https://github.com/jrouwe/JoltPhysics/blob/23dadd0e603f1b321142d4c74df07fce85064989/Jolt/Physics/Ragdoll/Ragdoll.h#L196">Jolt/Physics/Ragdoll/Ragdoll.h:196</see>
/// <br/>
/// <c>void AddLinearVelocity(Vec3Arg inLinearVelocity, bool inLockBodies = true)</c>
/// </para>
/// </summary>
/// <remarks>
/// <para>
/// Add a world space velocity (in m/s) to all bodies in the ragdoll.
/// </para>
/// </remarks>
public void AddLinearVelocity(float3 linearVelocity, bool lockBodies) => Jolt.PInvoke.Ragdoll_AddLinearVelocity(this, linearVelocity, lockBodies);
/// <summary>
/// <para>
/// C++:
/// <see href="https://github.com/jrouwe/JoltPhysics/blob/23dadd0e603f1b321142d4c74df07fce85064989/Jolt/Physics/Ragdoll/Ragdoll.h#L199">Jolt/Physics/Ragdoll/Ragdoll.h:199</see>
/// <br/>
/// <c>void AddImpulse(Vec3Arg inImpulse, bool inLockBodies = true)</c>
/// </para>
/// </summary>
/// <remarks>
/// <para>
/// Add impulse to all bodies of the ragdoll (center of mass of each of them)
/// </para>
/// </remarks>
public void AddImpulse(float3 impulse, bool lockBodies) => Jolt.PInvoke.Ragdoll_AddImpulse(this, impulse, lockBodies);
/// <summary>
/// <para>
/// C++:
/// <see href="https://github.com/jrouwe/JoltPhysics/blob/23dadd0e603f1b321142d4c74df07fce85064989/Jolt/Physics/Ragdoll/Ragdoll.h#L202">Jolt/Physics/Ragdoll/Ragdoll.h:202</see>
/// <br/>
/// <c>void GetRootTransform(RVec3 &amp;outPosition, Quat &amp;outRotation, bool inLockBodies = true) const</c>
/// </para>
/// </summary>
/// <remarks>
/// <para>
/// Get the position and orientation of the root of the ragdoll
/// </para>
/// </remarks>
public void GetRootTransform(out float3 position, out floatQuat rotation, bool lockBodies) => Jolt.PInvoke.Ragdoll_GetRootTransform(this, out position, out rotation, lockBodies);
/// <summary>
/// <para>
/// C++:
/// <see href="https://github.com/jrouwe/JoltPhysics/blob/23dadd0e603f1b321142d4c74df07fce85064989/Jolt/Physics/Ragdoll/Ragdoll.h#L205">Jolt/Physics/Ragdoll/Ragdoll.h:205</see>
/// <br/>
/// <c>size_t GetBodyCount() const</c>
/// </para>
/// </summary>
/// <remarks>
/// <para>
/// Get number of bodies in the ragdoll
/// </para>
/// </remarks>
public ElementCount GetBodyCount() => (ElementCount)Jolt.PInvoke.Ragdoll_GetBodyCount(this);
/// <summary>
/// <para>
/// C++:
/// <see href="https://github.com/jrouwe/JoltPhysics/blob/23dadd0e603f1b321142d4c74df07fce85064989/Jolt/Physics/Ragdoll/Ragdoll.h#L208">Jolt/Physics/Ragdoll/Ragdoll.h:208</see>
/// <br/>
/// <c>BodyID GetBodyID(int inBodyIndex) const</c>
/// </para>
/// </summary>
/// <remarks>
/// <para>
/// Access a body ID
/// </para>
/// </remarks>
public uint GetBodyID(int bodyIndex) => Jolt.PInvoke.Ragdoll_GetBodyID(this, bodyIndex);
/// <summary>
/// <para>
/// C++:
/// <see href="https://github.com/jrouwe/JoltPhysics/blob/23dadd0e603f1b321142d4c74df07fce85064989/Jolt/Physics/Ragdoll/Ragdoll.h#L214">Jolt/Physics/Ragdoll/Ragdoll.h:214</see>
/// <br/>
/// <c>size_t GetConstraintCount() const</c>
/// </para>
/// </summary>
/// <remarks>
/// <para>
/// Get number of constraints in the ragdoll
/// </para>
/// </remarks>
public ElementCount GetConstraintCount() => (ElementCount)Jolt.PInvoke.Ragdoll_GetConstraintCount(this);
/// <summary>
/// <para>
/// C++:
/// <see href="https://github.com/jrouwe/JoltPhysics/blob/23dadd0e603f1b321142d4c74df07fce85064989/Jolt/Physics/Ragdoll/Ragdoll.h#L217">Jolt/Physics/Ragdoll/Ragdoll.h:217</see>
/// <br/>
/// <c>TwoBodyConstraint * GetConstraint(int inConstraintIndex)</c>
/// </para>
/// </summary>
/// <remarks>
/// <para>
/// Access a constraint by index
/// </para>
/// </remarks>
public TwoBodyConstraint GetConstraint(int constraintIndex) => Jolt.PInvoke.Ragdoll_GetConstraint(this, constraintIndex);
/// <summary>
/// <para>
/// C++:
/// <see href="https://github.com/jrouwe/JoltPhysics/blob/23dadd0e603f1b321142d4c74df07fce85064989/Jolt/Physics/Ragdoll/Ragdoll.h#L226">Jolt/Physics/Ragdoll/Ragdoll.h:226</see>
/// <br/>
/// <c>const RagdollSettings * GetRagdollSettings() const</c>
/// </para>
/// </summary>
/// <remarks>
/// <para>
/// Get the settings object that created this ragdoll
/// </para>
/// </remarks>
public RagdollSettings GetRagdollSettings() => Jolt.PInvoke.Ragdoll_GetRagdollSettings(this);
public void AddRef() => Jolt.PInvoke.Ragdoll_AddRef(this);
public void Release() => Jolt.PInvoke.Ragdoll_Release(this);
public uint GetRefCount() => Jolt.PInvoke.Ragdoll_GetRefCount(this);
public void Dispose()
{
if (IsNull()) return;
Release();
}
}
}