using System;
using Cpp2IlInjected;
using UnityEngine;

namespace RootMotion.FinalIK
{
	// Token: 0x02000469 RID: 1129
	[Token(Token = "0x2000469")]
	[AddComponentMenu("Scripts/RootMotion.FinalIK/IK/VR IK")]
	public class VRIK : IK
	{
		// Token: 0x06002802 RID: 10242 RVA: 0x0005B570 File Offset: 0x00059770
		[Token(Token = "0x6002802")]
		[Address(RVA = "0x4AEA90", Offset = "0x4ADA90", VA = "0x1804AEA90", Slot = "8")]
		[ContextMenu("User Manual")]
		protected override void OpenUserManual()
		{
			Debug.Log("Sorry, VRIK User Manual is not finished yet.");
		}

		// Token: 0x06002803 RID: 10243 RVA: 0x0005B588 File Offset: 0x00059788
		[Token(Token = "0x6002803")]
		[Address(RVA = "0x4AE9F0", Offset = "0x4AD9F0", VA = "0x1804AE9F0", Slot = "9")]
		[ContextMenu("Scrpt Reference")]
		protected override void OpenScriptReference()
		{
			Debug.Log("Sorry, VRIK Script reference is not finished yet.");
		}

		// Token: 0x06002804 RID: 10244 RVA: 0x0005B5A0 File Offset: 0x000597A0
		[Token(Token = "0x6002804")]
		[Address(RVA = "0x4AEA50", Offset = "0x4ADA50", VA = "0x1804AEA50")]
		[ContextMenu("TUTORIAL VIDEO (STEAMVR SETUP)")]
		private void OpenSetupTutorial()
		{
			Application.OpenURL("https://www.youtube.com/watch?v=6Pfx7lYQiIA&feature=youtu.be");
		}

		// Token: 0x06002805 RID: 10245 RVA: 0x000020D3 File Offset: 0x000002D3
		[Token(Token = "0x6002805")]
		[Address(RVA = "0x4AE910", Offset = "0x4AD910", VA = "0x1804AE910")]
		[ContextMenu("Auto-detect References")]
		public void AutoDetectReferences()
		{
			throw new AnalysisFailedException("CPP2IL failed to recover any usable IL for this method.");
		}

		// Token: 0x06002806 RID: 10246 RVA: 0x0005B5B8 File Offset: 0x000597B8
		[Token(Token = "0x6002806")]
		[Address(RVA = "0x4AE940", Offset = "0x4AD940", VA = "0x1804AE940")]
		[ContextMenu("Guess Hand Orientations")]
		public void GuessHandOrientations()
		{
			IKSolverVR iksolverVR = this.solver;
			VRIK.References references = this.references;
			int num = 0;
			iksolverVR.GuessHandOrientations(references, num != 0);
		}

		// Token: 0x06002807 RID: 10247 RVA: 0x000020D3 File Offset: 0x000002D3
		[Token(Token = "0x6002807")]
		[Address(RVA = "0x33F1F0", Offset = "0x33E1F0", VA = "0x18033F1F0", Slot = "7")]
		public override IKSolver GetIKSolver()
		{
			throw new AnalysisFailedException("CPP2IL failed to recover any usable IL for this method.");
		}

		// Token: 0x06002808 RID: 10248 RVA: 0x000020D3 File Offset: 0x000002D3
		[Token(Token = "0x6002808")]
		[Address(RVA = "0x4AE970", Offset = "0x4AD970", VA = "0x1804AE970", Slot = "4")]
		protected override void InitiateSolver()
		{
			throw new AnalysisFailedException("CPP2IL failed to recover any usable IL for this method.");
		}

		// Token: 0x06002809 RID: 10249 RVA: 0x0005B5E4 File Offset: 0x000597E4
		[Token(Token = "0x6002809")]
		[Address(RVA = "0x4AEAF0", Offset = "0x4ADAF0", VA = "0x1804AEAF0")]
		public VRIK()
		{
			VRIK.References references = new VRIK.References();
			this.references = references;
			IKSolverVR iksolverVR = new IKSolverVR();
			this.solver = iksolverVR;
			base..ctor();
		}

		// Token: 0x04003190 RID: 12688
		[FieldOffset(Offset = "0x38")]
		[Token(Token = "0x4003190")]
		[Tooltip("Bone mapping. Right-click on the component header and select 'Auto-detect References' of fill in manually if not a Humanoid character.")]
		[ContextMenuItem("Auto-detect References", "AutoDetectReferences")]
		public VRIK.References references;

		// Token: 0x04003191 RID: 12689
		[FieldOffset(Offset = "0x40")]
		[Token(Token = "0x4003191")]
		[Tooltip("The VRIK solver.")]
		public IKSolverVR solver;

