mirror of
https://github.com/ahwootech/BRUTAL.git
synced 2026-11-26 04:58:24 +01:00
109 lines
4.5 KiB
C#
109 lines
4.5 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/Skeleton/Skeleton.h#L17">Jolt/Skeleton/Skeleton.h:17</see>
|
|
/// <br/>
|
|
/// <c>class Skeleton : public RefTarget<Skeleton></c>
|
|
/// </para>
|
|
/// </summary>
|
|
/// <remarks>
|
|
/// <para>
|
|
/// Resource that contains the joint hierarchy for a skeleton
|
|
/// </para>
|
|
/// </remarks>
|
|
[InteropHandle]
|
|
public readonly partial struct Skeleton : IDisposable
|
|
{
|
|
public static Skeleton Create() => Jolt.PInvoke.Skeleton_Create();
|
|
/// <summary>
|
|
/// <para>
|
|
/// C++:
|
|
/// <see href="https://github.com/jrouwe/JoltPhysics/blob/23dadd0e603f1b321142d4c74df07fce85064989/Jolt/Skeleton/Skeleton.h#L44">Jolt/Skeleton/Skeleton.h:44</see>
|
|
/// <br/>
|
|
/// <c>int GetJointCount() const</c>
|
|
/// </para>
|
|
/// </summary>
|
|
public int GetJointCount() => Jolt.PInvoke.Skeleton_GetJointCount(this);
|
|
/// <summary>
|
|
/// <para>
|
|
/// C++:
|
|
/// <see href="https://github.com/jrouwe/JoltPhysics/blob/23dadd0e603f1b321142d4c74df07fce85064989/Jolt/Skeleton/Skeleton.h#L55">Jolt/Skeleton/Skeleton.h:55</see>
|
|
/// <br/>
|
|
/// <c>void CalculateParentJointIndices()</c>
|
|
/// </para>
|
|
/// </summary>
|
|
/// <remarks>
|
|
/// <para>
|
|
/// Fill in parent joint indices based on name
|
|
/// </para>
|
|
/// </remarks>
|
|
public void CalculateParentJointIndices() => Jolt.PInvoke.Skeleton_CalculateParentJointIndices(this);
|
|
/// <summary>
|
|
/// <para>
|
|
/// C++:
|
|
/// <see href="https://github.com/jrouwe/JoltPhysics/blob/23dadd0e603f1b321142d4c74df07fce85064989/Jolt/Skeleton/Skeleton.h#L59">Jolt/Skeleton/Skeleton.h:59</see>
|
|
/// <br/>
|
|
/// <c>bool AreJointsCorrectlyOrdered() const</c>
|
|
/// </para>
|
|
/// </summary>
|
|
/// <remarks>
|
|
/// <code>
|
|
/// Many of the algorithms that use the Skeleton class require that parent joints are in the mJoints array before their children.
|
|
/// This function returns true if this is the case, false if not.
|
|
/// </code>
|
|
/// </remarks>
|
|
public bool AreJointsCorrectlyOrdered() => Jolt.PInvoke.Skeleton_AreJointsCorrectlyOrdered(this);
|
|
/// <summary>
|
|
/// <para>
|
|
/// C++:
|
|
/// <see href="https://github.com/jrouwe/JoltPhysics/blob/23dadd0e603f1b321142d4c74df07fce85064989/Jolt/Skeleton/Skeleton.h#L62">Jolt/Skeleton/Skeleton.h:62</see>
|
|
/// <br/>
|
|
/// <c>void SaveBinaryState(StreamOut &inStream) const</c>
|
|
/// </para>
|
|
/// </summary>
|
|
/// <remarks>
|
|
/// <para>
|
|
/// Saves the state of this object in binary form to inStream.
|
|
/// </para>
|
|
/// </remarks>
|
|
public void SaveBinaryState(StreamOut stream) => Jolt.PInvoke.Skeleton_SaveBinaryState(this, stream);
|
|
/// <summary>
|
|
/// <para>
|
|
/// C++:
|
|
/// <see href="https://github.com/jrouwe/JoltPhysics/blob/23dadd0e603f1b321142d4c74df07fce85064989/Jolt/Skeleton/Skeleton.h#L65">Jolt/Skeleton/Skeleton.h:65</see>
|
|
/// <br/>
|
|
/// <c>static SkeletonResult sRestoreFromBinaryState(StreamIn &inStream)</c>
|
|
/// </para>
|
|
/// </summary>
|
|
/// <remarks>
|
|
/// <para>
|
|
/// Restore the state of this object from inStream.
|
|
/// </para>
|
|
/// <para>
|
|
/// Throws InvalidOperationException with Jolt's error message when the operation fails.
|
|
/// </para>
|
|
/// </remarks>
|
|
public static Skeleton sRestoreFromBinaryState(StreamIn stream)
|
|
{
|
|
var _handle = Jolt.PInvoke.Skeleton_sRestoreFromBinaryState(stream);
|
|
if (_handle.IsNull()) throw new InvalidOperationException(Jolt.GetLastError());
|
|
return _handle;
|
|
}
|
|
public void AddRef() => Jolt.PInvoke.Skeleton_AddRef(this);
|
|
public void Release() => Jolt.PInvoke.Skeleton_Release(this);
|
|
public uint GetRefCount() => Jolt.PInvoke.Skeleton_GetRefCount(this);
|
|
public void Dispose()
|
|
{
|
|
if (IsNull()) return;
|
|
Release();
|
|
}
|
|
}
|
|
}
|