using System;
using Cpp2IlInjected;
using UnityEngine;

namespace RootMotion.FinalIK
{
	// Token: 0x0200046F RID: 1135
	[Token(Token = "0x200046F")]
	[Serializable]
	public class FBIKChain
	{
		// Token: 0x0600282B RID: 10283 RVA: 0x0005BC70 File Offset: 0x00059E70
		[Token(Token = "0x600282B")]
		[Address(RVA = "0xD171B0", Offset = "0xD161B0", VA = "0x180D171B0")]
		public FBIKChain()
		{
			this.pull = 1f;
			int num = 0;
			this.reach = 0.1f;
			this.reachSmoothing = (FBIKChain.Smoothing)((ulong)1L);
			this.pushSmoothing = (FBIKChain.Smoothing)((ulong)1L);
			IKSolver.Node[] array = new IKSolver.Node[num];
			this.nodes = array;
			int[] array2 = new int[0];
			this.children = array2;
			FBIKChain.ChildConstraint[] array3 = new FBIKChain.ChildConstraint[0];
			this.childConstraints = array3;
			IKConstraintBend ikconstraintBend = new IKConstraintBend();
			this.bendConstraint = ikconstraintBend;
			base..ctor();
		}

		// Token: 0x0600282C RID: 10284 RVA: 0x000020D3 File Offset: 0x000002D3
		[Token(Token = "0x600282C")]
		[Address(RVA = "0xD172B0", Offset = "0xD162B0", VA = "0x180D172B0")]
		public FBIKChain(float pin, float pull, params Transform[] nodeTransforms)
		{
			throw new AnalysisFailedException("CPP2IL failed to recover any usable IL for this method.");
		}

		// Token: 0x0600282D RID: 10285 RVA: 0x000020D3 File Offset: 0x000002D3
		[Token(Token = "0x600282D")]
		[Address(RVA = "0xD15CF0", Offset = "0xD14CF0", VA = "0x180D15CF0")]
		public void SetNodes(params Transform[] boneTransforms)
		{
			throw new AnalysisFailedException("CPP2IL failed to recover any usable IL for this method.");
		}

		// Token: 0x0600282E RID: 10286 RVA: 0x0005BCE8 File Offset: 0x00059EE8
		[Token(Token = "0x600282E")]
		[Address(RVA = "0xD14A50", Offset = "0xD13A50", VA = "0x180D14A50")]
		public int GetNodeIndex(Transform boneTransform)
		{
			IKSolver.Node[] array = this.nodes;
			int num = 0;
			if (num < array.Length)
			{
				if (!(array[num].transform == boneTransform))
				{
					IKSolver.Node[] array2 = this.nodes;
					num++;
				}
				return num;
			}
			throw new NullReferenceException();
		}

		// Token: 0x0600282F RID: 10287 RVA: 0x000020D3 File Offset: 0x000002D3
		[Token(Token = "0x600282F")]
		[Address(RVA = "0xD14D10", Offset = "0xD13D10", VA = "0x180D14D10")]
		public bool IsValid(ref string message)
		{
			throw new AnalysisFailedException("CPP2IL failed to recover any usable IL for this method.");
		}

		// Token: 0x06002830 RID: 10288 RVA: 0x000020D3 File Offset: 0x000002D3
		[Token(Token = "0x6002830")]
		[Address(RVA = "0xD14B40", Offset = "0xD13B40", VA = "0x180D14B40")]
		public void Initiate(IKSolverFullBody solver)
		{
			throw new AnalysisFailedException("CPP2IL failed to recover any usable IL for this method.");
		}

		// Token: 0x06002831 RID: 10289 RVA: 0x000020D3 File Offset: 0x000002D3
		[Token(Token = "0x6002831")]
		[Address(RVA = "0xD156C0", Offset = "0xD146C0", VA = "0x180D156C0")]
		public void ReadPose(IKSolverFullBody solver, bool fullBody)
		{
			throw new AnalysisFailedException("CPP2IL failed to recover any usable IL for this method.");
		}

