// // 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(); /// [LibraryImport("jolt", EntryPoint = "SkeletonMapper_DefaultCanMapJoint")] public static partial Brutal.Bool8 SkeletonMapper_DefaultCanMapJoint( Skeleton skeleton1, int index1, Skeleton skeleton2, int index2 ); /// /// /// 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. /// /// /// C++: /// Jolt/Skeleton/SkeletonMapper.h:81 ///
/// void Initialize(const Skeleton *inSkeleton1, const Mat44 *inNeutralPose1, const Skeleton *inSkeleton2, const Mat44 *inNeutralPose2, const CanMapJoint &inCanMapJoint = sDefaultCanMapJoint) ///
///
/// /// /// 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. /// /// /// 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." /// /// /// 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." /// /// /// 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. /// /// [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] canMapJoint, nint canMapJointUserData, out uint outBufferCheck ); /// [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 ); /// [LibraryImport("jolt", EntryPoint = "SkeletonMapper_LockAllTranslations")] public static partial void SkeletonMapper_LockAllTranslations( SkeletonMapper self, Skeleton skeleton2, float4x4* neutralPose2, uint neutralPose2Count, out uint outBufferCheck ); /// [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 ); /// [LibraryImport("jolt", EntryPoint = "SkeletonMapper_MapReverse")] public static partial void SkeletonMapper_MapReverse( SkeletonMapper self, float4x4* pose2ModelSpace, uint pose2ModelSpaceCount, float4x4* pose1ModelSpace, uint pose1ModelSpaceCount, out uint outBufferCheck ); /// [LibraryImport("jolt", EntryPoint = "SkeletonMapper_GetMappedJointIdx")] public static partial int SkeletonMapper_GetMappedJointIdx(SkeletonMapper self, int joint1Idx); /// [LibraryImport("jolt", EntryPoint = "SkeletonMapper_IsJointTranslationLocked")] public static partial Brutal.Bool8 SkeletonMapper_IsJointTranslationLocked( SkeletonMapper self, int joint2Idx ); /// [LibraryImport("jolt", EntryPoint = "SkeletonMapper_GetMappings")] public static partial void SkeletonMapper_GetMappings(SkeletonMapper self, out NativeSpanView outResult); /// [LibraryImport("jolt", EntryPoint = "SkeletonMapper_GetUnmapped")] public static partial void SkeletonMapper_GetUnmapped(SkeletonMapper self, out NativeSpanView outResult); /// [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); } } }