89 lines
3.0 KiB
C#
89 lines
3.0 KiB
C#
using System;
|
|
using System.Runtime.CompilerServices;
|
|
using UnityEngine.Scripting;
|
|
|
|
namespace UnityEngine
|
|
{
|
|
// Token: 0x02000229 RID: 553
|
|
public sealed class HumanPoseHandler : IDisposable
|
|
{
|
|
// Token: 0x06002639 RID: 9785 RVA: 0x0002BDC8 File Offset: 0x00029FC8
|
|
public HumanPoseHandler(Avatar avatar, Transform root)
|
|
{
|
|
this.m_Ptr = IntPtr.Zero;
|
|
if (root == null)
|
|
{
|
|
throw new ArgumentNullException("HumanPoseHandler root Transform is null");
|
|
}
|
|
if (avatar == null)
|
|
{
|
|
throw new ArgumentNullException("HumanPoseHandler avatar is null");
|
|
}
|
|
if (!avatar.isValid)
|
|
{
|
|
throw new ArgumentException("HumanPoseHandler avatar is invalid");
|
|
}
|
|
if (!avatar.isHuman)
|
|
{
|
|
throw new ArgumentException("HumanPoseHandler avatar is not human");
|
|
}
|
|
this.Internal_HumanPoseHandler(avatar, root);
|
|
}
|
|
|
|
// Token: 0x0600263A RID: 9786
|
|
[GeneratedByOldBindingsGenerator]
|
|
[MethodImpl(MethodImplOptions.InternalCall)]
|
|
public extern void Dispose();
|
|
|
|
// Token: 0x0600263B RID: 9787
|
|
[GeneratedByOldBindingsGenerator]
|
|
[MethodImpl(MethodImplOptions.InternalCall)]
|
|
private extern void Internal_HumanPoseHandler(Avatar avatar, Transform root);
|
|
|
|
// Token: 0x0600263C RID: 9788 RVA: 0x0002BE4C File Offset: 0x0002A04C
|
|
private bool Internal_GetHumanPose(ref Vector3 bodyPosition, ref Quaternion bodyRotation, float[] muscles)
|
|
{
|
|
return HumanPoseHandler.INTERNAL_CALL_Internal_GetHumanPose(this, ref bodyPosition, ref bodyRotation, muscles);
|
|
}
|
|
|
|
// Token: 0x0600263D RID: 9789
|
|
[GeneratedByOldBindingsGenerator]
|
|
[MethodImpl(MethodImplOptions.InternalCall)]
|
|
private static extern bool INTERNAL_CALL_Internal_GetHumanPose(HumanPoseHandler self, ref Vector3 bodyPosition, ref Quaternion bodyRotation, float[] muscles);
|
|
|
|
// Token: 0x0600263E RID: 9790 RVA: 0x0002BE6C File Offset: 0x0002A06C
|
|
public void GetHumanPose(ref HumanPose humanPose)
|
|
{
|
|
humanPose.Init();
|
|
if (!this.Internal_GetHumanPose(ref humanPose.bodyPosition, ref humanPose.bodyRotation, humanPose.muscles))
|
|
{
|
|
Debug.LogWarning("HumanPoseHandler is not initialized properly");
|
|
}
|
|
}
|
|
|
|
// Token: 0x0600263F RID: 9791 RVA: 0x0002BEA0 File Offset: 0x0002A0A0
|
|
private bool Internal_SetHumanPose(ref Vector3 bodyPosition, ref Quaternion bodyRotation, float[] muscles)
|
|
{
|
|
return HumanPoseHandler.INTERNAL_CALL_Internal_SetHumanPose(this, ref bodyPosition, ref bodyRotation, muscles);
|
|
}
|
|
|
|
// Token: 0x06002640 RID: 9792
|
|
[GeneratedByOldBindingsGenerator]
|
|
[MethodImpl(MethodImplOptions.InternalCall)]
|
|
private static extern bool INTERNAL_CALL_Internal_SetHumanPose(HumanPoseHandler self, ref Vector3 bodyPosition, ref Quaternion bodyRotation, float[] muscles);
|
|
|
|
// Token: 0x06002641 RID: 9793 RVA: 0x0002BEC0 File Offset: 0x0002A0C0
|
|
public void SetHumanPose(ref HumanPose humanPose)
|
|
{
|
|
humanPose.Init();
|
|
if (!this.Internal_SetHumanPose(ref humanPose.bodyPosition, ref humanPose.bodyRotation, humanPose.muscles))
|
|
{
|
|
Debug.LogWarning("HumanPoseHandler is not initialized properly");
|
|
}
|
|
}
|
|
|
|
// Token: 0x0400065C RID: 1628
|
|
internal IntPtr m_Ptr;
|
|
}
|
|
}
|