mirror of
https://github.com/ahwootech/BRUTAL.git
synced 2026-11-25 20:48:24 +01:00
169 lines
9.5 KiB
C#
169 lines
9.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
|
|
{
|
|
public static partial class Jolt
|
|
{
|
|
public static unsafe partial class PInvoke
|
|
{
|
|
[LibraryImport("jolt", EntryPoint = "SkeletonMapper_Create")]
|
|
public static partial SkeletonMapper SkeletonMapper_Create();
|
|
|
|
/// <inheritdoc cref="SkeletonMapper.DefaultCanMapJoint(Skeleton, int, Skeleton, int)"/>
|
|
[LibraryImport("jolt", EntryPoint = "SkeletonMapper_DefaultCanMapJoint")]
|
|
public static partial Brutal.Bool8 SkeletonMapper_DefaultCanMapJoint(
|
|
Skeleton skeleton1,
|
|
int index1,
|
|
Skeleton skeleton2,
|
|
int index2
|
|
);
|
|
|
|
/// <summary>
|
|
/// <para>
|
|
/// Initialize the skeleton mapper. Skeleton 1 should be the (low detail) ragdoll skeleton and skeleton
|
|
/// 2 the (high detail) animation skeleton. We assume that each joint in skeleton 1 can be mapped to a
|
|
/// joint in skeleton 2 (if not mapping from animation skeleton to ragdoll skeleton will be undefined).
|
|
/// Skeleton 2 should have the same hierarchy as skeleton 1 but can contain extra joints between those
|
|
/// in skeleton 1 and it can have extra joints at the root and leaves of the skeleton.
|
|
/// </para>
|
|
/// <para>
|
|
/// C++:
|
|
/// <see href="https://github.com/jrouwe/JoltPhysics/blob/e77f175595e64cb44218cc9d9d56fc365ad0e36a/Jolt/Skeleton/SkeletonMapper.h#L81">Jolt/Skeleton/SkeletonMapper.h:81</see>
|
|
/// <br/>
|
|
/// <c>void Initialize(const Skeleton *inSkeleton1, const Mat44 *inNeutralPose1, const Skeleton *inSkeleton2, const Mat44 *inNeutralPose2, const CanMapJoint &inCanMapJoint = sDefaultCanMapJoint)</c>
|
|
/// </para>
|
|
/// </summary>
|
|
/// <remarks>
|
|
/// <code>
|
|
/// Initialize the skeleton mapper. Skeleton 1 should be the (low detail) ragdoll skeleton and skeleton 2 the (high detail) animation skeleton.
|
|
/// We assume that each joint in skeleton 1 can be mapped to a joint in skeleton 2 (if not mapping from animation skeleton to ragdoll skeleton will be undefined).
|
|
/// Skeleton 2 should have the same hierarchy as skeleton 1 but can contain extra joints between those in skeleton 1 and it can have extra joints at the root and leaves of the skeleton.
|
|
/// @param inSkeleton1 Source skeleton to map from.
|
|
/// @param inNeutralPose1 Neutral pose of the source skeleton (model space)
|
|
/// @param inSkeleton2 Target skeleton to map to.
|
|
/// @param inNeutralPose2 Neutral pose of the target skeleton (model space), inNeutralPose1 and inNeutralPose2 must match as closely as possible, preferably the position of the mappable joints should be identical.
|
|
/// @param inCanMapJoint Function that checks if joints in skeleton 1 and skeleton 2 are equal.
|
|
/// </code>
|
|
/// <para>
|
|
/// neutralPose1 must hold exactly one element per joint in skeleton 1 - the native count is read from
|
|
/// the object itself and a span that doesn't match it throws ArgumentOutOfRangeException. The span is
|
|
/// only used for the duration of the call. A null skeleton1 throws ArgumentNullException. Throws
|
|
/// ArgumentException for skeleton1: "skeleton1 has a joint whose parent index isn't an earlier joint -
|
|
/// parents must come first, as Jolt requires."
|
|
/// </para>
|
|
/// <para>
|
|
/// neutralPose2 must hold exactly one element per joint in skeleton 2 - the native count is read from
|
|
/// the object itself and a span that doesn't match it throws ArgumentOutOfRangeException. The span is
|
|
/// only used for the duration of the call. A null skeleton2 throws ArgumentNullException. Throws
|
|
/// ArgumentException for skeleton2: "skeleton2 has a joint whose parent index isn't an earlier joint -
|
|
/// parents must come first, as Jolt requires."
|
|
/// </para>
|
|
/// <para>
|
|
/// canMapJoint: The callback is invoked from native code: it must be a static method marked
|
|
/// [UnmanagedCallersOnly(CallConvs = [typeof(CallConvCdecl)])], and userData is passed back to it
|
|
/// verbatim. Pass null for Jolt's default (SkeletonMapper::sDefaultCanMapJoint). The callback and
|
|
/// userData are used only for the duration of this call; userData may be freed when it returns.
|
|
/// </para>
|
|
/// </remarks>
|
|
[LibraryImport("jolt", EntryPoint = "SkeletonMapper_Initialize")]
|
|
public static partial void SkeletonMapper_Initialize(
|
|
SkeletonMapper self,
|
|
Skeleton skeleton1,
|
|
float4x4* neutralPose1,
|
|
uint neutralPose1Count,
|
|
Skeleton skeleton2,
|
|
float4x4* neutralPose2,
|
|
uint neutralPose2Count,
|
|
delegate* unmanaged[Cdecl]<Skeleton, int, Skeleton, int, nint, Brutal.Bool8> canMapJoint,
|
|
nint canMapJointUserData,
|
|
out uint outBufferCheck
|
|
);
|
|
|
|
/// <inheritdoc cref="SkeletonMapper.LockTranslations(Skeleton, ReadOnlySpan{bool}, ReadOnlySpan{float4x4})"/>
|
|
[LibraryImport("jolt", EntryPoint = "SkeletonMapper_LockTranslations")]
|
|
public static partial void SkeletonMapper_LockTranslations(
|
|
SkeletonMapper self,
|
|
Skeleton skeleton2,
|
|
bool* lockedTranslations,
|
|
uint lockedTranslationsCount,
|
|
float4x4* neutralPose2,
|
|
uint neutralPose2Count,
|
|
out uint outBufferCheck
|
|
);
|
|
|
|
/// <inheritdoc cref="SkeletonMapper.LockAllTranslations(Skeleton, ReadOnlySpan{float4x4})"/>
|
|
[LibraryImport("jolt", EntryPoint = "SkeletonMapper_LockAllTranslations")]
|
|
public static partial void SkeletonMapper_LockAllTranslations(
|
|
SkeletonMapper self,
|
|
Skeleton skeleton2,
|
|
float4x4* neutralPose2,
|
|
uint neutralPose2Count,
|
|
out uint outBufferCheck
|
|
);
|
|
|
|
/// <inheritdoc cref="SkeletonMapper.Map(ReadOnlySpan{float4x4}, ReadOnlySpan{float4x4}, Span{float4x4})"/>
|
|
[LibraryImport("jolt", EntryPoint = "SkeletonMapper_Map")]
|
|
public static partial void SkeletonMapper_Map(
|
|
SkeletonMapper self,
|
|
float4x4* pose1ModelSpace,
|
|
uint pose1ModelSpaceCount,
|
|
float4x4* pose2LocalSpace,
|
|
uint pose2LocalSpaceCount,
|
|
float4x4* pose2ModelSpace,
|
|
uint pose2ModelSpaceCount,
|
|
out uint outBufferCheck
|
|
);
|
|
|
|
/// <inheritdoc cref="SkeletonMapper.MapReverse(ReadOnlySpan{float4x4}, Span{float4x4})"/>
|
|
[LibraryImport("jolt", EntryPoint = "SkeletonMapper_MapReverse")]
|
|
public static partial void SkeletonMapper_MapReverse(
|
|
SkeletonMapper self,
|
|
float4x4* pose2ModelSpace,
|
|
uint pose2ModelSpaceCount,
|
|
float4x4* pose1ModelSpace,
|
|
uint pose1ModelSpaceCount,
|
|
out uint outBufferCheck
|
|
);
|
|
|
|
/// <inheritdoc cref="SkeletonMapper.GetMappedJointIdx(int)"/>
|
|
[LibraryImport("jolt", EntryPoint = "SkeletonMapper_GetMappedJointIdx")]
|
|
public static partial int SkeletonMapper_GetMappedJointIdx(SkeletonMapper self, int joint1Idx);
|
|
|
|
/// <inheritdoc cref="SkeletonMapper.IsJointTranslationLocked(int)"/>
|
|
[LibraryImport("jolt", EntryPoint = "SkeletonMapper_IsJointTranslationLocked")]
|
|
public static partial Brutal.Bool8 SkeletonMapper_IsJointTranslationLocked(
|
|
SkeletonMapper self,
|
|
int joint2Idx
|
|
);
|
|
|
|
/// <inheritdoc cref="SkeletonMapper.GetMappings()"/>
|
|
[LibraryImport("jolt", EntryPoint = "SkeletonMapper_GetMappings")]
|
|
public static partial void SkeletonMapper_GetMappings(SkeletonMapper self, out NativeSpanView outResult);
|
|
|
|
/// <inheritdoc cref="SkeletonMapper.GetUnmapped()"/>
|
|
[LibraryImport("jolt", EntryPoint = "SkeletonMapper_GetUnmapped")]
|
|
public static partial void SkeletonMapper_GetUnmapped(SkeletonMapper self, out NativeSpanView outResult);
|
|
|
|
/// <inheritdoc cref="SkeletonMapper.GetLockedTranslations()"/>
|
|
[LibraryImport("jolt", EntryPoint = "SkeletonMapper_GetLockedTranslations")]
|
|
public static partial void SkeletonMapper_GetLockedTranslations(
|
|
SkeletonMapper self,
|
|
out NativeSpanView outResult
|
|
);
|
|
|
|
[LibraryImport("jolt", EntryPoint = "SkeletonMapper_AddRef")]
|
|
public static partial void SkeletonMapper_AddRef(SkeletonMapper self);
|
|
|
|
[LibraryImport("jolt", EntryPoint = "SkeletonMapper_Release")]
|
|
public static partial void SkeletonMapper_Release(SkeletonMapper self);
|
|
|
|
[LibraryImport("jolt", EntryPoint = "SkeletonMapper_GetRefCount")]
|
|
public static partial uint SkeletonMapper_GetRefCount(SkeletonMapper self);
|
|
}
|
|
}
|
|
}
|