using System;
using Il2CppInterop.Common.Attributes;
using Il2CppInterop.Runtime;
using Il2CppInterop.Runtime.InteropTypes.Arrays;
using Il2CppSystem;
using UnityEngine;

namespace RootMotion.FinalIK
{
	// Token: 0x0200047A RID: 1146
	[Serializable]
	public class FABRIKChain : Il2CppSystem.Object
	{
		// Token: 0x060086A1 RID: 34465 RVA: 0x00225CD4 File Offset: 0x00223ED4
		[CallerCount(1)]
		[CachedScanResults(RefRangeStart = 628247, RefRangeEnd = 628248, XrefRangeStart = 628242, XrefRangeEnd = 628247, MetadataInitTokenRva = 0L, MetadataInitFlagRva = 0L)]
		public unsafe bool IsValid(ref string message)
		{
			IL2CPP.Il2CppObjectBaseToPtrNotNull(this);
			checked
			{
				IntPtr* ptr = stackalloc IntPtr[unchecked((UIntPtr)1) * (UIntPtr)sizeof(IntPtr)];
				ref IntPtr ptr2 = ref *ptr;
				IntPtr intPtr = IL2CPP.ManagedStringToIl2Cpp(message);
				ptr2 = &intPtr;
				IntPtr intPtr3;
				IntPtr intPtr2 = IL2CPP.il2cpp_runtime_invoke(FABRIKChain.NativeMethodInfoPtr_IsValid_Public_Boolean_byref_String_0, IL2CPP.Il2CppObjectBaseToPtrNotNull(this), (void**)ptr, ref intPtr3);
				Il2CppException.RaiseExceptionIfNecessary(intPtr3);
				message = IL2CPP.Il2CppStringToManaged(intPtr);
				return *IL2CPP.il2cpp_object_unbox(intPtr2);
			}
		}

		// Token: 0x060086A2 RID: 34466 RVA: 0x00225D54 File Offset: 0x00223F54
		[CallerCount(3)]
		[CachedScanResults(RefRangeStart = 624752, RefRangeEnd = 624755, XrefRangeStart = 624752, XrefRangeEnd = 624755, MetadataInitTokenRva = 0L, MetadataInitFlagRva = 0L)]
		public unsafe void Initiate()
		{
			IL2CPP.Il2CppObjectBaseToPtrNotNull(this);
			IntPtr* ptr = null;
			IntPtr intPtr2;
			IntPtr intPtr = IL2CPP.il2cpp_runtime_invoke(FABRIKChain.NativeMethodInfoPtr_Initiate_Public_Void_0, IL2CPP.Il2CppObjectBaseToPtrNotNull(this), (void**)ptr, ref intPtr2);
			Il2CppException.RaiseExceptionIfNecessary(intPtr2);
		}

		// Token: 0x060086A3 RID: 34467 RVA: 0x00225D98 File Offset: 0x00223F98
		[CallerCount(2)]
		[CachedScanResults(RefRangeStart = 628253, RefRangeEnd = 628255, XrefRangeStart = 628248, XrefRangeEnd = 628253, MetadataInitTokenRva = 0L, MetadataInitFlagRva = 0L)]
		public unsafe void Stage1(Il2CppReferenceArray<FABRIKChain> chain)
		{
			IL2CPP.Il2CppObjectBaseToPtrNotNull(this);
			checked
			{
				IntPtr* ptr = stackalloc IntPtr[unchecked((UIntPtr)1) * (UIntPtr)sizeof(IntPtr)];
				*ptr = IL2CPP.Il2CppObjectBaseToPtr(chain);
				IntPtr intPtr2;
				IntPtr intPtr = IL2CPP.il2cpp_runtime_invoke(FABRIKChain.NativeMethodInfoPtr_Stage1_Public_Void_Il2CppReferenceArray_1_FABRIKChain_0, IL2CPP.Il2CppObjectBaseToPtrNotNull(this), (void**)ptr, ref intPtr2);
				Il2CppException.RaiseExceptionIfNecessary(intPtr2);
			}
		}

