using System;
using Cpp2IlInjected;
using UnityEngine;

namespace RootMotion.FinalIK
{
	// Token: 0x02000411 RID: 1041
	[Token(Token = "0x2000411")]
	[AddComponentMenu("Scripts/RootMotion.FinalIK/IK/VR IK")]
	public class VRIK : IK
	{
		// Token: 0x06002539 RID: 9529 RVA: 0x00054214 File Offset: 0x00052414
		[Token(Token = "0x6002539")]
		[Address(RVA = "0x8C5890", Offset = "0x8C4690", VA = "0x1808C5890", Slot = "8")]
		[ContextMenu("User Manual")]
		protected override void OpenUserManual()
		{
			Debug.Log("Sorry, VRIK User Manual is not finished yet.");
		}

		// Token: 0x0600253A RID: 9530 RVA: 0x0005422C File Offset: 0x0005242C
		[Token(Token = "0x600253A")]
		[Address(RVA = "0x8C57F0", Offset = "0x8C45F0", VA = "0x1808C57F0", Slot = "9")]
		[ContextMenu("Scrpt Reference")]
		protected override void OpenScriptReference()
		{
			Debug.Log("Sorry, VRIK Script reference is not finished yet.");
		}

		// Token: 0x0600253B RID: 9531 RVA: 0x00054244 File Offset: 0x00052444
		[Token(Token = "0x600253B")]
		[Address(RVA = "0x8C5850", Offset = "0x8C4650", VA = "0x1808C5850")]
		[ContextMenu("TUTORIAL VIDEO (STEAMVR SETUP)")]
		private void OpenSetupTutorial()
		{
			Application.OpenURL("https://www.youtube.com/watch?v=6Pfx7lYQiIA&feature=youtu.be");
		}

		// Token: 0x0600253C RID: 9532 RVA: 0x000020D3 File Offset: 0x000002D3
		[Token(Token = "0x600253C")]
		[Address(RVA = "0x8C5710", Offset = "0x8C4510", VA = "0x1808C5710")]
		[ContextMenu("Auto-detect References")]
		public void AutoDetectReferences()
		{
			throw new AnalysisFailedException("CPP2IL failed to recover any usable IL for this method.");
		}

