using System;
using Cpp2IlInjected;
using UnityEngine;

namespace RootMotion.FinalIK
{
	// Token: 0x020004BB RID: 1211
	[Token(Token = "0x20004BB")]
	[AddComponentMenu("Scripts/RootMotion.FinalIK/Rotation Limits/Rotation Limit Polygonal")]
	[HelpURL("http://www.root-motion.com/finalikdox/html/page12.html")]
	public class RotationLimitPolygonal : RotationLimit
	{
		// Token: 0x06002B31 RID: 11057 RVA: 0x0006073C File Offset: 0x0005E93C
		[Token(Token = "0x6002B31")]
		[Address(RVA = "0x507370", Offset = "0x506370", VA = "0x180507370")]
		[ContextMenu("User Manual")]
		private void OpenUserManual()
		{
			Application.OpenURL("http://www.root-motion.com/finalikdox/html/page12.html");
		}

		// Token: 0x06002B32 RID: 11058 RVA: 0x00060754 File Offset: 0x0005E954
		[Token(Token = "0x6002B32")]
		[Address(RVA = "0x507330", Offset = "0x506330", VA = "0x180507330")]
		[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: 0x06002B33 RID: 11059 RVA: 0x0006076C File Offset: 0x0005E96C
		[Token(Token = "0x6002B33")]
		[Address(RVA = "0x508600", Offset = "0x507600", VA = "0x180508600")]
		[ContextMenu("Support Group")]
		private void SupportGroup()
		{
			Application.OpenURL("https://groups.google.com/forum/#!forum/final-ik");
		}

		// Token: 0x06002B34 RID: 11060 RVA: 0x00060784 File Offset: 0x0005E984
		[Token(Token = "0x6002B34")]
		[Address(RVA = "0x506710", Offset = "0x505710", VA = "0x180506710")]
		[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: 0x06002B35 RID: 11061 RVA: 0x0006079C File Offset: 0x0005E99C
		[Token(Token = "0x6002B35")]
		[Address(RVA = "0x507960", Offset = "0x506960", VA = "0x180507960")]
		public void SetLimitPoints(RotationLimitPolygonal.LimitPoint[] points)
		{
			this.points = points;
			this.BuildReachCones();
		}

		// Token: 0x06002B36 RID: 11062 RVA: 0x000020D3 File Offset: 0x000002D3
		[Token(Token = "0x6002B36")]
		[Address(RVA = "0x506EF0", Offset = "0x505EF0", VA = "0x180506EF0", Slot = "4")]
		protected override Quaternion LimitRotation(Quaternion rotation)
		{
			throw new AnalysisFailedException("CPP2IL failed to recover any usable IL for this method.");
		}

		// Token: 0x06002B37 RID: 11063 RVA: 0x000020D3 File Offset: 0x000002D3
		[Token(Token = "0x6002B37")]
		[Address(RVA = "0x508240", Offset = "0x507240", VA = "0x180508240")]
		private void Start()
		{
			throw new AnalysisFailedException("CPP2IL failed to recover any usable IL for this method.");
		}

		// Token: 0x06002B38 RID: 11064 RVA: 0x000020D3 File Offset: 0x000002D3
		[Token(Token = "0x6002B38")]
		[Address(RVA = "0x5074E0", Offset = "0x5064E0", VA = "0x1805074E0")]
		public void ResetToDefault()
		{
			throw new AnalysisFailedException("CPP2IL failed to recover any usable IL for this method.");
		}

		// Token: 0x06002B39 RID: 11065 RVA: 0x000020D3 File Offset: 0x000002D3
		[Token(Token = "0x6002B39")]
		[Address(RVA = "0x506750", Offset = "0x505750", VA = "0x180506750")]
		public void BuildReachCones()
		{
			throw new AnalysisFailedException("CPP2IL failed to recover any usable IL for this method.");
		}

		// Token: 0x06002B3A RID: 11066 RVA: 0x000020D3 File Offset: 0x000002D3
		[Token(Token = "0x6002B3A")]
		[Address(RVA = "0x5079F0", Offset = "0x5069F0", VA = "0x1805079F0")]
		private Vector3[] SmoothPoints()
		{
			throw new AnalysisFailedException("CPP2IL failed to recover any usable IL for this method.");
		}

		// Token: 0x06002B3B RID: 11067 RVA: 0x000020D3 File Offset: 0x000002D3
		[Token(Token = "0x6002B3B")]
		[Address(RVA = "0x506EA0", Offset = "0x505EA0", VA = "0x180506EA0")]
		private float GetScalar(int k)
		{
			throw new AnalysisFailedException("CPP2IL failed to recover any usable IL for this method.");
		}

		// Token: 0x06002B3C RID: 11068 RVA: 0x000020D3 File Offset: 0x000002D3
		[Token(Token = "0x6002B3C")]
		[Address(RVA = "0x5073B0", Offset = "0x5063B0", VA = "0x1805073B0")]
		private Vector3 PointToTangentPlane(Vector3 p, float r)
		{
			throw new AnalysisFailedException("CPP2IL failed to recover any usable IL for this method.");
		}

		// Token: 0x06002B3D RID: 11069 RVA: 0x000020D3 File Offset: 0x000002D3
		[Token(Token = "0x6002B3D")]
		[Address(RVA = "0x508640", Offset = "0x507640", VA = "0x180508640")]
		private Vector3 TangentPointToSphere(Vector3 q, float r)
		{
			throw new AnalysisFailedException("CPP2IL failed to recover any usable IL for this method.");
		}

		// Token: 0x06002B3E RID: 11070 RVA: 0x000020D3 File Offset: 0x000002D3
		[Token(Token = "0x6002B3E")]
		[Address(RVA = "0x506FF0", Offset = "0x505FF0", VA = "0x180506FF0")]
		private Quaternion LimitSwing(Quaternion rotation)
		{
			throw new AnalysisFailedException("CPP2IL failed to recover any usable IL for this method.");
		}

		// Token: 0x06002B3F RID: 11071 RVA: 0x000020D3 File Offset: 0x000002D3
		[Token(Token = "0x6002B3F")]
		[Address(RVA = "0x506D00", Offset = "0x505D00", VA = "0x180506D00")]
		private int GetReachCone(Vector3 L)
		{
			throw new AnalysisFailedException("CPP2IL failed to recover any usable IL for this method.");
		}

		// Token: 0x06002B40 RID: 11072 RVA: 0x000607D4 File Offset: 0x0005E9D4
		[Token(Token = "0x6002B40")]
		[Address(RVA = "0x5087F0", Offset = "0x5077F0", VA = "0x1805087F0")]
		public RotationLimitPolygonal()
		{
			RotationLimitPolygonal.ReachCone[] array = new RotationLimitPolygonal.ReachCone[0];
			this.reachCones = array;
			float z = Vector3.forward.z;
			this.axis.z = z;
			base..ctor();
		}

		// Token: 0x040034A2 RID: 13474
		[FieldOffset(Offset = "0x38")]
		[Token(Token = "0x40034A2")]
		[Range(0f, 180f)]
		public float twistLimit = 180f;

		// Token: 0x040034A3 RID: 13475
		[FieldOffset(Offset = "0x3C")]
		[Token(Token = "0x40034A3")]
		[Range(0f, 3f)]
		public int smoothIterations;

		// Token: 0x040034A4 RID: 13476
		[FieldOffset(Offset = "0x40")]
		[Token(Token = "0x40034A4")]
		[SerializeField]
		[HideInInspector]
		public RotationLimitPolygonal.LimitPoint[] points;

		// Token: 0x040034A5 RID: 13477
		[FieldOffset(Offset = "0x48")]
		[Token(Token = "0x40034A5")]
		[SerializeField]
		[HideInInspector]
		public Vector3[] P;

		// Token: 0x040034A6 RID: 13478
		[FieldOffset(Offset = "0x50")]
		[Token(Token = "0x40034A6")]
		[HideInInspector]
		[SerializeField]
		public RotationLimitPolygonal.ReachCone[] reachCones;

		// Token: 0x020004BC RID: 1212
		[Token(Token = "0x20004BC")]
		[Serializable]
		public class ReachCone
		{
			// Token: 0x170002B0 RID: 688
			// (get) Token: 0x06002B41 RID: 11073 RVA: 0x000020D3 File Offset: 0x000002D3
			[Token(Token = "0x170002B0")]
			public Vector3 o
			{
				[Token(Token = "0x6002B41")]
				[Address(RVA = "0x69B790", Offset = "0x69A790", VA = "0x18069B790")]
				get
				{
					throw new AnalysisFailedException("CPP2IL failed to recover any usable IL for this method.");
				}
			}

			// Token: 0x170002B1 RID: 689
			// (get) Token: 0x06002B42 RID: 11074 RVA: 0x000020D3 File Offset: 0x000002D3
			[Token(Token = "0x170002B1")]
			public Vector3 a
			{
				[Token(Token = "0x6002B42")]
				[Address(RVA = "0x69B6C0", Offset = "0x69A6C0", VA = "0x18069B6C0")]
				get
				{
					throw new AnalysisFailedException("CPP2IL failed to recover any usable IL for this method.");
				}
			}

			// Token: 0x170002B2 RID: 690
			// (get) Token: 0x06002B43 RID: 11075 RVA: 0x000020D3 File Offset: 0x000002D3
			[Token(Token = "0x170002B2")]
			public Vector3 b
			{
				[Token(Token = "0x6002B43")]
				[Address(RVA = "0x69B700", Offset = "0x69A700", VA = "0x18069B700")]
				get
				{
					throw new AnalysisFailedException("CPP2IL failed to recover any usable IL for this method.");
				}
			}

			// Token: 0x170002B3 RID: 691
			// (get) Token: 0x06002B44 RID: 11076 RVA: 0x000020D3 File Offset: 0x000002D3
			[Token(Token = "0x170002B3")]
			public Vector3 c
			{
				[Token(Token = "0x6002B44")]
				[Address(RVA = "0x69B740", Offset = "0x69A740", VA = "0x18069B740")]
				get
				{
					throw new AnalysisFailedException("CPP2IL failed to recover any usable IL for this method.");
				}
			}

			// Token: 0x06002B45 RID: 11077 RVA: 0x000020D3 File Offset: 0x000002D3
			[Token(Token = "0x6002B45")]
			[Address(RVA = "0x69B510", Offset = "0x69A510", VA = "0x18069B510")]
			public ReachCone(Vector3 _o, Vector3 _a, Vector3 _b, Vector3 _c)
			{
				throw new AnalysisFailedException("CPP2IL failed to recover any usable IL for this method.");
			}

			// Token: 0x170002B4 RID: 692
			// (get) Token: 0x06002B46 RID: 11078 RVA: 0x000020D3 File Offset: 0x000002D3
			[Token(Token = "0x170002B4")]
			public bool isValid
			{
				[Token(Token = "0x6002B46")]
				[Address(RVA = "0x69B780", Offset = "0x69A780", VA = "0x18069B780")]
				get
				{
					throw new AnalysisFailedException("CPP2IL failed to recover any usable IL for this method.");
				}
			}

			// Token: 0x06002B47 RID: 11079 RVA: 0x000020D3 File Offset: 0x000002D3
			[Token(Token = "0x6002B47")]
			[Address(RVA = "0x69B2C0", Offset = "0x69A2C0", VA = "0x18069B2C0")]
			public void Calculate()
			{
				throw new AnalysisFailedException("CPP2IL failed to recover any usable IL for this method.");
			}

			// Token: 0x040034A7 RID: 13479
			[FieldOffset(Offset = "0x10")]
			[Token(Token = "0x40034A7")]
			public Vector3[] tetrahedron;

			// Token: 0x040034A8 RID: 13480
			[FieldOffset(Offset = "0x18")]
			[Token(Token = "0x40034A8")]
			public float volume;

			// Token: 0x040034A9 RID: 13481
			[FieldOffset(Offset = "0x1C")]
			[Token(Token = "0x40034A9")]
			public Vector3 S;

			// Token: 0x040034AA RID: 13482
			[FieldOffset(Offset = "0x28")]
			[Token(Token = "0x40034AA")]
			public Vector3 B;
		}

		// Token: 0x020004BD RID: 1213
		[Token(Token = "0x20004BD")]
		[Serializable]
		public class LimitPoint
		{
			// Token: 0x06002B48 RID: 11080 RVA: 0x00060818 File Offset: 0x0005EA18
			[Token(Token = "0x6002B48")]
			[Address(RVA = "0x699CE0", Offset = "0x698CE0", VA = "0x180699CE0")]
			public LimitPoint()
			{
				float z = Vector3.forward.z;
				this.point.z = z;
				this.tangentWeight = 1f;
			}

			// Token: 0x040034AB RID: 13483
			[FieldOffset(Offset = "0x10")]
			[Token(Token = "0x40034AB")]
			public Vector3 point;

			// Token: 0x040034AC RID: 13484
			[FieldOffset(Offset = "0x1C")]
			[Token(Token = "0x40034AC")]
			public float tangentWeight;
		}
	}
}