		// Token: 0x060086A4 RID: 34468 RVA: 0x00225DF4 File Offset: 0x00223FF4
		[CallerCount(2)]
		[CachedScanResults(RefRangeStart = 628259, RefRangeEnd = 628261, XrefRangeStart = 628255, XrefRangeEnd = 628259, MetadataInitTokenRva = 0L, MetadataInitFlagRva = 0L)]
		public unsafe void Stage2(Vector3 rootPosition, Il2CppReferenceArray<FABRIKChain> chain)
		{
			IL2CPP.Il2CppObjectBaseToPtrNotNull(this);
			IntPtr* ptr;
			checked
			{
				ptr = stackalloc IntPtr[unchecked((UIntPtr)2) * (UIntPtr)sizeof(IntPtr)];
				*ptr = ref rootPosition;
			}
			ptr[checked(unchecked((UIntPtr)1) * (UIntPtr)sizeof(IntPtr)) / (UIntPtr)sizeof(IntPtr)] = IL2CPP.Il2CppObjectBaseToPtr(chain);
			IntPtr intPtr2;
			IntPtr intPtr = IL2CPP.il2cpp_runtime_invoke(FABRIKChain.NativeMethodInfoPtr_Stage2_Public_Void_Vector3_Il2CppReferenceArray_1_FABRIKChain_0, IL2CPP.Il2CppObjectBaseToPtrNotNull(this), (void**)ptr, ref intPtr2);
			Il2CppException.RaiseExceptionIfNecessary(intPtr2);
		}

		// Token: 0x060086A5 RID: 34469 RVA: 0x00225E60 File Offset: 0x00224060
		[CallerCount(1)]
		[CachedScanResults(RefRangeStart = 628264, RefRangeEnd = 628265, XrefRangeStart = 628261, XrefRangeEnd = 628264, MetadataInitTokenRva = 0L, MetadataInitFlagRva = 0L)]
		public unsafe Vector3 GetCentroid(Il2CppReferenceArray<FABRIKChain> chain)
		{
			IL2CPP.Il2CppObjectBaseToPtrNotNull(this);
			checked
			{
				IntPtr* ptr = stackalloc IntPtr[unchecked((UIntPtr)1) * (UIntPtr)sizeof(IntPtr)];
				*ptr = IL2CPP.Il2CppObjectBaseToPtr(chain);
				IntPtr intPtr2;
				IntPtr intPtr = IL2CPP.il2cpp_runtime_invoke(FABRIKChain.NativeMethodInfoPtr_GetCentroid_Private_Vector3_Il2CppReferenceArray_1_FABRIKChain_0, IL2CPP.Il2CppObjectBaseToPtrNotNull(this), (void**)ptr, ref intPtr2);
				Il2CppException.RaiseExceptionIfNecessary(intPtr2);
				return *IL2CPP.il2cpp_object_unbox(intPtr);
			}
		}

		// Token: 0x060086A6 RID: 34470 RVA: 0x00225EC8 File Offset: 0x002240C8
		[CallerCount(0)]
		[CachedScanResults(RefRangeStart = 0, RefRangeEnd = 0, XrefRangeStart = 628265, XrefRangeEnd = 628270, MetadataInitTokenRva = 0L, MetadataInitFlagRva = 0L)]
		public unsafe FABRIKChain()
			: this(IL2CPP.il2cpp_object_new(Il2CppClassPointerStore<FABRIKChain>.NativeClassPtr))
		{
			IntPtr* ptr = null;
			IntPtr intPtr2;
			IntPtr intPtr = IL2CPP.il2cpp_runtime_invoke(FABRIKChain.NativeMethodInfoPtr__ctor_Public_Void_0, IL2CPP.Il2CppObjectBaseToPtrNotNull(this), (void**)ptr, ref intPtr2);
			Il2CppException.RaiseExceptionIfNecessary(intPtr2);
		}