		// Token: 0x0600253D RID: 9533 RVA: 0x0005425C File Offset: 0x0005245C
		[Token(Token = "0x600253D")]
		[Address(RVA = "0x8C5740", Offset = "0x8C4540", VA = "0x1808C5740")]
		[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: 0x0600253E RID: 9534 RVA: 0x000020D3 File Offset: 0x000002D3
		[Token(Token = "0x600253E")]
		[Address(RVA = "0x31E390", Offset = "0x31D190", VA = "0x18031E390", Slot = "7")]
		public override IKSolver GetIKSolver()
		{
			throw new AnalysisFailedException("CPP2IL failed to recover any usable IL for this method.");
		}

		// Token: 0x0600253F RID: 9535 RVA: 0x000020D3 File Offset: 0x000002D3
		[Token(Token = "0x600253F")]
		[Address(RVA = "0x8C5770", Offset = "0x8C4570", VA = "0x1808C5770", Slot = "4")]
		protected override void InitiateSolver()
		{
			throw new AnalysisFailedException("CPP2IL failed to recover any usable IL for this method.");
		}

		// Token: 0x06002540 RID: 9536 RVA: 0x00054288 File Offset: 0x00052488
		[Token(Token = "0x6002540")]
		[Address(RVA = "0x8C58F0", Offset = "0x8C46F0", VA = "0x1808C58F0")]
		public VRIK()
		{
			VRIK.References references = new VRIK.References();
			this.references = references;
			IKSolverVR iksolverVR = new IKSolverVR();
			this.solver = iksolverVR;
			base..ctor();
		}

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

		// Token: 0x04002EA7 RID: 11943
		[FieldOffset(Offset = "0x40")]
		[Token(Token = "0x4002EA7")]
		[Tooltip("The VRIK solver.")]
		public IKSolverVR solver;

		// Token: 0x02000412 RID: 1042
		[Token(Token = "0x2000412")]
		[Serializable]
		public class References
		{
			// Token: 0x06002541 RID: 9537 RVA: 0x000542B8 File Offset: 0x000524B8
			[Token(Token = "0x6002541")]
			[Address(RVA = "0x132D8F0", Offset = "0x132C6F0", VA = "0x18132D8F0")]
			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: 0x17000228 RID: 552
			// (get) Token: 0x06002542 RID: 9538 RVA: 0x000020D3 File Offset: 0x000002D3
			[Token(Token = "0x17000228")]
			public bool isFilled
			{
				[Token(Token = "0x6002542")]
				[Address(RVA = "0x132E660", Offset = "0x132D460", VA = "0x18132E660")]
				get
				{
					throw new AnalysisFailedException("CPP2IL failed to recover any usable IL for this method.");
				}
			}

			// Token: 0x17000229 RID: 553
			// (get) Token: 0x06002543 RID: 9539 RVA: 0x000020D3 File Offset: 0x000002D3
			[Token(Token = "0x17000229")]
			public bool isEmpty
			{
				[Token(Token = "0x6002543")]
				[Address(RVA = "0x132E150", Offset = "0x132CF50", VA = "0x18132E150")]
				get
				{
					throw new AnalysisFailedException("CPP2IL failed to recover any usable IL for this method.");
				}
			}

			// Token: 0x06002544 RID: 9540 RVA: 0x000020D3 File Offset: 0x000002D3
			[Token(Token = "0x6002544")]
			[Address(RVA = "0x132D400", Offset = "0x132C200", VA = "0x18132D400")]
			public static bool AutoDetectReferences(Transform root, out VRIK.References references)
			{
				throw new AnalysisFailedException("CPP2IL failed to recover any usable IL for this method.");
			}

			// Token: 0x06002545 RID: 9541 RVA: 0x00054548 File Offset: 0x00052748
			[Token(Token = "0x6002545")]
			[Address(RVA = "0x3D8B20", Offset = "0x3D7920", VA = "0x1803D8B20")]
			public References()
			{
			}

			// Token: 0x04002EA8 RID: 11944
			[FieldOffset(Offset = "0x10")]
			[Token(Token = "0x4002EA8")]
			public Transform root;

			// Token: 0x04002EA9 RID: 11945
			[FieldOffset(Offset = "0x18")]
			[Token(Token = "0x4002EA9")]
			public Transform pelvis;

			// Token: 0x04002EAA RID: 11946
			[FieldOffset(Offset = "0x20")]
			[Token(Token = "0x4002EAA")]
			public Transform spine;

			// Token: 0x04002EAB RID: 11947
			[FieldOffset(Offset = "0x28")]
			[Token(Token = "0x4002EAB")]
			public Transform chest;

			// Token: 0x04002EAC RID: 11948
			[FieldOffset(Offset = "0x30")]
			[Token(Token = "0x4002EAC")]
			public Transform neck;

			// Token: 0x04002EAD RID: 11949
			[FieldOffset(Offset = "0x38")]
			[Token(Token = "0x4002EAD")]
			public Transform head;

			// Token: 0x04002EAE RID: 11950
			[FieldOffset(Offset = "0x40")]
			[Token(Token = "0x4002EAE")]
			public Transform leftShoulder;

			// Token: 0x04002EAF RID: 11951
			[FieldOffset(Offset = "0x48")]
			[Token(Token = "0x4002EAF")]
			public Transform leftUpperArm;

			// Token: 0x04002EB0 RID: 11952
			[FieldOffset(Offset = "0x50")]
			[Token(Token = "0x4002EB0")]
			public Transform leftForearm;

			// Token: 0x04002EB1 RID: 11953
			[FieldOffset(Offset = "0x58")]
			[Token(Token = "0x4002EB1")]
			public Transform leftHand;

			// Token: 0x04002EB2 RID: 11954
			[FieldOffset(Offset = "0x60")]
			[Token(Token = "0x4002EB2")]
			public Transform rightShoulder;

			// Token: 0x04002EB3 RID: 11955
			[FieldOffset(Offset = "0x68")]
			[Token(Token = "0x4002EB3")]
			public Transform rightUpperArm;

			// Token: 0x04002EB4 RID: 11956
			[FieldOffset(Offset = "0x70")]
			[Token(Token = "0x4002EB4")]
			public Transform rightForearm;

			// Token: 0x04002EB5 RID: 11957
			[FieldOffset(Offset = "0x78")]
			[Token(Token = "0x4002EB5")]
			public Transform rightHand;

			// Token: 0x04002EB6 RID: 11958
			[FieldOffset(Offset = "0x80")]
			[Token(Token = "0x4002EB6")]
			public Transform leftThigh;

			// Token: 0x04002EB7 RID: 11959
			[FieldOffset(Offset = "0x88")]
			[Token(Token = "0x4002EB7")]
			public Transform leftCalf;

			// Token: 0x04002EB8 RID: 11960
			[FieldOffset(Offset = "0x90")]
			[Token(Token = "0x4002EB8")]
			public Transform leftFoot;

			// Token: 0x04002EB9 RID: 11961
			[FieldOffset(Offset = "0x98")]
			[Token(Token = "0x4002EB9")]
			public Transform leftToes;

			// Token: 0x04002EBA RID: 11962
			[FieldOffset(Offset = "0xA0")]
			[Token(Token = "0x4002EBA")]
			public Transform rightThigh;

			// Token: 0x04002EBB RID: 11963
			[FieldOffset(Offset = "0xA8")]
			[Token(Token = "0x4002EBB")]
			public Transform rightCalf;

			// Token: 0x04002EBC RID: 11964
			[FieldOffset(Offset = "0xB0")]
			[Token(Token = "0x4002EBC")]
			public Transform rightFoot;

			// Token: 0x04002EBD RID: 11965
			[FieldOffset(Offset = "0xB8")]
			[Token(Token = "0x4002EBD")]
			public Transform rightToes;
		}
	}
}
