using System;
using Il2CppInterop.Common.Attributes;
using Il2CppInterop.Runtime;
using UnityEngine;

namespace RootMotion.FinalIK
{
	// Token: 0x02000485 RID: 1157
	[Serializable]
	public class IKMappingBone : IKMapping
	{
		// Token: 0x06008873 RID: 34931 RVA: 0x0022D3DC File Offset: 0x0022B5DC
		[CallerCount(0)]
		[CachedScanResults(RefRangeStart = 0, RefRangeEnd = 0, XrefRangeStart = 629559, XrefRangeEnd = 629564, MetadataInitTokenRva = 0L, MetadataInitFlagRva = 0L)]
		public unsafe override bool IsValid(IKSolver solver, ref string message)
		{
			IL2CPP.Il2CppObjectBaseToPtrNotNull(this);
			IntPtr* ptr;
			checked
			{
				ptr = stackalloc IntPtr[unchecked((UIntPtr)2) * (UIntPtr)sizeof(IntPtr)];
				*ptr = IL2CPP.Il2CppObjectBaseToPtr(solver);
			}
			ref IntPtr ptr2 = ref ptr[checked(unchecked((UIntPtr)1) * (UIntPtr)sizeof(IntPtr)) / (UIntPtr)sizeof(IntPtr)];
			IntPtr intPtr = IL2CPP.ManagedStringToIl2Cpp(message);
			ptr2 = &intPtr;
			IntPtr intPtr3;
			IntPtr intPtr2 = IL2CPP.il2cpp_runtime_invoke(IL2CPP.il2cpp_object_get_virtual_method(IL2CPP.Il2CppObjectBaseToPtr(this), IKMappingBone.NativeMethodInfoPtr_IsValid_Public_Virtual_Boolean_IKSolver_byref_String_0), IL2CPP.Il2CppObjectBaseToPtrNotNull(this), (void**)ptr, ref intPtr3);
			Il2CppException.RaiseExceptionIfNecessary(intPtr3);
			message = IL2CPP.Il2CppStringToManaged(intPtr);
			return *IL2CPP.il2cpp_object_unbox(intPtr2);
		}

		// Token: 0x06008874 RID: 34932 RVA: 0x0022D480 File Offset: 0x0022B680
		[CallerCount(1)]
		[CachedScanResults(RefRangeStart = 629570, RefRangeEnd = 629571, XrefRangeStart = 629564, XrefRangeEnd = 629570, MetadataInitTokenRva = 0L, MetadataInitFlagRva = 0L)]
		public unsafe IKMappingBone()
			: this(IL2CPP.il2cpp_object_new(Il2CppClassPointerStore<IKMappingBone>.NativeClassPtr))
		{
			IntPtr* ptr = null;
			IntPtr intPtr2;
			IntPtr intPtr = IL2CPP.il2cpp_runtime_invoke(IKMappingBone.NativeMethodInfoPtr__ctor_Public_Void_0, IL2CPP.Il2CppObjectBaseToPtrNotNull(this), (void**)ptr, ref intPtr2);
			Il2CppException.RaiseExceptionIfNecessary(intPtr2);
		}

		// Token: 0x06008875 RID: 34933 RVA: 0x0022D4CC File Offset: 0x0022B6CC
		[CallerCount(0)]
		[CachedScanResults(RefRangeStart = 0, RefRangeEnd = 0, XrefRangeStart = 629571, XrefRangeEnd = 629578, MetadataInitTokenRva = 0L, MetadataInitFlagRva = 0L)]
		public unsafe IKMappingBone(Transform bone)
			: this(IL2CPP.il2cpp_object_new(Il2CppClassPointerStore<IKMappingBone>.NativeClassPtr))
		{
			checked
			{
				IntPtr* ptr = stackalloc IntPtr[unchecked((UIntPtr)1) * (UIntPtr)sizeof(IntPtr)];
				*ptr = IL2CPP.Il2CppObjectBaseToPtr(bone);
				IntPtr intPtr2;
				IntPtr intPtr = IL2CPP.il2cpp_runtime_invoke(IKMappingBone.NativeMethodInfoPtr__ctor_Public_Void_Transform_0, IL2CPP.Il2CppObjectBaseToPtrNotNull(this), (void**)ptr, ref intPtr2);
				Il2CppException.RaiseExceptionIfNecessary(intPtr2);
			}
		}