		// Token: 0x06002832 RID: 10290 RVA: 0x000020D3 File Offset: 0x000002D3
		[Token(Token = "0x6002832")]
		[Address(RVA = "0xD13F00", Offset = "0xD12F00", VA = "0x180D13F00")]
		private void CalculateBoneLengths(IKSolverFullBody solver)
		{
			throw new AnalysisFailedException("CPP2IL failed to recover any usable IL for this method.");
		}

		// Token: 0x06002833 RID: 10291 RVA: 0x000020D3 File Offset: 0x000002D3
		[Token(Token = "0x6002833")]
		[Address(RVA = "0xD152A0", Offset = "0xD142A0", VA = "0x180D152A0")]
		public void Reach(IKSolverFullBody solver)
		{
			throw new AnalysisFailedException("CPP2IL failed to recover any usable IL for this method.");
		}

		// Token: 0x06002834 RID: 10292 RVA: 0x000020D3 File Offset: 0x000002D3
		[Token(Token = "0x6002834")]
		[Address(RVA = "0xD14E40", Offset = "0xD13E40", VA = "0x180D14E40")]
		public Vector3 Push(IKSolverFullBody solver)
		{
			throw new AnalysisFailedException("CPP2IL failed to recover any usable IL for this method.");
		}

		// Token: 0x06002835 RID: 10293 RVA: 0x000020D3 File Offset: 0x000002D3
		[Token(Token = "0x6002835")]
		[Address(RVA = "0xD16520", Offset = "0xD15520", VA = "0x180D16520")]
		public void SolveTrigonometric(IKSolverFullBody solver, bool calculateBendDirection = false)
		{
			throw new AnalysisFailedException("CPP2IL failed to recover any usable IL for this method.");
		}

		// Token: 0x06002836 RID: 10294 RVA: 0x000020D3 File Offset: 0x000002D3
		[Token(Token = "0x6002836")]
		[Address(RVA = "0xD16A50", Offset = "0xD15A50", VA = "0x180D16A50")]
		public void Stage1(IKSolverFullBody solver)
		{
			throw new AnalysisFailedException("CPP2IL failed to recover any usable IL for this method.");
		}

		// Token: 0x06002837 RID: 10295 RVA: 0x000020D3 File Offset: 0x000002D3
		[Token(Token = "0x6002837")]
		[Address(RVA = "0xD17020", Offset = "0xD16020", VA = "0x180D17020")]
		public void Stage2(IKSolverFullBody solver, Vector3 position)
		{
			throw new AnalysisFailedException("CPP2IL failed to recover any usable IL for this method.");
		}

		// Token: 0x06002838 RID: 10296 RVA: 0x000020D3 File Offset: 0x000002D3
		[Token(Token = "0x6002838")]
		[Address(RVA = "0xD15EE0", Offset = "0xD14EE0", VA = "0x180D15EE0")]
		public void SolveConstraintSystems(IKSolverFullBody solver)
		{
			throw new AnalysisFailedException("CPP2IL failed to recover any usable IL for this method.");
		}

		// Token: 0x06002839 RID: 10297 RVA: 0x000020D3 File Offset: 0x000002D3
		[Token(Token = "0x6002839")]
		[Address(RVA = "0xD16210", Offset = "0xD15210", VA = "0x180D16210")]
		private Vector3 SolveFABRIKJoint(Vector3 pos1, Vector3 pos2, float length)
		{
			throw new AnalysisFailedException("CPP2IL failed to recover any usable IL for this method.");
		}

		// Token: 0x0600283A RID: 10298 RVA: 0x000020D3 File Offset: 0x000002D3
		[Token(Token = "0x600283A")]
		[Address(RVA = "0xD14880", Offset = "0xD13880", VA = "0x180D14880")]
		protected Vector3 GetDirToBendPoint(Vector3 direction, Vector3 bendDirection, float directionMagnitude)
		{
			throw new AnalysisFailedException("CPP2IL failed to recover any usable IL for this method.");
		}

