using System;
using Cpp2IlInjected;
using UnityEngine;

namespace RootMotion.FinalIK
{
	// Token: 0x02000463 RID: 1123
	[Token(Token = "0x2000463")]
	[AddComponentMenu("Scripts/RootMotion.FinalIK/Rotation Limits/Rotation Limit Polygonal")]
	[HelpURL("http://www.root-motion.com/finalikdox/html/page12.html")]
	public class RotationLimitPolygonal : RotationLimit
	{
		// Token: 0x06002868 RID: 10344 RVA: 0x000593B0 File Offset: 0x000575B0
		[Token(Token = "0x6002868")]
		[Address(RVA = "0xBE9600", Offset = "0xBE8400", VA = "0x180BE9600")]
		[ContextMenu("User Manual")]
		private void OpenUserManual()
		{
			Application.OpenURL("http://www.root-motion.com/finalikdox/html/page12.html");
		}

		// Token: 0x06002869 RID: 10345 RVA: 0x000593C8 File Offset: 0x000575C8
		[Token(Token = "0x6002869")]
		[Address(RVA = "0xBE95C0", Offset = "0xBE83C0", VA = "0x180BE95C0")]
		[ContextMenu("Scrpt Reference")]
		private void OpenScriptReference()
		{
			Application.OpenURL("http://www.root-motion.com/finalikdox/html/class_root_motion_1_1_final_i_k_1_1_rotation_limit_polygonal.html");
		}

		// Token: 0x0600286A RID: 10346 RVA: 0x000593E0 File Offset: 0x000575E0
		[Token(Token = "0x600286A")]
		[Address(RVA = "0xBEA890", Offset = "0xBE9690", VA = "0x180BEA890")]
		[ContextMenu("Support Group")]
		private void SupportGroup()
		{
			Application.OpenURL("https://groups.google.com/forum/#!forum/final-ik");
		}

		// Token: 0x0600286B RID: 10347 RVA: 0x000593F8 File Offset: 0x000575F8
		[Token(Token = "0x600286B")]
		[Address(RVA = "0xBE89A0", Offset = "0xBE77A0", VA = "0x180BE89A0")]
		[ContextMenu("Asset Store Thread")]
		private void ASThread()
		{
			Application.OpenURL("http://forum.unity3d.com/threads/final-ik-full-body-ik-aim-look-at-fabrik-ccd-ik-1-0-released.222685/");
		}

		// Token: 0x0600286C RID: 10348 RVA: 0x00059410 File Offset: 0x00057610
		[Token(Token = "0x600286C")]
		[Address(RVA = "0xBE9BF0", Offset = "0xBE89F0", VA = "0x180BE9BF0")]
		public void SetLimitPoints(RotationLimitPolygonal.LimitPoint[] points)
		{
			this.points = points;
			this.BuildReachCones();
		}

		// Token: 0x0600286D RID: 10349 RVA: 0x000020D3 File Offset: 0x000002D3
		[Token(Token = "0x600286D")]
		[Address(RVA = "0xBE9180", Offset = "0xBE7F80", VA = "0x180BE9180", Slot = "4")]
		protected override Quaternion LimitRotation(Quaternion rotation)
		{
			throw new AnalysisFailedException("CPP2IL failed to recover any usable IL for this method.");
		}

		// Token: 0x0600286E RID: 10350 RVA: 0x000020D3 File Offset: 0x000002D3
		[Token(Token = "0x600286E")]
		[Address(RVA = "0xBEA4D0", Offset = "0xBE92D0", VA = "0x180BEA4D0")]
		private void Start()
		{
			throw new AnalysisFailedException("CPP2IL failed to recover any usable IL for this method.");
		}

		// Token: 0x0600286F RID: 10351 RVA: 0x000020D3 File Offset: 0x000002D3
		[Token(Token = "0x600286F")]
		[Address(RVA = "0xBE9770", Offset = "0xBE8570", VA = "0x180BE9770")]
		public void ResetToDefault()
		{
			throw new AnalysisFailedException("CPP2IL failed to recover any usable IL for this method.");
		}

		// Token: 0x06002870 RID: 10352 RVA: 0x000020D3 File Offset: 0x000002D3
		[Token(Token = "0x6002870")]
		[Address(RVA = "0xBE89E0", Offset = "0xBE77E0", VA = "0x180BE89E0")]
		public void BuildReachCones()
		{
			throw new AnalysisFailedException("CPP2IL failed to recover any usable IL for this method.");
		}