		// Token: 0x06008876 RID: 34934 RVA: 0x0022D530 File Offset: 0x0022B730
		[CallerCount(1)]
		[CachedScanResults(RefRangeStart = 629580, RefRangeEnd = 629581, XrefRangeStart = 629578, XrefRangeEnd = 629580, MetadataInitTokenRva = 0L, MetadataInitFlagRva = 0L)]
		public unsafe void StoreDefaultLocalState()
		{
			IL2CPP.Il2CppObjectBaseToPtrNotNull(this);
			IntPtr* ptr = null;
			IntPtr intPtr2;
			IntPtr intPtr = IL2CPP.il2cpp_runtime_invoke(IKMappingBone.NativeMethodInfoPtr_StoreDefaultLocalState_Public_Void_0, IL2CPP.Il2CppObjectBaseToPtrNotNull(this), (void**)ptr, ref intPtr2);
			Il2CppException.RaiseExceptionIfNecessary(intPtr2);
		}

		// Token: 0x06008877 RID: 34935 RVA: 0x0022D574 File Offset: 0x0022B774
		[CallerCount(1)]
		[CachedScanResults(RefRangeStart = 629583, RefRangeEnd = 629584, XrefRangeStart = 629581, XrefRangeEnd = 629583, MetadataInitTokenRva = 0L, MetadataInitFlagRva = 0L)]
		public unsafe void FixTransforms()
		{
			IL2CPP.Il2CppObjectBaseToPtrNotNull(this);
			IntPtr* ptr = null;
			IntPtr intPtr2;
			IntPtr intPtr = IL2CPP.il2cpp_runtime_invoke(IKMappingBone.NativeMethodInfoPtr_FixTransforms_Public_Void_0, IL2CPP.Il2CppObjectBaseToPtrNotNull(this), (void**)ptr, ref intPtr2);
			Il2CppException.RaiseExceptionIfNecessary(intPtr2);
		}

		// Token: 0x06008878 RID: 34936 RVA: 0x0022D5B8 File Offset: 0x0022B7B8
		[CallerCount(0)]
		[CachedScanResults(RefRangeStart = 0, RefRangeEnd = 0, XrefRangeStart = 629584, XrefRangeEnd = 629591, MetadataInitTokenRva = 0L, MetadataInitFlagRva = 0L)]
		public unsafe override void Initiate(IKSolverFullBody solver)
		{
			IL2CPP.Il2CppObjectBaseToPtrNotNull(this);
			checked
			{
				IntPtr* ptr = stackalloc IntPtr[unchecked((UIntPtr)1) * (UIntPtr)sizeof(IntPtr)];
				*ptr = IL2CPP.Il2CppObjectBaseToPtr(solver);
				IntPtr intPtr2;
				IntPtr intPtr = IL2CPP.il2cpp_runtime_invoke(IL2CPP.il2cpp_object_get_virtual_method(IL2CPP.Il2CppObjectBaseToPtr(this), IKMappingBone.NativeMethodInfoPtr_Initiate_Public_Virtual_Void_IKSolverFullBody_0), IL2CPP.Il2CppObjectBaseToPtrNotNull(this), (void**)ptr, ref intPtr2);
				Il2CppException.RaiseExceptionIfNecessary(intPtr2);
			}
		}

		// Token: 0x06008879 RID: 34937 RVA: 0x0022D61C File Offset: 0x0022B81C
		[CallerCount(1)]
		[CachedScanResults(RefRangeStart = 629593, RefRangeEnd = 629594, XrefRangeStart = 629591, XrefRangeEnd = 629593, MetadataInitTokenRva = 0L, MetadataInitFlagRva = 0L)]
		public unsafe void ReadPose()
		{
			IL2CPP.Il2CppObjectBaseToPtrNotNull(this);
			IntPtr* ptr = null;
			IntPtr intPtr2;
			IntPtr intPtr = IL2CPP.il2cpp_runtime_invoke(IKMappingBone.NativeMethodInfoPtr_ReadPose_Public_Void_0, IL2CPP.Il2CppObjectBaseToPtrNotNull(this), (void**)ptr, ref intPtr2);
			Il2CppException.RaiseExceptionIfNecessary(intPtr2);
		}