		// Token: 0x0600283B RID: 10299 RVA: 0x0005BD30 File Offset: 0x00059F30
		[Token(Token = "0x600283B")]
		[Address(RVA = "0xD15E50", Offset = "0xD14E50", VA = "0x180D15E50")]
		private void SolveChildConstraints(IKSolverFullBody solver)
		{
			FBIKChain.ChildConstraint[] array = this.childConstraints;
			int num = 0;
			if (num < array.Length)
			{
				array[num].Solve(solver);
				FBIKChain.ChildConstraint[] array2 = this.childConstraints;
				num++;
			}
		}

		// Token: 0x0600283C RID: 10300 RVA: 0x000020D3 File Offset: 0x000002D3
		[Token(Token = "0x600283C")]
		[Address(RVA = "0xD16330", Offset = "0xD15330", VA = "0x180D16330")]
		private void SolveLinearConstraint(IKSolver.Node node1, IKSolver.Node node2, float crossFade, float distance)
		{
			throw new AnalysisFailedException("CPP2IL failed to recover any usable IL for this method.");
		}

		// Token: 0x0600283D RID: 10301 RVA: 0x000020D3 File Offset: 0x000002D3
		[Token(Token = "0x600283D")]
		[Address(RVA = "0xD146A0", Offset = "0xD136A0", VA = "0x180D146A0")]
		public void ForwardReach(Vector3 position)
		{
			throw new AnalysisFailedException("CPP2IL failed to recover any usable IL for this method.");
		}

		// Token: 0x0600283E RID: 10302 RVA: 0x000020D3 File Offset: 0x000002D3
		[Token(Token = "0x600283E")]
		[Address(RVA = "0xD13C00", Offset = "0xD12C00", VA = "0x180D13C00")]
		private void BackwardReach(Vector3 position)
		{
			throw new AnalysisFailedException("CPP2IL failed to recover any usable IL for this method.");
		}

		// Token: 0x040031E5 RID: 12773
		[FieldOffset(Offset = "0x10")]
		[Token(Token = "0x40031E5")]
		[Range(0f, 1f)]
		public float pin;

		// Token: 0x040031E6 RID: 12774
		[FieldOffset(Offset = "0x14")]
		[Token(Token = "0x40031E6")]
		[Range(0f, 1f)]
		public float pull;

		// Token: 0x040031E7 RID: 12775
		[FieldOffset(Offset = "0x18")]
		[Token(Token = "0x40031E7")]
		[Range(0f, 1f)]
		public float push;

		// Token: 0x040031E8 RID: 12776
		[FieldOffset(Offset = "0x1C")]
		[Token(Token = "0x40031E8")]
		[Range(-1f, 1f)]
		public float pushParent;

		// Token: 0x040031E9 RID: 12777
		[FieldOffset(Offset = "0x20")]
		[Token(Token = "0x40031E9")]
		[Range(0f, 1f)]
		public float reach;

		// Token: 0x040031EA RID: 12778
		[FieldOffset(Offset = "0x24")]
		[Token(Token = "0x40031EA")]
		public FBIKChain.Smoothing reachSmoothing;

		// Token: 0x040031EB RID: 12779
		[FieldOffset(Offset = "0x28")]
		[Token(Token = "0x40031EB")]
		public FBIKChain.Smoothing pushSmoothing;

		// Token: 0x040031EC RID: 12780
		[FieldOffset(Offset = "0x30")]
		[Token(Token = "0x40031EC")]
		public IKSolver.Node[] nodes;

		// Token: 0x040031ED RID: 12781
		[FieldOffset(Offset = "0x38")]
		[Token(Token = "0x40031ED")]
		public int[] children;

