mirror of
https://github.com/ahwootech/BRUTAL.git
synced 2026-11-26 13:08:24 +01:00
137 lines
5.9 KiB
C#
137 lines
5.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/Skeleton/SkeletalAnimation.h#L17">Jolt/Skeleton/SkeletalAnimation.h:17</see>
|
|
/// <br/>
|
|
/// <c>class SkeletalAnimation : public RefTarget<SkeletalAnimation></c>
|
|
/// </para>
|
|
/// </summary>
|
|
/// <remarks>
|
|
/// <para>
|
|
/// Resource for a skinned animation
|
|
/// </para>
|
|
/// </remarks>
|
|
[InteropHandle]
|
|
public readonly partial struct SkeletalAnimation : IDisposable
|
|
{
|
|
public static SkeletalAnimation Create() => Jolt.PInvoke.SkeletalAnimation_Create();
|
|
/// <summary>
|
|
/// <para>
|
|
/// C++:
|
|
/// <see href="https://github.com/jrouwe/JoltPhysics/blob/23dadd0e603f1b321142d4c74df07fce85064989/Jolt/Skeleton/SkeletalAnimation.h#L62">Jolt/Skeleton/SkeletalAnimation.h:62</see>
|
|
/// <br/>
|
|
/// <c>float GetDuration() const</c>
|
|
/// </para>
|
|
/// </summary>
|
|
/// <remarks>
|
|
/// <para>
|
|
/// Get the length (in seconds) of this animation
|
|
/// </para>
|
|
/// </remarks>
|
|
public float GetDuration() => Jolt.PInvoke.SkeletalAnimation_GetDuration(this);
|
|
/// <summary>
|
|
/// <para>
|
|
/// C++:
|
|
/// <see href="https://github.com/jrouwe/JoltPhysics/blob/23dadd0e603f1b321142d4c74df07fce85064989/Jolt/Skeleton/SkeletalAnimation.h#L65">Jolt/Skeleton/SkeletalAnimation.h:65</see>
|
|
/// <br/>
|
|
/// <c>void ScaleJoints(float inScale)</c>
|
|
/// </para>
|
|
/// </summary>
|
|
/// <remarks>
|
|
/// <para>
|
|
/// Scale the size of all joints by inScale
|
|
/// </para>
|
|
/// </remarks>
|
|
public void ScaleJoints(float scale) => Jolt.PInvoke.SkeletalAnimation_ScaleJoints(this, scale);
|
|
/// <summary>
|
|
/// <para>
|
|
/// C++:
|
|
/// <see href="https://github.com/jrouwe/JoltPhysics/blob/23dadd0e603f1b321142d4c74df07fce85064989/Jolt/Skeleton/SkeletalAnimation.h#L68">Jolt/Skeleton/SkeletalAnimation.h:68</see>
|
|
/// <br/>
|
|
/// <c>void SetIsLooping(bool inIsLooping)</c>
|
|
/// </para>
|
|
/// </summary>
|
|
/// <remarks>
|
|
/// <para>
|
|
/// If the animation is looping or not. If an animation is looping, the animation will continue playing
|
|
/// after completion
|
|
/// </para>
|
|
/// </remarks>
|
|
public void SetIsLooping(bool isLooping) => Jolt.PInvoke.SkeletalAnimation_SetIsLooping(this, isLooping);
|
|
/// <summary>
|
|
/// <para>
|
|
/// C++:
|
|
/// <see href="https://github.com/jrouwe/JoltPhysics/blob/23dadd0e603f1b321142d4c74df07fce85064989/Jolt/Skeleton/SkeletalAnimation.h#L69">Jolt/Skeleton/SkeletalAnimation.h:69</see>
|
|
/// <br/>
|
|
/// <c>bool IsLooping() const</c>
|
|
/// </para>
|
|
/// </summary>
|
|
public bool IsLooping() => Jolt.PInvoke.SkeletalAnimation_IsLooping(this);
|
|
/// <summary>
|
|
/// <para>
|
|
/// C++:
|
|
/// <see href="https://github.com/jrouwe/JoltPhysics/blob/23dadd0e603f1b321142d4c74df07fce85064989/Jolt/Skeleton/SkeletalAnimation.h#L72">Jolt/Skeleton/SkeletalAnimation.h:72</see>
|
|
/// <br/>
|
|
/// <c>void Sample(float inTime, SkeletonPose &ioPose) const</c>
|
|
/// </para>
|
|
/// </summary>
|
|
/// <remarks>
|
|
/// <para>
|
|
/// Get the (interpolated) joint transforms at time inTime
|
|
/// </para>
|
|
/// </remarks>
|
|
public void Sample(float time, SkeletonPose pose) => Jolt.PInvoke.SkeletalAnimation_Sample(this, time, pose);
|
|
/// <summary>
|
|
/// <para>
|
|
/// C++:
|
|
/// <see href="https://github.com/jrouwe/JoltPhysics/blob/23dadd0e603f1b321142d4c74df07fce85064989/Jolt/Skeleton/SkeletalAnimation.h#L79">Jolt/Skeleton/SkeletalAnimation.h:79</see>
|
|
/// <br/>
|
|
/// <c>void SaveBinaryState(StreamOut &inStream) const</c>
|
|
/// </para>
|
|
/// </summary>
|
|
/// <remarks>
|
|
/// <para>
|
|
/// Saves the state of this animation in binary form to inStream.
|
|
/// </para>
|
|
/// </remarks>
|
|
public void SaveBinaryState(StreamOut stream) => Jolt.PInvoke.SkeletalAnimation_SaveBinaryState(this, stream);
|
|
/// <summary>
|
|
/// <para>
|
|
/// C++:
|
|
/// <see href="https://github.com/jrouwe/JoltPhysics/blob/23dadd0e603f1b321142d4c74df07fce85064989/Jolt/Skeleton/SkeletalAnimation.h#L84">Jolt/Skeleton/SkeletalAnimation.h:84</see>
|
|
/// <br/>
|
|
/// <c>static AnimationResult sRestoreFromBinaryState(StreamIn &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 SkeletalAnimation sRestoreFromBinaryState(StreamIn stream)
|
|
{
|
|
var _handle = Jolt.PInvoke.SkeletalAnimation_sRestoreFromBinaryState(stream);
|
|
if (_handle.IsNull()) throw new InvalidOperationException(Jolt.GetLastError());
|
|
return _handle;
|
|
}
|
|
public void AddRef() => Jolt.PInvoke.SkeletalAnimation_AddRef(this);
|
|
public void Release() => Jolt.PInvoke.SkeletalAnimation_Release(this);
|
|
public uint GetRefCount() => Jolt.PInvoke.SkeletalAnimation_GetRefCount(this);
|
|
public void Dispose()
|
|
{
|
|
if (IsNull()) return;
|
|
Release();
|
|
}
|
|
}
|
|
}
|