		// Token: 0x0600887A RID: 34938 RVA: 0x0022D660 File Offset: 0x0022B860
		[CallerCount(2)]
		[CachedScanResults(RefRangeStart = 629596, RefRangeEnd = 629598, XrefRangeStart = 629594, XrefRangeEnd = 629596, MetadataInitTokenRva = 0L, MetadataInitFlagRva = 0L)]
		public unsafe void WritePose(float solverWeight)
		{
			IL2CPP.Il2CppObjectBaseToPtrNotNull(this);
			checked
			{
				IntPtr* ptr = stackalloc IntPtr[unchecked((UIntPtr)1) * (UIntPtr)sizeof(IntPtr)];
				*ptr = ref solverWeight;
				IntPtr intPtr2;
				IntPtr intPtr = IL2CPP.il2cpp_runtime_invoke(IKMappingBone.NativeMethodInfoPtr_WritePose_Public_Void_Single_0, IL2CPP.Il2CppObjectBaseToPtrNotNull(this), (void**)ptr, ref intPtr2);
				Il2CppException.RaiseExceptionIfNecessary(intPtr2);
			}
		}

		// Token: 0x0600887B RID: 34939 RVA: 0x0022D6B4 File Offset: 0x0022B8B4
		// Note: this type is marked as 'beforefieldinit'.
		static IKMappingBone()
		{
			Il2CppClassPointerStore<IKMappingBone>.NativeClassPtr = IL2CPP.GetIl2CppClass("Assembly-CSharp.dll", "RootMotion.FinalIK", "IKMappingBone");
			IL2CPP.il2cpp_runtime_class_init(Il2CppClassPointerStore<IKMappingBone>.NativeClassPtr);
			IKMappingBone.NativeFieldInfoPtr_bone = IL2CPP.GetIl2CppField(Il2CppClassPointerStore<IKMappingBone>.NativeClassPtr, "bone");
			IKMappingBone.NativeFieldInfoPtr_maintainRotationWeight = IL2CPP.GetIl2CppField(Il2CppClassPointerStore<IKMappingBone>.NativeClassPtr, "maintainRotationWeight");
			IKMappingBone.NativeFieldInfoPtr_boneMap = IL2CPP.GetIl2CppField(Il2CppClassPointerStore<IKMappingBone>.NativeClassPtr, "boneMap");
			IKMappingBone.NativeMethodInfoPtr_IsValid_Public_Virtual_Boolean_IKSolver_byref_String_0 = IL2CPP.GetIl2CppMethodByToken(Il2CppClassPointerStore<IKMappingBone>.NativeClassPtr, 100673665);
			IKMappingBone.NativeMethodInfoPtr__ctor_Public_Void_0 = IL2CPP.GetIl2CppMethodByToken(Il2CppClassPointerStore<IKMappingBone>.NativeClassPtr, 100673666);
			IKMappingBone.NativeMethodInfoPtr__ctor_Public_Void_Transform_0 = IL2CPP.GetIl2CppMethodByToken(Il2CppClassPointerStore<IKMappingBone>.NativeClassPtr, 100673667);
			IKMappingBone.NativeMethodInfoPtr_StoreDefaultLocalState_Public_Void_0 = IL2CPP.GetIl2CppMethodByToken(Il2CppClassPointerStore<IKMappingBone>.NativeClassPtr, 100673668);
			IKMappingBone.NativeMethodInfoPtr_FixTransforms_Public_Void_0 = IL2CPP.GetIl2CppMethodByToken(Il2CppClassPointerStore<IKMappingBone>.NativeClassPtr, 100673669);
			IKMappingBone.NativeMethodInfoPtr_Initiate_Public_Virtual_Void_IKSolverFullBody_0 = IL2CPP.GetIl2CppMethodByToken(Il2CppClassPointerStore<IKMappingBone>.NativeClassPtr, 100673670);
			IKMappingBone.NativeMethodInfoPtr_ReadPose_Public_Void_0 = IL2CPP.GetIl2CppMethodByToken(Il2CppClassPointerStore<IKMappingBone>.NativeClassPtr, 100673671);
			IKMappingBone.NativeMethodInfoPtr_WritePose_Public_Void_Single_0 = IL2CPP.GetIl2CppMethodByToken(Il2CppClassPointerStore<IKMappingBone>.NativeClassPtr, 100673672);
		}

		// Token: 0x0600887C RID: 34940 RVA: 0x0022D7C0 File Offset: 0x0022B9C0
		public IKMappingBone(IntPtr pointer)
			: base(pointer)
		{
		}