		// Token: 0x060086A7 RID: 34471 RVA: 0x00225F14 File Offset: 0x00224114
		// Note: this type is marked as 'beforefieldinit'.
		static FABRIKChain()
		{
			Il2CppClassPointerStore<FABRIKChain>.NativeClassPtr = IL2CPP.GetIl2CppClass("Assembly-CSharp.dll", "RootMotion.FinalIK", "FABRIKChain");
			IL2CPP.il2cpp_runtime_class_init(Il2CppClassPointerStore<FABRIKChain>.NativeClassPtr);
			FABRIKChain.NativeFieldInfoPtr_ik = IL2CPP.GetIl2CppField(Il2CppClassPointerStore<FABRIKChain>.NativeClassPtr, "ik");
			FABRIKChain.NativeFieldInfoPtr_pull = IL2CPP.GetIl2CppField(Il2CppClassPointerStore<FABRIKChain>.NativeClassPtr, "pull");
			FABRIKChain.NativeFieldInfoPtr_pin = IL2CPP.GetIl2CppField(Il2CppClassPointerStore<FABRIKChain>.NativeClassPtr, "pin");
			FABRIKChain.NativeFieldInfoPtr_children = IL2CPP.GetIl2CppField(Il2CppClassPointerStore<FABRIKChain>.NativeClassPtr, "children");
			FABRIKChain.NativeMethodInfoPtr_IsValid_Public_Boolean_byref_String_0 = IL2CPP.GetIl2CppMethodByToken(Il2CppClassPointerStore<FABRIKChain>.NativeClassPtr, 100673551);
			FABRIKChain.NativeMethodInfoPtr_Initiate_Public_Void_0 = IL2CPP.GetIl2CppMethodByToken(Il2CppClassPointerStore<FABRIKChain>.NativeClassPtr, 100673552);
			FABRIKChain.NativeMethodInfoPtr_Stage1_Public_Void_Il2CppReferenceArray_1_FABRIKChain_0 = IL2CPP.GetIl2CppMethodByToken(Il2CppClassPointerStore<FABRIKChain>.NativeClassPtr, 100673553);
			FABRIKChain.NativeMethodInfoPtr_Stage2_Public_Void_Vector3_Il2CppReferenceArray_1_FABRIKChain_0 = IL2CPP.GetIl2CppMethodByToken(Il2CppClassPointerStore<FABRIKChain>.NativeClassPtr, 100673554);
			FABRIKChain.NativeMethodInfoPtr_GetCentroid_Private_Vector3_Il2CppReferenceArray_1_FABRIKChain_0 = IL2CPP.GetIl2CppMethodByToken(Il2CppClassPointerStore<FABRIKChain>.NativeClassPtr, 100673555);
			FABRIKChain.NativeMethodInfoPtr__ctor_Public_Void_0 = IL2CPP.GetIl2CppMethodByToken(Il2CppClassPointerStore<FABRIKChain>.NativeClassPtr, 100673556);
		}

		// Token: 0x060086A8 RID: 34472 RVA: 0x0000A74C File Offset: 0x0000894C
		public FABRIKChain(IntPtr pointer)
			: base(pointer)
		{
		}

		// Token: 0x17002DA5 RID: 11685
		// (get) Token: 0x060086A9 RID: 34473 RVA: 0x0022600C File Offset: 0x0022420C
		// (set) Token: 0x060086AA RID: 34474 RVA: 0x00226040 File Offset: 0x00224240
		public unsafe FABRIK ik
		{
			get
			{
				IntPtr intPtr = IL2CPP.Il2CppObjectBaseToPtrNotNull(this) + (IntPtr)IL2CPP.il2cpp_field_get_offset(FABRIKChain.NativeFieldInfoPtr_ik);
				IntPtr intPtr2 = *intPtr;
				return (intPtr2 != 0) ? new FABRIK(intPtr2) : null;
			}
			set
			{
				IntPtr intPtr = IL2CPP.Il2CppObjectBaseToPtrNotNull(this);
				IL2CPP.il2cpp_gc_wbarrier_set_field(intPtr, intPtr + (IntPtr)IL2CPP.il2cpp_field_get_offset(FABRIKChain.NativeFieldInfoPtr_ik), IL2CPP.Il2CppObjectBaseToPtr(value));
			}
		}

