using System;
using Cpp2IlInjected;
using UnityEngine;

namespace RootMotion.FinalIK
{
	// Token: 0x02000431 RID: 1073
	[Token(Token = "0x2000431")]
	[Serializable]
	public class IKSolverLeg : IKSolver
	{
		// Token: 0x0600268E RID: 9870 RVA: 0x000020D3 File Offset: 0x000002D3
		[Token(Token = "0x600268E")]
		[Address(RVA = "0x15971A0", Offset = "0x1595FA0", VA = "0x1815971A0", Slot = "4")]
		public override bool IsValid(ref string message)
		{
			throw new AnalysisFailedException("CPP2IL failed to recover any usable IL for this method.");
		}

		// Token: 0x0600268F RID: 9871 RVA: 0x000020D3 File Offset: 0x000002D3
		[Token(Token = "0x600268F")]
		[Address(RVA = "0x1597D30", Offset = "0x1596B30", VA = "0x181597D30")]
		public bool SetChain(Transform pelvis, Transform thigh, Transform calf, Transform foot, Transform toe, Transform root)
		{
			throw new AnalysisFailedException("CPP2IL failed to recover any usable IL for this method.");
		}

		// Token: 0x06002690 RID: 9872 RVA: 0x000561F0 File Offset: 0x000543F0
		[Token(Token = "0x6002690")]
		[Address(RVA = "0x1596F70", Offset = "0x1595D70", VA = "0x181596F70", Slot = "6")]
		public override IKSolver.Point[] GetPoints()
		{
			IKSolver.Point[] array;
			IKSolver.Point point5;
			for (;;)
			{
				array = new IKSolver.Point[5];
				IKSolver.Point point = this.pelvis;
				if (point == 0 || array != 0)
				{
					array[0] = point;
					IKSolver.Point point2 = this.thigh;
					if (point2 == 0 || array != 0)
					{
						array[1] = point2;
						IKSolver.Point point3 = this.calf;
						if (point3 == 0 || array != 0)
						{
							array[2] = point3;
							IKSolver.Point point4 = this.foot;
							if (point4 == 0 || array != 0)
							{
								array[3] = point4;
								point5 = this.toe;
								if (point5 == 0 || array != 0)
								{
									break;
								}
							}
						}
					}
				}
			}
			array[4] = point5;
			return array;
		}

		// Token: 0x06002691 RID: 9873 RVA: 0x000020D3 File Offset: 0x000002D3
		[Token(Token = "0x6002691")]
		[Address(RVA = "0x1596D60", Offset = "0x1595B60", VA = "0x181596D60", Slot = "7")]
		public override IKSolver.Point GetPoint(Transform transform)
		{
			throw new AnalysisFailedException("CPP2IL failed to recover any usable IL for this method.");
		}

		// Token: 0x06002692 RID: 9874 RVA: 0x00056284 File Offset: 0x00054484
		[Token(Token = "0x6002692")]
		[Address(RVA = "0x1597F10", Offset = "0x1596D10", VA = "0x181597F10", Slot = "9")]
		public override void StoreDefaultLocalState()
		{
			this.thigh.StoreDefaultLocalState();
			this.calf.StoreDefaultLocalState();
			this.foot.StoreDefaultLocalState();
			this.toe.StoreDefaultLocalState();
		}

		// Token: 0x06002693 RID: 9875 RVA: 0x000562C4 File Offset: 0x000544C4
		[Token(Token = "0x6002693")]
		[Address(RVA = "0x1596D00", Offset = "0x1595B00", VA = "0x181596D00", Slot = "8")]
		public override void FixTransforms()
		{
			this.thigh.FixTransform();
			this.calf.FixTransform();
			this.foot.FixTransform();
			this.toe.FixTransform();
		}

		// Token: 0x06002694 RID: 9876 RVA: 0x000020D3 File Offset: 0x000002D3
		[Token(Token = "0x6002694")]
		[Address(RVA = "0x1597680", Offset = "0x1596480", VA = "0x181597680", Slot = "10")]
		protected override void OnInitiate()
		{
			throw new AnalysisFailedException("CPP2IL failed to recover any usable IL for this method.");
		}