		// Token: 0x17002E51 RID: 11857
		// (get) Token: 0x0600887D RID: 34941 RVA: 0x0022D7CC File Offset: 0x0022B9CC
		// (set) Token: 0x0600887E RID: 34942 RVA: 0x0022D800 File Offset: 0x0022BA00
		public unsafe Transform bone
		{
			get
			{
				IntPtr intPtr = IL2CPP.Il2CppObjectBaseToPtrNotNull(this) + (IntPtr)IL2CPP.il2cpp_field_get_offset(IKMappingBone.NativeFieldInfoPtr_bone);
				IntPtr intPtr2 = *intPtr;
				return (intPtr2 != 0) ? new Transform(intPtr2) : null;
			}
			set
			{
				IntPtr intPtr = IL2CPP.Il2CppObjectBaseToPtrNotNull(this);
				IL2CPP.il2cpp_gc_wbarrier_set_field(intPtr, intPtr + (IntPtr)IL2CPP.il2cpp_field_get_offset(IKMappingBone.NativeFieldInfoPtr_bone), IL2CPP.Il2CppObjectBaseToPtr(value));
			}
		}

		// Token: 0x17002E52 RID: 11858
		// (get) Token: 0x0600887F RID: 34943 RVA: 0x0022D828 File Offset: 0x0022BA28
		// (set) Token: 0x06008880 RID: 34944 RVA: 0x0022D850 File Offset: 0x0022BA50
		public unsafe float maintainRotationWeight
		{
			get
			{
				IntPtr intPtr = IL2CPP.Il2CppObjectBaseToPtrNotNull(this) + (IntPtr)IL2CPP.il2cpp_field_get_offset(IKMappingBone.NativeFieldInfoPtr_maintainRotationWeight);
				return *intPtr;
			}
			set
			{
				*(IL2CPP.Il2CppObjectBaseToPtrNotNull(this) + (IntPtr)IL2CPP.il2cpp_field_get_offset(IKMappingBone.NativeFieldInfoPtr_maintainRotationWeight)) = value;
			}
		}

		// Token: 0x17002E53 RID: 11859
		// (get) Token: 0x06008881 RID: 34945 RVA: 0x0022D874 File Offset: 0x0022BA74
		// (set) Token: 0x06008882 RID: 34946 RVA: 0x0022D8A8 File Offset: 0x0022BAA8
		public unsafe IKMapping.BoneMap boneMap
		{
			get
			{
				IntPtr intPtr = IL2CPP.Il2CppObjectBaseToPtrNotNull(this) + (IntPtr)IL2CPP.il2cpp_field_get_offset(IKMappingBone.NativeFieldInfoPtr_boneMap);
				IntPtr intPtr2 = *intPtr;
				return (intPtr2 != 0) ? new IKMapping.BoneMap(intPtr2) : null;
			}
			set
			{
				IntPtr intPtr = IL2CPP.Il2CppObjectBaseToPtrNotNull(this);
				IL2CPP.il2cpp_gc_wbarrier_set_field(intPtr, intPtr + (IntPtr)IL2CPP.il2cpp_field_get_offset(IKMappingBone.NativeFieldInfoPtr_boneMap), IL2CPP.Il2CppObjectBaseToPtr(value));
			}
		}

		// Token: 0x04005B21 RID: 23329
		private static readonly IntPtr NativeFieldInfoPtr_bone;

		// Token: 0x04005B22 RID: 23330
		private static readonly IntPtr NativeFieldInfoPtr_maintainRotationWeight;

		// Token: 0x04005B23 RID: 23331
		private static readonly IntPtr NativeFieldInfoPtr_boneMap;

		// Token: 0x04005B24 RID: 23332
		private static readonly IntPtr NativeMethodInfoPtr_IsValid_Public_Virtual_Boolean_IKSolver_byref_String_0;

		// Token: 0x04005B25 RID: 23333
		private static readonly IntPtr NativeMethodInfoPtr__ctor_Public_Void_0;

		// Token: 0x04005B26 RID: 23334
		private static readonly IntPtr NativeMethodInfoPtr__ctor_Public_Void_Transform_0;

		// Token: 0x04005B27 RID: 23335
		private static readonly IntPtr NativeMethodInfoPtr_StoreDefaultLocalState_Public_Void_0;

		// Token: 0x04005B28 RID: 23336
		private static readonly IntPtr NativeMethodInfoPtr_FixTransforms_Public_Void_0;

		// Token: 0x04005B29 RID: 23337
		private static readonly IntPtr NativeMethodInfoPtr_Initiate_Public_Virtual_Void_IKSolverFullBody_0;

		// Token: 0x04005B2A RID: 23338
		private static readonly IntPtr NativeMethodInfoPtr_ReadPose_Public_Void_0;

		// Token: 0x04005B2B RID: 23339
		private static readonly IntPtr NativeMethodInfoPtr_WritePose_Public_Void_Single_0;
	}
}