		// Token: 0x17002DA6 RID: 11686
		// (get) Token: 0x060086AB RID: 34475 RVA: 0x00226068 File Offset: 0x00224268
		// (set) Token: 0x060086AC RID: 34476 RVA: 0x00226090 File Offset: 0x00224290
		public unsafe float pull
		{
			get
			{
				IntPtr intPtr = IL2CPP.Il2CppObjectBaseToPtrNotNull(this) + (IntPtr)IL2CPP.il2cpp_field_get_offset(FABRIKChain.NativeFieldInfoPtr_pull);
				return *intPtr;
			}
			set
			{
				*(IL2CPP.Il2CppObjectBaseToPtrNotNull(this) + (IntPtr)IL2CPP.il2cpp_field_get_offset(FABRIKChain.NativeFieldInfoPtr_pull)) = value;
			}
		}

		// Token: 0x17002DA7 RID: 11687
		// (get) Token: 0x060086AD RID: 34477 RVA: 0x002260B4 File Offset: 0x002242B4
		// (set) Token: 0x060086AE RID: 34478 RVA: 0x002260DC File Offset: 0x002242DC
		public unsafe float pin
		{
			get
			{
				IntPtr intPtr = IL2CPP.Il2CppObjectBaseToPtrNotNull(this) + (IntPtr)IL2CPP.il2cpp_field_get_offset(FABRIKChain.NativeFieldInfoPtr_pin);
				return *intPtr;
			}
			set
			{
				*(IL2CPP.Il2CppObjectBaseToPtrNotNull(this) + (IntPtr)IL2CPP.il2cpp_field_get_offset(FABRIKChain.NativeFieldInfoPtr_pin)) = value;
			}
		}

		// Token: 0x17002DA8 RID: 11688
		// (get) Token: 0x060086AF RID: 34479 RVA: 0x00226100 File Offset: 0x00224300
		// (set) Token: 0x060086B0 RID: 34480 RVA: 0x00226134 File Offset: 0x00224334
		public unsafe Il2CppStructArray<int> children
		{
			get
			{
				IntPtr intPtr = IL2CPP.Il2CppObjectBaseToPtrNotNull(this) + (IntPtr)IL2CPP.il2cpp_field_get_offset(FABRIKChain.NativeFieldInfoPtr_children);
				IntPtr intPtr2 = *intPtr;
				return (intPtr2 != 0) ? new Il2CppStructArray<int>(intPtr2) : null;
			}
			set
			{
				IntPtr intPtr = IL2CPP.Il2CppObjectBaseToPtrNotNull(this);
				IL2CPP.il2cpp_gc_wbarrier_set_field(intPtr, intPtr + (IntPtr)IL2CPP.il2cpp_field_get_offset(FABRIKChain.NativeFieldInfoPtr_children), IL2CPP.Il2CppObjectBaseToPtr(value));
			}
		}

		// Token: 0x04005A06 RID: 23046
		private static readonly IntPtr NativeFieldInfoPtr_ik;

		// Token: 0x04005A07 RID: 23047
		private static readonly IntPtr NativeFieldInfoPtr_pull;

		// Token: 0x04005A08 RID: 23048
		private static readonly IntPtr NativeFieldInfoPtr_pin;

		// Token: 0x04005A09 RID: 23049
		private static readonly IntPtr NativeFieldInfoPtr_children;

		// Token: 0x04005A0A RID: 23050
		private static readonly IntPtr NativeMethodInfoPtr_IsValid_Public_Boolean_byref_String_0;

		// Token: 0x04005A0B RID: 23051
		private static readonly IntPtr NativeMethodInfoPtr_Initiate_Public_Void_0;

		// Token: 0x04005A0C RID: 23052
		private static readonly IntPtr NativeMethodInfoPtr_Stage1_Public_Void_Il2CppReferenceArray_1_FABRIKChain_0;

		// Token: 0x04005A0D RID: 23053
		private static readonly IntPtr NativeMethodInfoPtr_Stage2_Public_Void_Vector3_Il2CppReferenceArray_1_FABRIKChain_0;

		// Token: 0x04005A0E RID: 23054
		private static readonly IntPtr NativeMethodInfoPtr_GetCentroid_Private_Vector3_Il2CppReferenceArray_1_FABRIKChain_0;

		// Token: 0x04005A0F RID: 23055
		private static readonly IntPtr NativeMethodInfoPtr__ctor_Public_Void_0;
	}
}