		// Token: 0x06002695 RID: 9877 RVA: 0x00056304 File Offset: 0x00054504
		[Token(Token = "0x6002695")]
		[Address(RVA = "0x1597700", Offset = "0x1596500", VA = "0x181597700", Slot = "11")]
		protected override void OnUpdate()
		{
			this.Read();
			IKSolverVR.Leg leg = this.leg;
			float z = this.heelOffset.z;
			float z2 = leg.heelPositionOffset.z;
			float z3 = this.heelOffset.z;
			float z4 = leg.heelPositionOffset.z;
			float z5 = this.heelOffset.z;
			leg.heelPositionOffset.z = z4;
			this.leg.PreSolve();
			this.leg.ApplyOffsets();
			this.leg.Solve();
			this.leg.ResetOffsets();
			this.Write();
		}

		// Token: 0x06002696 RID: 9878 RVA: 0x000563A4 File Offset: 0x000545A4
		[Token(Token = "0x6002696")]
		[Address(RVA = "0x1597E00", Offset = "0x1596C00", VA = "0x181597E00")]
		private void Solve()
		{
			IKSolverVR.Leg leg = this.leg;
			float z = this.heelOffset.z;
			float z2 = leg.heelPositionOffset.z;
			float z3 = this.heelOffset.z;
			float z4 = leg.heelPositionOffset.z;
			float z5 = this.heelOffset.z;
			leg.heelPositionOffset.z = z4;
			this.leg.PreSolve();
			this.leg.ApplyOffsets();
			this.leg.Solve();
			this.leg.PreSolve();
		}

		// Token: 0x06002697 RID: 9879 RVA: 0x000020D3 File Offset: 0x000002D3
		[Token(Token = "0x6002697")]
		[Address(RVA = "0x1597820", Offset = "0x1596620", VA = "0x181597820")]
		private void Read()
		{
			throw new AnalysisFailedException("CPP2IL failed to recover any usable IL for this method.");
		}

		// Token: 0x06002698 RID: 9880 RVA: 0x000020D3 File Offset: 0x000002D3
		[Token(Token = "0x6002698")]
		[Address(RVA = "0x1597F70", Offset = "0x1596D70", VA = "0x181597F70")]
		private void Write()
		{
			throw new AnalysisFailedException("CPP2IL failed to recover any usable IL for this method.");
		}

		// Token: 0x06002699 RID: 9881 RVA: 0x000020D3 File Offset: 0x000002D3
		[Token(Token = "0x6002699")]
		[Address(RVA = "0x1598120", Offset = "0x1596F20", VA = "0x181598120")]
		public IKSolverLeg()
		{
			throw new AnalysisFailedException("CPP2IL failed to recover any usable IL for this method.");
		}

		// Token: 0x04002FE2 RID: 12258
		[FieldOffset(Offset = "0x58")]
		[Token(Token = "0x4002FE2")]
		[Range(0f, 1f)]
		public float IKRotationWeight;

		// Token: 0x04002FE3 RID: 12259
		[FieldOffset(Offset = "0x5C")]
		[Token(Token = "0x4002FE3")]
		public Quaternion IKRotation;

		// Token: 0x04002FE4 RID: 12260
		[FieldOffset(Offset = "0x70")]
		[Token(Token = "0x4002FE4")]
		public IKSolver.Point pelvis;

		// Token: 0x04002FE5 RID: 12261
		[FieldOffset(Offset = "0x78")]
		[Token(Token = "0x4002FE5")]
		public IKSolver.Point thigh;

		// Token: 0x04002FE6 RID: 12262
		[FieldOffset(Offset = "0x80")]
		[Token(Token = "0x4002FE6")]
		public IKSolver.Point calf;

		// Token: 0x04002FE7 RID: 12263
		[FieldOffset(Offset = "0x88")]
		[Token(Token = "0x4002FE7")]
		public IKSolver.Point foot;

		// Token: 0x04002FE8 RID: 12264
		[FieldOffset(Offset = "0x90")]
		[Token(Token = "0x4002FE8")]
		public IKSolver.Point toe;

		// Token: 0x04002FE9 RID: 12265
		[FieldOffset(Offset = "0x98")]
		[Token(Token = "0x4002FE9")]
		public IKSolverVR.Leg leg;

		// Token: 0x04002FEA RID: 12266
		[FieldOffset(Offset = "0xA0")]
		[Token(Token = "0x4002FEA")]
		public Vector3 heelOffset;

		// Token: 0x04002FEB RID: 12267
		[FieldOffset(Offset = "0xB0")]
		[Token(Token = "0x4002FEB")]
		private Vector3[] positions;

		// Token: 0x04002FEC RID: 12268
		[FieldOffset(Offset = "0xB8")]
		[Token(Token = "0x4002FEC")]
		private Quaternion[] rotations;
	}
}