		// Token: 0x06002871 RID: 10353 RVA: 0x000020D3 File Offset: 0x000002D3
		[Token(Token = "0x6002871")]
		[Address(RVA = "0xBE9C80", Offset = "0xBE8A80", VA = "0x180BE9C80")]
		private Vector3[] SmoothPoints()
		{
			throw new AnalysisFailedException("CPP2IL failed to recover any usable IL for this method.");
		}

		// Token: 0x06002872 RID: 10354 RVA: 0x000020D3 File Offset: 0x000002D3
		[Token(Token = "0x6002872")]
		[Address(RVA = "0xBE9130", Offset = "0xBE7F30", VA = "0x180BE9130")]
		private float GetScalar(int k)
		{
			throw new AnalysisFailedException("CPP2IL failed to recover any usable IL for this method.");
		}

		// Token: 0x06002873 RID: 10355 RVA: 0x000020D3 File Offset: 0x000002D3
		[Token(Token = "0x6002873")]
		[Address(RVA = "0xBE9640", Offset = "0xBE8440", VA = "0x180BE9640")]
		private Vector3 PointToTangentPlane(Vector3 p, float r)
		{
			throw new AnalysisFailedException("CPP2IL failed to recover any usable IL for this method.");
		}

		// Token: 0x06002874 RID: 10356 RVA: 0x000020D3 File Offset: 0x000002D3
		[Token(Token = "0x6002874")]
		[Address(RVA = "0xBEA8D0", Offset = "0xBE96D0", VA = "0x180BEA8D0")]
		private Vector3 TangentPointToSphere(Vector3 q, float r)
		{
			throw new AnalysisFailedException("CPP2IL failed to recover any usable IL for this method.");
		}

		// Token: 0x06002875 RID: 10357 RVA: 0x000020D3 File Offset: 0x000002D3
		[Token(Token = "0x6002875")]
		[Address(RVA = "0xBE9280", Offset = "0xBE8080", VA = "0x180BE9280")]
		private Quaternion LimitSwing(Quaternion rotation)
		{
			throw new AnalysisFailedException("CPP2IL failed to recover any usable IL for this method.");
		}

		// Token: 0x06002876 RID: 10358 RVA: 0x000020D3 File Offset: 0x000002D3
		[Token(Token = "0x6002876")]
		[Address(RVA = "0xBE8F90", Offset = "0xBE7D90", VA = "0x180BE8F90")]
		private int GetReachCone(Vector3 L)
		{
			throw new AnalysisFailedException("CPP2IL failed to recover any usable IL for this method.");
		}

		// Token: 0x06002877 RID: 10359 RVA: 0x00059448 File Offset: 0x00057648
		[Token(Token = "0x6002877")]
		[Address(RVA = "0xBEAA80", Offset = "0xBE9880", VA = "0x180BEAA80")]
		public RotationLimitPolygonal()
		{
			RotationLimitPolygonal.ReachCone[] array = new RotationLimitPolygonal.ReachCone[0];
			this.reachCones = array;
			float z = Vector3.forward.z;
			this.axis.z = z;
			base..ctor();
		}

		// Token: 0x040031B8 RID: 12728
		[FieldOffset(Offset = "0x38")]
		[Token(Token = "0x40031B8")]
		[Range(0f, 180f)]
		public float twistLimit = 180f;

		// Token: 0x040031B9 RID: 12729
		[FieldOffset(Offset = "0x3C")]
		[Token(Token = "0x40031B9")]
		[Range(0f, 3f)]
		public int smoothIterations;

		// Token: 0x040031BA RID: 12730
		[FieldOffset(Offset = "0x40")]
		[Token(Token = "0x40031BA")]
		[SerializeField]
		[HideInInspector]
		public RotationLimitPolygonal.LimitPoint[] points;

		// Token: 0x040031BB RID: 12731
		[FieldOffset(Offset = "0x48")]
		[Token(Token = "0x40031BB")]
		[SerializeField]
		[HideInInspector]
		public Vector3[] P;

		// Token: 0x040031BC RID: 12732
		[FieldOffset(Offset = "0x50")]
		[Token(Token = "0x40031BC")]
		[SerializeField]
		[HideInInspector]
		public RotationLimitPolygonal.ReachCone[] reachCones;

		// Token: 0x02000464 RID: 1124
		[Token(Token = "0x2000464")]
		[Serializable]
		public class ReachCone
		{
			// Token: 0x1700028B RID: 651
			// (get) Token: 0x06002878 RID: 10360 RVA: 0x000020D3 File Offset: 0x000002D3
			[Token(Token = "0x1700028B")]
			public Vector3 o
			{
				[Token(Token = "0x6002878")]
				[Address(RVA = "0x69FF60", Offset = "0x69ED60", VA = "0x18069FF60")]
				get
				{
					throw new AnalysisFailedException("CPP2IL failed to recover any usable IL for this method.");
				}
			}

