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

namespace RootMotion.FinalIK
{
	// Token: 0x0200042D RID: 1069
	[Serializable]
	public class IKMappingBone : IKMapping
	{
		// Token: 0x06008020 RID: 32800 RVA: 0x0020A6A0 File Offset: 0x002088A0
		[CallerCount(0)]
		[CachedScanResults(RefRangeStart = 0, RefRangeEnd = 0, XrefRangeStart = 597249, XrefRangeEnd = 597254, 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: 0x06008021 RID: 32801 RVA: 0x0020A744 File Offset: 0x00208944
		[CallerCount(1)]
		[CachedScanResults(RefRangeStart = 597260, RefRangeEnd = 597261, XrefRangeStart = 597254, XrefRangeEnd = 597260, 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: 0x06008022 RID: 32802 RVA: 0x0020A790 File Offset: 0x00208990
		[CallerCount(0)]
		[CachedScanResults(RefRangeStart = 0, RefRangeEnd = 0, XrefRangeStart = 597261, XrefRangeEnd = 597268, 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: 0x06008023 RID: 32803 RVA: 0x0020A7F4 File Offset: 0x002089F4
		[CallerCount(1)]
		[CachedScanResults(RefRangeStart = 597270, RefRangeEnd = 597271, XrefRangeStart = 597268, XrefRangeEnd = 597270, 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: 0x06008024 RID: 32804 RVA: 0x0020A838 File Offset: 0x00208A38
		[CallerCount(1)]
		[CachedScanResults(RefRangeStart = 597273, RefRangeEnd = 597274, XrefRangeStart = 597271, XrefRangeEnd = 597273, 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: 0x06008025 RID: 32805 RVA: 0x0020A87C File Offset: 0x00208A7C
		[CallerCount(0)]
		[CachedScanResults(RefRangeStart = 0, RefRangeEnd = 0, XrefRangeStart = 597274, XrefRangeEnd = 597281, 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: 0x06008026 RID: 32806 RVA: 0x0020A8E0 File Offset: 0x00208AE0
		[CallerCount(1)]
		[CachedScanResults(RefRangeStart = 597283, RefRangeEnd = 597284, XrefRangeStart = 597281, XrefRangeEnd = 597283, 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: 0x06008027 RID: 32807 RVA: 0x0020A924 File Offset: 0x00208B24
		[CallerCount(2)]
		[CachedScanResults(RefRangeStart = 597286, RefRangeEnd = 597288, XrefRangeStart = 597284, XrefRangeEnd = 597286, 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: 0x06008028 RID: 32808 RVA: 0x0020A978 File Offset: 0x00208B78
		// 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, 100672952);
			IKMappingBone.NativeMethodInfoPtr__ctor_Public_Void_0 = IL2CPP.GetIl2CppMethodByToken(Il2CppClassPointerStore<IKMappingBone>.NativeClassPtr, 100672953);
			IKMappingBone.NativeMethodInfoPtr__ctor_Public_Void_Transform_0 = IL2CPP.GetIl2CppMethodByToken(Il2CppClassPointerStore<IKMappingBone>.NativeClassPtr, 100672954);
			IKMappingBone.NativeMethodInfoPtr_StoreDefaultLocalState_Public_Void_0 = IL2CPP.GetIl2CppMethodByToken(Il2CppClassPointerStore<IKMappingBone>.NativeClassPtr, 100672955);
			IKMappingBone.NativeMethodInfoPtr_FixTransforms_Public_Void_0 = IL2CPP.GetIl2CppMethodByToken(Il2CppClassPointerStore<IKMappingBone>.NativeClassPtr, 100672956);
			IKMappingBone.NativeMethodInfoPtr_Initiate_Public_Virtual_Void_IKSolverFullBody_0 = IL2CPP.GetIl2CppMethodByToken(Il2CppClassPointerStore<IKMappingBone>.NativeClassPtr, 100672957);
			IKMappingBone.NativeMethodInfoPtr_ReadPose_Public_Void_0 = IL2CPP.GetIl2CppMethodByToken(Il2CppClassPointerStore<IKMappingBone>.NativeClassPtr, 100672958);
			IKMappingBone.NativeMethodInfoPtr_WritePose_Public_Void_Single_0 = IL2CPP.GetIl2CppMethodByToken(Il2CppClassPointerStore<IKMappingBone>.NativeClassPtr, 100672959);
		}

		// Token: 0x06008029 RID: 32809 RVA: 0x0020AA84 File Offset: 0x00208C84
		public IKMappingBone(IntPtr pointer)
			: base(pointer)
		{
		}

		// Token: 0x17002BB6 RID: 11190
		// (get) Token: 0x0600802A RID: 32810 RVA: 0x0020AA90 File Offset: 0x00208C90
		// (set) Token: 0x0600802B RID: 32811 RVA: 0x0020AAC4 File Offset: 0x00208CC4
		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: 0x17002BB7 RID: 11191
		// (get) Token: 0x0600802C RID: 32812 RVA: 0x0020AAEC File Offset: 0x00208CEC
		// (set) Token: 0x0600802D RID: 32813 RVA: 0x0020AB14 File Offset: 0x00208D14
		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: 0x17002BB8 RID: 11192
		// (get) Token: 0x0600802E RID: 32814 RVA: 0x0020AB38 File Offset: 0x00208D38
		// (set) Token: 0x0600802F RID: 32815 RVA: 0x0020AB6C File Offset: 0x00208D6C
		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: 0x04005578 RID: 21880
		private static readonly IntPtr NativeFieldInfoPtr_bone;

		// Token: 0x04005579 RID: 21881
		private static readonly IntPtr NativeFieldInfoPtr_maintainRotationWeight;

		// Token: 0x0400557A RID: 21882
		private static readonly IntPtr NativeFieldInfoPtr_boneMap;

		// Token: 0x0400557B RID: 21883
		private static readonly IntPtr NativeMethodInfoPtr_IsValid_Public_Virtual_Boolean_IKSolver_byref_String_0;

		// Token: 0x0400557C RID: 21884
		private static readonly IntPtr NativeMethodInfoPtr__ctor_Public_Void_0;

		// Token: 0x0400557D RID: 21885
		private static readonly IntPtr NativeMethodInfoPtr__ctor_Public_Void_Transform_0;

		// Token: 0x0400557E RID: 21886
		private static readonly IntPtr NativeMethodInfoPtr_StoreDefaultLocalState_Public_Void_0;

		// Token: 0x0400557F RID: 21887
		private static readonly IntPtr NativeMethodInfoPtr_FixTransforms_Public_Void_0;

		// Token: 0x04005580 RID: 21888
		private static readonly IntPtr NativeMethodInfoPtr_Initiate_Public_Virtual_Void_IKSolverFullBody_0;

		// Token: 0x04005581 RID: 21889
		private static readonly IntPtr NativeMethodInfoPtr_ReadPose_Public_Void_0;

		// Token: 0x04005582 RID: 21890
		private static readonly IntPtr NativeMethodInfoPtr_WritePose_Public_Void_Single_0;
	}
}
