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

namespace RootMotion.FinalIK
{
	// Token: 0x02000422 RID: 1058
	[Serializable]
	public class FABRIKChain : Il2CppSystem.Object
	{
		// Token: 0x06007E4E RID: 32334 RVA: 0x00202F98 File Offset: 0x00201198
		[CallerCount(1)]
		[CachedScanResults(RefRangeStart = 595937, RefRangeEnd = 595938, XrefRangeStart = 595932, XrefRangeEnd = 595937, 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: 0x06007E4F RID: 32335 RVA: 0x00203018 File Offset: 0x00201218
		[CallerCount(3)]
		[CachedScanResults(RefRangeStart = 592446, RefRangeEnd = 592449, XrefRangeStart = 592446, XrefRangeEnd = 592449, 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: 0x06007E50 RID: 32336 RVA: 0x0020305C File Offset: 0x0020125C
		[CallerCount(2)]
		[CachedScanResults(RefRangeStart = 595943, RefRangeEnd = 595945, XrefRangeStart = 595938, XrefRangeEnd = 595943, 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: 0x06007E51 RID: 32337 RVA: 0x002030B8 File Offset: 0x002012B8
		[CallerCount(2)]
		[CachedScanResults(RefRangeStart = 595949, RefRangeEnd = 595951, XrefRangeStart = 595945, XrefRangeEnd = 595949, 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: 0x06007E52 RID: 32338 RVA: 0x00203124 File Offset: 0x00201324
		[CallerCount(1)]
		[CachedScanResults(RefRangeStart = 595954, RefRangeEnd = 595955, XrefRangeStart = 595951, XrefRangeEnd = 595954, 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: 0x06007E53 RID: 32339 RVA: 0x0020318C File Offset: 0x0020138C
		[CallerCount(0)]
		[CachedScanResults(RefRangeStart = 0, RefRangeEnd = 0, XrefRangeStart = 595955, XrefRangeEnd = 595960, 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: 0x06007E54 RID: 32340 RVA: 0x002031D8 File Offset: 0x002013D8
		// 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, 100672838);
			FABRIKChain.NativeMethodInfoPtr_Initiate_Public_Void_0 = IL2CPP.GetIl2CppMethodByToken(Il2CppClassPointerStore<FABRIKChain>.NativeClassPtr, 100672839);
			FABRIKChain.NativeMethodInfoPtr_Stage1_Public_Void_Il2CppReferenceArray_1_FABRIKChain_0 = IL2CPP.GetIl2CppMethodByToken(Il2CppClassPointerStore<FABRIKChain>.NativeClassPtr, 100672840);
			FABRIKChain.NativeMethodInfoPtr_Stage2_Public_Void_Vector3_Il2CppReferenceArray_1_FABRIKChain_0 = IL2CPP.GetIl2CppMethodByToken(Il2CppClassPointerStore<FABRIKChain>.NativeClassPtr, 100672841);
			FABRIKChain.NativeMethodInfoPtr_GetCentroid_Private_Vector3_Il2CppReferenceArray_1_FABRIKChain_0 = IL2CPP.GetIl2CppMethodByToken(Il2CppClassPointerStore<FABRIKChain>.NativeClassPtr, 100672842);
			FABRIKChain.NativeMethodInfoPtr__ctor_Public_Void_0 = IL2CPP.GetIl2CppMethodByToken(Il2CppClassPointerStore<FABRIKChain>.NativeClassPtr, 100672843);
		}

		// Token: 0x06007E55 RID: 32341 RVA: 0x0000A688 File Offset: 0x00008888
		public FABRIKChain(IntPtr pointer)
			: base(pointer)
		{
		}

		// Token: 0x17002B0A RID: 11018
		// (get) Token: 0x06007E56 RID: 32342 RVA: 0x002032D0 File Offset: 0x002014D0
		// (set) Token: 0x06007E57 RID: 32343 RVA: 0x00203304 File Offset: 0x00201504
		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: 0x17002B0B RID: 11019
		// (get) Token: 0x06007E58 RID: 32344 RVA: 0x0020332C File Offset: 0x0020152C
		// (set) Token: 0x06007E59 RID: 32345 RVA: 0x00203354 File Offset: 0x00201554
		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: 0x17002B0C RID: 11020
		// (get) Token: 0x06007E5A RID: 32346 RVA: 0x00203378 File Offset: 0x00201578
		// (set) Token: 0x06007E5B RID: 32347 RVA: 0x002033A0 File Offset: 0x002015A0
		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: 0x17002B0D RID: 11021
		// (get) Token: 0x06007E5C RID: 32348 RVA: 0x002033C4 File Offset: 0x002015C4
		// (set) Token: 0x06007E5D RID: 32349 RVA: 0x002033F8 File Offset: 0x002015F8
		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: 0x0400545D RID: 21597
		private static readonly IntPtr NativeFieldInfoPtr_ik;

		// Token: 0x0400545E RID: 21598
		private static readonly IntPtr NativeFieldInfoPtr_pull;

		// Token: 0x0400545F RID: 21599
		private static readonly IntPtr NativeFieldInfoPtr_pin;

		// Token: 0x04005460 RID: 21600
		private static readonly IntPtr NativeFieldInfoPtr_children;

		// Token: 0x04005461 RID: 21601
		private static readonly IntPtr NativeMethodInfoPtr_IsValid_Public_Boolean_byref_String_0;

		// Token: 0x04005462 RID: 21602
		private static readonly IntPtr NativeMethodInfoPtr_Initiate_Public_Void_0;

		// Token: 0x04005463 RID: 21603
		private static readonly IntPtr NativeMethodInfoPtr_Stage1_Public_Void_Il2CppReferenceArray_1_FABRIKChain_0;

		// Token: 0x04005464 RID: 21604
		private static readonly IntPtr NativeMethodInfoPtr_Stage2_Public_Void_Vector3_Il2CppReferenceArray_1_FABRIKChain_0;

		// Token: 0x04005465 RID: 21605
		private static readonly IntPtr NativeMethodInfoPtr_GetCentroid_Private_Vector3_Il2CppReferenceArray_1_FABRIKChain_0;

		// Token: 0x04005466 RID: 21606
		private static readonly IntPtr NativeMethodInfoPtr__ctor_Public_Void_0;
	}
}