			// Token: 0x1700028C RID: 652
			// (get) Token: 0x06002879 RID: 10361 RVA: 0x000020D3 File Offset: 0x000002D3
			[Token(Token = "0x1700028C")]
			public Vector3 a
			{
				[Token(Token = "0x6002879")]
				[Address(RVA = "0x69FE90", Offset = "0x69EC90", VA = "0x18069FE90")]
				get
				{
					throw new AnalysisFailedException("CPP2IL failed to recover any usable IL for this method.");
				}
			}

			// Token: 0x1700028D RID: 653
			// (get) Token: 0x0600287A RID: 10362 RVA: 0x000020D3 File Offset: 0x000002D3
			[Token(Token = "0x1700028D")]
			public Vector3 b
			{
				[Token(Token = "0x600287A")]
				[Address(RVA = "0x69FED0", Offset = "0x69ECD0", VA = "0x18069FED0")]
				get
				{
					throw new AnalysisFailedException("CPP2IL failed to recover any usable IL for this method.");
				}
			}

			// Token: 0x1700028E RID: 654
			// (get) Token: 0x0600287B RID: 10363 RVA: 0x000020D3 File Offset: 0x000002D3
			[Token(Token = "0x1700028E")]
			public Vector3 c
			{
				[Token(Token = "0x600287B")]
				[Address(RVA = "0x69FF10", Offset = "0x69ED10", VA = "0x18069FF10")]
				get
				{
					throw new AnalysisFailedException("CPP2IL failed to recover any usable IL for this method.");
				}
			}

			// Token: 0x0600287C RID: 10364 RVA: 0x000020D3 File Offset: 0x000002D3
			[Token(Token = "0x600287C")]
			[Address(RVA = "0x69FCE0", Offset = "0x69EAE0", VA = "0x18069FCE0")]
			public ReachCone(Vector3 _o, Vector3 _a, Vector3 _b, Vector3 _c)
			{
				throw new AnalysisFailedException("CPP2IL failed to recover any usable IL for this method.");
			}

			// Token: 0x1700028F RID: 655
			// (get) Token: 0x0600287D RID: 10365 RVA: 0x000020D3 File Offset: 0x000002D3
			[Token(Token = "0x1700028F")]
			public bool isValid
			{
				[Token(Token = "0x600287D")]
				[Address(RVA = "0x69FF50", Offset = "0x69ED50", VA = "0x18069FF50")]
				get
				{
					throw new AnalysisFailedException("CPP2IL failed to recover any usable IL for this method.");
				}
			}

			// Token: 0x0600287E RID: 10366 RVA: 0x000020D3 File Offset: 0x000002D3
			[Token(Token = "0x600287E")]
			[Address(RVA = "0x69FA90", Offset = "0x69E890", VA = "0x18069FA90")]
			public void Calculate()
			{
				throw new AnalysisFailedException("CPP2IL failed to recover any usable IL for this method.");
			}

			// Token: 0x040031BD RID: 12733
			[FieldOffset(Offset = "0x10")]
			[Token(Token = "0x40031BD")]
			public Vector3[] tetrahedron;

			// Token: 0x040031BE RID: 12734
			[FieldOffset(Offset = "0x18")]
			[Token(Token = "0x40031BE")]
			public float volume;

			// Token: 0x040031BF RID: 12735
			[FieldOffset(Offset = "0x1C")]
			[Token(Token = "0x40031BF")]
			public Vector3 S;

			// Token: 0x040031C0 RID: 12736
			[FieldOffset(Offset = "0x28")]
			[Token(Token = "0x40031C0")]
			public Vector3 B;
		}

		// Token: 0x02000465 RID: 1125
		[Token(Token = "0x2000465")]
		[Serializable]
		public class LimitPoint
		{
			// Token: 0x0600287F RID: 10367 RVA: 0x0005948C File Offset: 0x0005768C
			[Token(Token = "0x600287F")]
			[Address(RVA = "0x69F1D0", Offset = "0x69DFD0", VA = "0x18069F1D0")]
			public LimitPoint()
			{
				float z = Vector3.forward.z;
				this.point.z = z;
				this.tangentWeight = 1f;
			}

			// Token: 0x040031C1 RID: 12737
			[FieldOffset(Offset = "0x10")]
			[Token(Token = "0x40031C1")]
			public Vector3 point;

			// Token: 0x040031C2 RID: 12738
			[FieldOffset(Offset = "0x1C")]
			[Token(Token = "0x40031C2")]
			public float tangentWeight;
		}
	}
}