		// Token: 0x040031EE RID: 12782
		[FieldOffset(Offset = "0x40")]
		[Token(Token = "0x40031EE")]
		public FBIKChain.ChildConstraint[] childConstraints;

		// Token: 0x040031EF RID: 12783
		[FieldOffset(Offset = "0x48")]
		[Token(Token = "0x40031EF")]
		public IKConstraintBend bendConstraint;

		// Token: 0x040031F0 RID: 12784
		[FieldOffset(Offset = "0x50")]
		[Token(Token = "0x40031F0")]
		private float rootLength;

		// Token: 0x040031F1 RID: 12785
		[FieldOffset(Offset = "0x54")]
		[Token(Token = "0x40031F1")]
		private bool initiated;

		// Token: 0x040031F2 RID: 12786
		[FieldOffset(Offset = "0x58")]
		[Token(Token = "0x40031F2")]
		private float length;

		// Token: 0x040031F3 RID: 12787
		[FieldOffset(Offset = "0x5C")]
		[Token(Token = "0x40031F3")]
		private float distance;

		// Token: 0x040031F4 RID: 12788
		[FieldOffset(Offset = "0x60")]
		[Token(Token = "0x40031F4")]
		private IKSolver.Point p;

		// Token: 0x040031F5 RID: 12789
		[FieldOffset(Offset = "0x68")]
		[Token(Token = "0x40031F5")]
		private float reachForce;

		// Token: 0x040031F6 RID: 12790
		[FieldOffset(Offset = "0x6C")]
		[Token(Token = "0x40031F6")]
		private float pullParentSum;

		// Token: 0x040031F7 RID: 12791
		[FieldOffset(Offset = "0x70")]
		[Token(Token = "0x40031F7")]
		private float[] crossFades;

		// Token: 0x040031F8 RID: 12792
		[FieldOffset(Offset = "0x78")]
		[Token(Token = "0x40031F8")]
		private float sqrMag1;

		// Token: 0x040031F9 RID: 12793
		[FieldOffset(Offset = "0x7C")]
		[Token(Token = "0x40031F9")]
		private float sqrMag2;

		// Token: 0x040031FA RID: 12794
		[FieldOffset(Offset = "0x80")]
		[Token(Token = "0x40031FA")]
		private float sqrMagDif;

		// Token: 0x040031FB RID: 12795
		[Token(Token = "0x40031FB")]
		private const float maxLimbLength = 0.99999f;

		// Token: 0x02000470 RID: 1136
		[Token(Token = "0x2000470")]
		[Serializable]
		public class ChildConstraint
		{
			// Token: 0x1700024F RID: 591
			// (get) Token: 0x0600283F RID: 10303 RVA: 0x0005BD70 File Offset: 0x00059F70
			// (set) Token: 0x06002840 RID: 10304 RVA: 0x0005BD84 File Offset: 0x00059F84
			[Token(Token = "0x1700024F")]
			public float nominalDistance
			{
				[Token(Token = "0x600283F")]
				[Address(RVA = "0xB94720", Offset = "0xB93720", VA = "0x180B94720")]
				get;
				[Token(Token = "0x6002840")]
				[Address(RVA = "0x13B7D20", Offset = "0x13B6D20", VA = "0x1813B7D20")]
				private set;
			}

			// Token: 0x17000250 RID: 592
			// (get) Token: 0x06002841 RID: 10305 RVA: 0x0005BD98 File Offset: 0x00059F98
			// (set) Token: 0x06002842 RID: 10306 RVA: 0x0005BDAC File Offset: 0x00059FAC
			[Token(Token = "0x17000250")]
			public bool isRigid
			{
				[Token(Token = "0x6002841")]
				[Address(RVA = "0x4C3B00", Offset = "0x4C2B00", VA = "0x1804C3B00")]
				get;
				[Token(Token = "0x6002842")]
				[Address(RVA = "0x626900", Offset = "0x625900", VA = "0x180626900")]
				private set;
			}