		// Token: 0x0200046A RID: 1130
		[Token(Token = "0x200046A")]
		[Serializable]
		public class References
		{
			// Token: 0x0600280A RID: 10250 RVA: 0x0005B614 File Offset: 0x00059814
			[Token(Token = "0x600280A")]
			[Address(RVA = "0x6C8FE0", Offset = "0x6C7FE0", VA = "0x1806C8FE0")]
			public Transform[] GetTransforms()
			{
				Transform[] array;
				Transform transform22;
				for (;;)
				{
					array = new Transform[22];
					Transform transform = this.root;
					if (transform == 0 || array != 0)
					{
						array[0] = transform;
						Transform transform2 = this.pelvis;
						if (transform2 == 0 || array != 0)
						{
							array[1] = transform2;
							Transform transform3 = this.spine;
							if (transform3 == 0 || array != 0)
							{
								array[2] = transform3;
								Transform transform4 = this.chest;
								if (transform4 == 0 || array != 0)
								{
									array[3] = transform4;
									Transform transform5 = this.neck;
									if (transform5 == 0 || array != 0)
									{
										array[4] = transform5;
										Transform transform6 = this.head;
										if (transform6 == 0 || array != 0)
										{
											array[5] = transform6;
											Transform transform7 = this.leftShoulder;
											if (transform7 == 0 || array != 0)
											{
												array[6] = transform7;
												Transform transform8 = this.leftUpperArm;
												if (transform8 == 0 || array != 0)
												{
													array[7] = transform8;
													Transform transform9 = this.leftForearm;
													if (transform9 == 0 || array != 0)
													{
														array[8] = transform9;
														Transform transform10 = this.leftHand;
														if (transform10 == 0 || array != 0)
														{
															array[9] = transform10;
															Transform transform11 = this.rightShoulder;
															if (transform11 == 0 || array != 0)
															{
																array[10] = transform11;
																Transform transform12 = this.rightUpperArm;
																if (transform12 == 0 || array != 0)
																{
																	array[11] = transform12;
																	Transform transform13 = this.rightForearm;
																	if (transform13 == 0 || array != 0)
																	{
																		array[12] = transform13;
																		Transform transform14 = this.rightHand;
																		if (transform14 == 0 || array != 0)
																		{
																			array[13] = transform14;
																			Transform transform15 = this.leftThigh;
																			if (transform15 == 0 || array != 0)
																			{
																				array[14] = transform15;
																				Transform transform16 = this.leftCalf;
																				if (transform16 == 0 || array != 0)
																				{
																					array[15] = transform16;
																					Transform transform17 = this.leftFoot;
																					if (transform17 == 0 || array != 0)
																					{
																						array[16] = transform17;
																						Transform transform18 = this.leftToes;
																						if (transform18 == 0 || array != 0)
																						{
																							array[17] = transform18;
																							Transform transform19 = this.rightThigh;
																							if (transform19 == 0 || array != 0)
																							{
																								array[18] = transform19;
																								Transform transform20 = this.rightCalf;
																								if (transform20 == 0 || array != 0)
																								{
																									array[19] = transform20;
																									Transform transform21 = this.rightFoot;
																									if (transform21 == 0 || array != 0)
																									{
																										array[20] = transform21;
																										transform22 = this.rightToes;
																										if (transform22 == 0 || array != 0)
																										{
																											break;
																										}
																									}
																								}
																							}
																						}
																					}
																				}
																			}
																		}
																	}
																}
															}
														}
													}
												}
											}
										}
									}
								}
							}
						}
					}
				}
				array[21] = transform22;
				return array;
			}

			// Token: 0x1700024D RID: 589
			// (get) Token: 0x0600280B RID: 10251 RVA: 0x000020D3 File Offset: 0x000002D3
			[Token(Token = "0x1700024D")]
			public bool isFilled
			{
				[Token(Token = "0x600280B")]
				[Address(RVA = "0x6C9D50", Offset = "0x6C8D50", VA = "0x1806C9D50")]
				get
				{
					throw new AnalysisFailedException("CPP2IL failed to recover any usable IL for this method.");
				}
			}

			// Token: 0x1700024E RID: 590
			// (get) Token: 0x0600280C RID: 10252 RVA: 0x000020D3 File Offset: 0x000002D3
			[Token(Token = "0x1700024E")]
			public bool isEmpty
			{
				[Token(Token = "0x600280C")]
				[Address(RVA = "0x6C9840", Offset = "0x6C8840", VA = "0x1806C9840")]
				get
				{
					throw new AnalysisFailedException("CPP2IL failed to recover any usable IL for this method.");
				}
			}

