using System;
using Cpp2IlInjected;
using UnityEngine;

namespace RootMotion.FinalIK
{
	// Token: 0x02000489 RID: 1161
	[Token(Token = "0x2000489")]
	[Serializable]
	public class IKSolverLeg : IKSolver
	{
		// Token: 0x06002957 RID: 10583 RVA: 0x000020D3 File Offset: 0x000002D3
		[Token(Token = "0x6002957")]
		[Address(RVA = "0x151C360", Offset = "0x151B360", VA = "0x18151C360", Slot = "4")]
		public override bool IsValid(ref string message)
		{
			throw new AnalysisFailedException("CPP2IL failed to recover any usable IL for this method.");
		}

		// Token: 0x06002958 RID: 10584 RVA: 0x000020D3 File Offset: 0x000002D3
		[Token(Token = "0x6002958")]
		[Address(RVA = "0x151CEF0", Offset = "0x151BEF0", VA = "0x18151CEF0")]
		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: 0x06002959 RID: 10585 RVA: 0x0005D4EC File Offset: 0x0005B6EC
		[Token(Token = "0x6002959")]
		[Address(RVA = "0x151C130", Offset = "0x151B130", VA = "0x18151C130", 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: 0x0600295A RID: 10586 RVA: 0x000020D3 File Offset: 0x000002D3
		[Token(Token = "0x600295A")]
		[Address(RVA = "0x151BF20", Offset = "0x151AF20", VA = "0x18151BF20", Slot = "7")]
		public override IKSolver.Point GetPoint(Transform transform)
		{
			throw new AnalysisFailedException("CPP2IL failed to recover any usable IL for this method.");
		}

		// Token: 0x0600295B RID: 10587 RVA: 0x0005D580 File Offset: 0x0005B780
		[Token(Token = "0x600295B")]
		[Address(RVA = "0x151D0D0", Offset = "0x151C0D0", VA = "0x18151D0D0", Slot = "9")]
		public override void StoreDefaultLocalState()
		{
			this.thigh.StoreDefaultLocalState();
			this.calf.StoreDefaultLocalState();
			this.foot.StoreDefaultLocalState();
			this.toe.StoreDefaultLocalState();
		}

		// Token: 0x0600295C RID: 10588 RVA: 0x0005D5C0 File Offset: 0x0005B7C0
		[Token(Token = "0x600295C")]
		[Address(RVA = "0x151BEC0", Offset = "0x151AEC0", VA = "0x18151BEC0", Slot = "8")]
		public override void FixTransforms()
		{
			this.thigh.FixTransform();
			this.calf.FixTransform();
			this.foot.FixTransform();
			this.toe.FixTransform();
		}

		// Token: 0x0600295D RID: 10589 RVA: 0x000020D3 File Offset: 0x000002D3
		[Token(Token = "0x600295D")]
		[Address(RVA = "0x151C840", Offset = "0x151B840", VA = "0x18151C840", Slot = "10")]
		protected override void OnInitiate()
		{
			throw new AnalysisFailedException("CPP2IL failed to recover any usable IL for this method.");
		}

		// Token: 0x0600295E RID: 10590 RVA: 0x0005D600 File Offset: 0x0005B800
		[Token(Token = "0x600295E")]
		[Address(RVA = "0x151C8C0", Offset = "0x151B8C0", VA = "0x18151C8C0", 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: 0x0600295F RID: 10591 RVA: 0x0005D6A0 File Offset: 0x0005B8A0
		[Token(Token = "0x600295F")]
		[Address(RVA = "0x151CFC0", Offset = "0x151BFC0", VA = "0x18151CFC0")]
		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: 0x06002960 RID: 10592 RVA: 0x000020D3 File Offset: 0x000002D3
		[Token(Token = "0x6002960")]
		[Address(RVA = "0x151C9E0", Offset = "0x151B9E0", VA = "0x18151C9E0")]
		private void Read()
		{
			throw new AnalysisFailedException("CPP2IL failed to recover any usable IL for this method.");
		}

		// Token: 0x06002961 RID: 10593 RVA: 0x000020D3 File Offset: 0x000002D3
		[Token(Token = "0x6002961")]
		[Address(RVA = "0x151D130", Offset = "0x151C130", VA = "0x18151D130")]
		private void Write()
		{
			throw new AnalysisFailedException("CPP2IL failed to recover any usable IL for this method.");
		}

		// Token: 0x06002962 RID: 10594 RVA: 0x000020D3 File Offset: 0x000002D3
		[Token(Token = "0x6002962")]
		[Address(RVA = "0x151D2E0", Offset = "0x151C2E0", VA = "0x18151D2E0")]
		public IKSolverLeg()
		{
			throw new AnalysisFailedException("CPP2IL failed to recover any usable IL for this method.");
		}

		// Token: 0x040032CC RID: 13004
		[FieldOffset(Offset = "0x58")]
		[Token(Token = "0x40032CC")]
		[Range(0f, 1f)]
		public float IKRotationWeight;

		// Token: 0x040032CD RID: 13005
		[FieldOffset(Offset = "0x5C")]
		[Token(Token = "0x40032CD")]
		public Quaternion IKRotation;

		// Token: 0x040032CE RID: 13006
		[FieldOffset(Offset = "0x70")]
		[Token(Token = "0x40032CE")]
		public IKSolver.Point pelvis;

		// Token: 0x040032CF RID: 13007
		[FieldOffset(Offset = "0x78")]
		[Token(Token = "0x40032CF")]
		public IKSolver.Point thigh;

		// Token: 0x040032D0 RID: 13008
		[FieldOffset(Offset = "0x80")]
		[Token(Token = "0x40032D0")]
		public IKSolver.Point calf;

		// Token: 0x040032D1 RID: 13009
		[FieldOffset(Offset = "0x88")]
		[Token(Token = "0x40032D1")]
		public IKSolver.Point foot;

		// Token: 0x040032D2 RID: 13010
		[FieldOffset(Offset = "0x90")]
		[Token(Token = "0x40032D2")]
		public IKSolver.Point toe;

		// Token: 0x040032D3 RID: 13011
		[FieldOffset(Offset = "0x98")]
		[Token(Token = "0x40032D3")]
		public IKSolverVR.Leg leg;

		// Token: 0x040032D4 RID: 13012
		[FieldOffset(Offset = "0xA0")]
		[Token(Token = "0x40032D4")]
		public Vector3 heelOffset;

		// Token: 0x040032D5 RID: 13013
		[FieldOffset(Offset = "0xB0")]
		[Token(Token = "0x40032D5")]
		private Vector3[] positions;

		// Token: 0x040032D6 RID: 13014
		[FieldOffset(Offset = "0xB8")]
		[Token(Token = "0x40032D6")]
		private Quaternion[] rotations;
	}
}