			// Token: 0x06002843 RID: 10307 RVA: 0x0005BDC0 File Offset: 0x00059FC0
			[Token(Token = "0x6002843")]
			[Address(RVA = "0x19BCA40", Offset = "0x19BBA40", VA = "0x1819BCA40")]
			public ChildConstraint(Transform bone1, Transform bone2, float pushElasticity = 0f, float pullElasticity = 0f)
			{
				this.bone1 = bone1;
				this.bone2 = bone2;
				this.pushElasticity = pushElasticity;
				this.pullElasticity = (float)0;
			}

			// Token: 0x06002844 RID: 10308 RVA: 0x0005BDF0 File Offset: 0x00059FF0
			[Token(Token = "0x6002844")]
			[Address(RVA = "0x19BC3E0", Offset = "0x19BB3E0", VA = "0x1819BC3E0")]
			public void Initiate(IKSolverFullBody solver)
			{
				Transform transform = this.bone1;
				int chainIndex = solver.GetChainIndex(transform);
				Transform transform2 = this.bone2;
				this.chain1Index = chainIndex;
				int chainIndex2 = solver.GetChainIndex(transform2);
				this.chain2Index = chainIndex2;
				this.OnPreSolve(solver);
			}

			// Token: 0x06002845 RID: 10309 RVA: 0x000020D3 File Offset: 0x000002D3
			[Token(Token = "0x6002845")]
			[Address(RVA = "0x19BC440", Offset = "0x19BB440", VA = "0x1819BC440")]
			public void OnPreSolve(IKSolverFullBody solver)
			{
				throw new AnalysisFailedException("CPP2IL failed to recover any usable IL for this method.");
			}

			// Token: 0x06002846 RID: 10310 RVA: 0x000020D3 File Offset: 0x000002D3
			[Token(Token = "0x6002846")]
			[Address(RVA = "0x19BC680", Offset = "0x19BB680", VA = "0x1819BC680")]
			public void Solve(IKSolverFullBody solver)
			{
				throw new AnalysisFailedException("CPP2IL failed to recover any usable IL for this method.");
			}

			// Token: 0x040031FC RID: 12796
			[FieldOffset(Offset = "0x10")]
			[Token(Token = "0x40031FC")]
			public float pushElasticity;

			// Token: 0x040031FD RID: 12797
			[FieldOffset(Offset = "0x14")]
			[Token(Token = "0x40031FD")]
			public float pullElasticity;

			// Token: 0x040031FE RID: 12798
			[FieldOffset(Offset = "0x18")]
			[Token(Token = "0x40031FE")]
			[SerializeField]
			private Transform bone1;

			// Token: 0x040031FF RID: 12799
			[FieldOffset(Offset = "0x20")]
			[Token(Token = "0x40031FF")]
			[SerializeField]
			private Transform bone2;

			// Token: 0x04003202 RID: 12802
			[FieldOffset(Offset = "0x30")]
			[Token(Token = "0x4003202")]
			private float crossFade;

			// Token: 0x04003203 RID: 12803
			[FieldOffset(Offset = "0x34")]
			[Token(Token = "0x4003203")]
			private float inverseCrossFade;

			// Token: 0x04003204 RID: 12804
			[FieldOffset(Offset = "0x38")]
			[Token(Token = "0x4003204")]
			private int chain1Index;

			// Token: 0x04003205 RID: 12805
			[FieldOffset(Offset = "0x3C")]
			[Token(Token = "0x4003205")]
			private int chain2Index;
		}

		// Token: 0x02000471 RID: 1137
		[Token(Token = "0x2000471")]
		[Serializable]
		public enum Smoothing
		{
			// Token: 0x04003207 RID: 12807
			[Token(Token = "0x4003207")]
			None,
			// Token: 0x04003208 RID: 12808
			[Token(Token = "0x4003208")]
			Exponential,
			// Token: 0x04003209 RID: 12809
			[Token(Token = "0x4003209")]
			Cubic
		}
	}
}