			// Token: 0x0600280D RID: 10253 RVA: 0x000020D3 File Offset: 0x000002D3
			[Token(Token = "0x600280D")]
			[Address(RVA = "0x6C8AF0", Offset = "0x6C7AF0", VA = "0x1806C8AF0")]
			public static bool AutoDetectReferences(Transform root, out VRIK.References references)
			{
				throw new AnalysisFailedException("CPP2IL failed to recover any usable IL for this method.");
			}

			// Token: 0x0600280E RID: 10254 RVA: 0x0005B8A4 File Offset: 0x00059AA4
			[Token(Token = "0x600280E")]
			[Address(RVA = "0x36ABD0", Offset = "0x369BD0", VA = "0x18036ABD0")]
			public References()
			{
			}

			// Token: 0x04003192 RID: 12690
			[FieldOffset(Offset = "0x10")]
			[Token(Token = "0x4003192")]
			public Transform root;

			// Token: 0x04003193 RID: 12691
			[FieldOffset(Offset = "0x18")]
			[Token(Token = "0x4003193")]
			public Transform pelvis;

			// Token: 0x04003194 RID: 12692
			[FieldOffset(Offset = "0x20")]
			[Token(Token = "0x4003194")]
			public Transform spine;

			// Token: 0x04003195 RID: 12693
			[FieldOffset(Offset = "0x28")]
			[Token(Token = "0x4003195")]
			public Transform chest;

			// Token: 0x04003196 RID: 12694
			[FieldOffset(Offset = "0x30")]
			[Token(Token = "0x4003196")]
			public Transform neck;

			// Token: 0x04003197 RID: 12695
			[FieldOffset(Offset = "0x38")]
			[Token(Token = "0x4003197")]
			public Transform head;

			// Token: 0x04003198 RID: 12696
			[FieldOffset(Offset = "0x40")]
			[Token(Token = "0x4003198")]
			public Transform leftShoulder;

			// Token: 0x04003199 RID: 12697
			[FieldOffset(Offset = "0x48")]
			[Token(Token = "0x4003199")]
			public Transform leftUpperArm;

			// Token: 0x0400319A RID: 12698
			[FieldOffset(Offset = "0x50")]
			[Token(Token = "0x400319A")]
			public Transform leftForearm;

			// Token: 0x0400319B RID: 12699
			[FieldOffset(Offset = "0x58")]
			[Token(Token = "0x400319B")]
			public Transform leftHand;

			// Token: 0x0400319C RID: 12700
			[FieldOffset(Offset = "0x60")]
			[Token(Token = "0x400319C")]
			public Transform rightShoulder;

			// Token: 0x0400319D RID: 12701
			[FieldOffset(Offset = "0x68")]
			[Token(Token = "0x400319D")]
			public Transform rightUpperArm;

			// Token: 0x0400319E RID: 12702
			[FieldOffset(Offset = "0x70")]
			[Token(Token = "0x400319E")]
			public Transform rightForearm;

			// Token: 0x0400319F RID: 12703
			[FieldOffset(Offset = "0x78")]
			[Token(Token = "0x400319F")]
			public Transform rightHand;

			// Token: 0x040031A0 RID: 12704
			[FieldOffset(Offset = "0x80")]
			[Token(Token = "0x40031A0")]
			public Transform leftThigh;

			// Token: 0x040031A1 RID: 12705
			[FieldOffset(Offset = "0x88")]
			[Token(Token = "0x40031A1")]
			public Transform leftCalf;

			// Token: 0x040031A2 RID: 12706
			[FieldOffset(Offset = "0x90")]
			[Token(Token = "0x40031A2")]
			public Transform leftFoot;

			// Token: 0x040031A3 RID: 12707
			[FieldOffset(Offset = "0x98")]
			[Token(Token = "0x40031A3")]
			public Transform leftToes;

			// Token: 0x040031A4 RID: 12708
			[FieldOffset(Offset = "0xA0")]
			[Token(Token = "0x40031A4")]
			public Transform rightThigh;

			// Token: 0x040031A5 RID: 12709
			[FieldOffset(Offset = "0xA8")]
			[Token(Token = "0x40031A5")]
			public Transform rightCalf;

			// Token: 0x040031A6 RID: 12710
			[FieldOffset(Offset = "0xB0")]
			[Token(Token = "0x40031A6")]
			public Transform rightFoot;

			// Token: 0x040031A7 RID: 12711
			[FieldOffset(Offset = "0xB8")]
			[Token(Token = "0x40031A7")]
			public Transform rightToes;
		}
	}
}
