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

190 lines
8.9 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#L21">Jolt/Physics/Ragdoll/Ragdoll.h:21</see>
/// <br/>
/// <c>class RagdollSettings : public RefTarget&lt;RagdollSettings&gt;</c>
/// </para>
/// </summary>
/// <remarks>
/// <para>
/// Contains the structure of a ragdoll
/// </para>
/// </remarks>
[InteropHandle]
public readonly partial struct RagdollSettings : IDisposable
{
public static RagdollSettings Create() => Jolt.PInvoke.RagdollSettings_Create();
/// <summary>
/// <para>
/// C++:
/// <see href="https://github.com/jrouwe/JoltPhysics/blob/23dadd0e603f1b321142d4c74df07fce85064989/Jolt/Physics/Ragdoll/Ragdoll.h#L28">Jolt/Physics/Ragdoll/Ragdoll.h:28</see>
/// <br/>
/// <c>bool Stabilize()</c>
/// </para>
/// </summary>
/// <remarks>
/// <code>
/// Stabilize the constraints of the ragdoll
/// @return True on success, false on failure.
/// </code>
/// </remarks>
public bool Stabilize() => Jolt.PInvoke.RagdollSettings_Stabilize(this);
/// <summary>
/// <para>
/// C++:
/// <see href="https://github.com/jrouwe/JoltPhysics/blob/23dadd0e603f1b321142d4c74df07fce85064989/Jolt/Physics/Ragdoll/Ragdoll.h#L33">Jolt/Physics/Ragdoll/Ragdoll.h:33</see>
/// <br/>
/// <c>void CalculateConstraintPriorities(uint32 inBasePriority = 0)</c>
/// </para>
/// </summary>
/// <remarks>
/// <code>
/// Initializes the constraint priorities so that constraints near the leaves of the ragdoll have a lower priority
/// than constraints near the root of the ragdoll.
/// @param inBasePriority The lowest priority that will be used in the ragdoll.
/// </code>
/// </remarks>
public void CalculateConstraintPriorities(uint basePriority) => Jolt.PInvoke.RagdollSettings_CalculateConstraintPriorities(this, basePriority);
/// <summary>
/// <para>
/// C++:
/// <see href="https://github.com/jrouwe/JoltPhysics/blob/23dadd0e603f1b321142d4c74df07fce85064989/Jolt/Physics/Ragdoll/Ragdoll.h#L53">Jolt/Physics/Ragdoll/Ragdoll.h:53</see>
/// <br/>
/// <c>void SaveBinaryState(StreamOut &amp;inStream, bool inSaveShapes, bool inSaveGroupFilter) const</c>
/// </para>
/// </summary>
/// <remarks>
/// <code>
/// Saves the state of this object in binary form to inStream.
/// @param inStream The stream to save the state to
/// @param inSaveShapes If the shapes should be saved as well (these could be shared between ragdolls, in which case the calling application may want to write custom code to restore them)
/// @param inSaveGroupFilter If the group filter should be saved as well (these could be shared)
/// </code>
/// </remarks>
public void SaveBinaryState(StreamOut stream, bool saveShapes, bool saveGroupFilter) => Jolt.PInvoke.RagdollSettings_SaveBinaryState(this, stream, saveShapes, saveGroupFilter);
/// <summary>
/// <para>
/// C++:
/// <see href="https://github.com/jrouwe/JoltPhysics/blob/23dadd0e603f1b321142d4c74df07fce85064989/Jolt/Physics/Ragdoll/Ragdoll.h#L58">Jolt/Physics/Ragdoll/Ragdoll.h:58</see>
/// <br/>
/// <c>static RagdollResult sRestoreFromBinaryState(StreamIn &amp;inStream)</c>
/// </para>
/// </summary>
/// <remarks>
/// <para>
/// Restore a saved ragdoll from inStream
/// </para>
/// <para>
/// Throws InvalidOperationException with Jolt's error message when the operation fails.
/// </para>
/// </remarks>
public static RagdollSettings sRestoreFromBinaryState(StreamIn stream)
{
var _handle = Jolt.PInvoke.RagdollSettings_sRestoreFromBinaryState(stream);
if (_handle.IsNull()) throw new InvalidOperationException(Jolt.GetLastError());
return _handle;
}
/// <summary>
/// <para>
/// C++:
/// <see href="https://github.com/jrouwe/JoltPhysics/blob/23dadd0e603f1b321142d4c74df07fce85064989/Jolt/Physics/Ragdoll/Ragdoll.h#L62">Jolt/Physics/Ragdoll/Ragdoll.h:62</see>
/// <br/>
/// <c>Ragdoll * CreateRagdoll(CollisionGroup::GroupID inCollisionGroup, uint64 inUserData, PhysicsSystem *inSystem) const</c>
/// </para>
/// </summary>
/// <remarks>
/// <code>
/// Create ragdoll instance from these settings
/// @return Newly created ragdoll or null when out of bodies
/// </code>
/// </remarks>
public Ragdoll CreateRagdoll(uint collisionGroup, ulong userData, PhysicsSystem system) => Jolt.PInvoke.RagdollSettings_CreateRagdoll(this, collisionGroup, userData, system);
/// <summary>
/// <para>
/// C++:
/// <see href="https://github.com/jrouwe/JoltPhysics/blob/23dadd0e603f1b321142d4c74df07fce85064989/Jolt/Physics/Ragdoll/Ragdoll.h#L65">Jolt/Physics/Ragdoll/Ragdoll.h:65</see>
/// <br/>
/// <c>const Skeleton * GetSkeleton() const</c>
/// </para>
/// </summary>
/// <remarks>
/// <para>
/// Access to the skeleton of this ragdoll
/// </para>
/// </remarks>
public Skeleton GetSkeleton() => Jolt.PInvoke.RagdollSettings_GetSkeleton(this);
/// <summary>
/// <para>
/// C++:
/// <see href="https://github.com/jrouwe/JoltPhysics/blob/23dadd0e603f1b321142d4c74df07fce85064989/Jolt/Physics/Ragdoll/Ragdoll.h#L69">Jolt/Physics/Ragdoll/Ragdoll.h:69</see>
/// <br/>
/// <c>void CalculateBodyIndexToConstraintIndex()</c>
/// </para>
/// </summary>
/// <remarks>
/// <para>
/// Calculate the map needed for GetBodyIndexToConstraintIndex()
/// </para>
/// </remarks>
public void CalculateBodyIndexToConstraintIndex() => Jolt.PInvoke.RagdollSettings_CalculateBodyIndexToConstraintIndex(this);
/// <summary>
/// <para>
/// C++:
/// <see href="https://github.com/jrouwe/JoltPhysics/blob/23dadd0e603f1b321142d4c74df07fce85064989/Jolt/Physics/Ragdoll/Ragdoll.h#L76">Jolt/Physics/Ragdoll/Ragdoll.h:76</see>
/// <br/>
/// <c>int GetConstraintIndexForBodyIndex(int inBodyIndex) const</c>
/// </para>
/// </summary>
/// <remarks>
/// <para>
/// Map a single body index to a constraint index
/// </para>
/// </remarks>
public int GetConstraintIndexForBodyIndex(int bodyIndex) => Jolt.PInvoke.RagdollSettings_GetConstraintIndexForBodyIndex(this, bodyIndex);
/// <summary>
/// <para>
/// C++:
/// <see href="https://github.com/jrouwe/JoltPhysics/blob/23dadd0e603f1b321142d4c74df07fce85064989/Jolt/Physics/Ragdoll/Ragdoll.h#L79">Jolt/Physics/Ragdoll/Ragdoll.h:79</see>
/// <br/>
/// <c>void CalculateConstraintIndexToBodyIdxPair()</c>
/// </para>
/// </summary>
/// <remarks>
/// <para>
/// Calculate the map needed for GetConstraintIndexToBodyIdxPair()
/// </para>
/// </remarks>
public void CalculateConstraintIndexToBodyIdxPair() => Jolt.PInvoke.RagdollSettings_CalculateConstraintIndexToBodyIdxPair(this);
/// <summary>
/// <para>
/// C++:
/// <see href="https://github.com/jrouwe/JoltPhysics/blob/23dadd0e603f1b321142d4c74df07fce85064989/Jolt/Physics/Ragdoll/Ragdoll.h#L119">Jolt/Physics/Ragdoll/Ragdoll.h:119</see>
/// <br/>
/// <c>Ref&lt;Skeleton&gt; mSkeleton</c>
/// </para>
/// </summary>
/// <remarks>
/// <para>
/// The skeleton for this ragdoll
/// </para>
/// </remarks>
public void SetSkeleton(Skeleton value) => Jolt.PInvoke.RagdollSettings_SetSkeleton(this, value);
public void AddRef() => Jolt.PInvoke.RagdollSettings_AddRef(this);
public void Release() => Jolt.PInvoke.RagdollSettings_Release(this);
public uint GetRefCount() => Jolt.PInvoke.RagdollSettings_GetRefCount(this);
public void Dispose()
{
if (IsNull()) return;
Release();
}
}
}