using System;
using Cpp2IlInjected;
using UnityEngine;

namespace RootMotion.FinalIK
{
	// Token: 0x02000417 RID: 1047
	[Token(Token = "0x2000417")]
	[Serializable]
	public class FBIKChain
	{
		// Token: 0x06002562 RID: 9570 RVA: 0x00054914 File Offset: 0x00052B14
		[Token(Token = "0x6002562")]
		[Address(RVA = "0x4BB470", Offset = "0x4BA270", VA = "0x1804BB470")]
		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: 0x06002563 RID: 9571 RVA: 0x000020D3 File Offset: 0x000002D3
		[Token(Token = "0x6002563")]
		[Address(RVA = "0x4BB570", Offset = "0x4BA370", VA = "0x1804BB570")]
		public FBIKChain(float pin, float pull, params Transform[] nodeTransforms)
		{
			throw new AnalysisFailedException("CPP2IL failed to recover any usable IL for this method.");
		}

		// Token: 0x06002564 RID: 9572 RVA: 0x000020D3 File Offset: 0x000002D3
		[Token(Token = "0x6002564")]
		[Address(RVA = "0x4B9FB0", Offset = "0x4B8DB0", VA = "0x1804B9FB0")]
		public void SetNodes(params Transform[] boneTransforms)
		{
			throw new AnalysisFailedException("CPP2IL failed to recover any usable IL for this method.");
		}

		// Token: 0x06002565 RID: 9573 RVA: 0x0005498C File Offset: 0x00052B8C
		[Token(Token = "0x6002565")]
		[Address(RVA = "0x4B8D10", Offset = "0x4B7B10", VA = "0x1804B8D10")]
		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: 0x06002566 RID: 9574 RVA: 0x000020D3 File Offset: 0x000002D3
		[Token(Token = "0x6002566")]
		[Address(RVA = "0x4B8FD0", Offset = "0x4B7DD0", VA = "0x1804B8FD0")]
		public bool IsValid(ref string message)
		{
			throw new AnalysisFailedException("CPP2IL failed to recover any usable IL for this method.");
		}

		// Token: 0x06002567 RID: 9575 RVA: 0x000020D3 File Offset: 0x000002D3
		[Token(Token = "0x6002567")]
		[Address(RVA = "0x4B8E00", Offset = "0x4B7C00", VA = "0x1804B8E00")]
		public void Initiate(IKSolverFullBody solver)
		{
			throw new AnalysisFailedException("CPP2IL failed to recover any usable IL for this method.");
		}

		// Token: 0x06002568 RID: 9576 RVA: 0x000020D3 File Offset: 0x000002D3
		[Token(Token = "0x6002568")]
		[Address(RVA = "0x4B9980", Offset = "0x4B8780", VA = "0x1804B9980")]
		public void ReadPose(IKSolverFullBody solver, bool fullBody)
		{
			throw new AnalysisFailedException("CPP2IL failed to recover any usable IL for this method.");
		}

		// Token: 0x06002569 RID: 9577 RVA: 0x000020D3 File Offset: 0x000002D3
		[Token(Token = "0x6002569")]
		[Address(RVA = "0x4B81C0", Offset = "0x4B6FC0", VA = "0x1804B81C0")]
		private void CalculateBoneLengths(IKSolverFullBody solver)
		{
			throw new AnalysisFailedException("CPP2IL failed to recover any usable IL for this method.");
		}

		// Token: 0x0600256A RID: 9578 RVA: 0x000020D3 File Offset: 0x000002D3
		[Token(Token = "0x600256A")]
		[Address(RVA = "0x4B9560", Offset = "0x4B8360", VA = "0x1804B9560")]
		public void Reach(IKSolverFullBody solver)
		{
			throw new AnalysisFailedException("CPP2IL failed to recover any usable IL for this method.");
		}

		// Token: 0x0600256B RID: 9579 RVA: 0x000020D3 File Offset: 0x000002D3
		[Token(Token = "0x600256B")]
		[Address(RVA = "0x4B9100", Offset = "0x4B7F00", VA = "0x1804B9100")]
		public Vector3 Push(IKSolverFullBody solver)
		{
			throw new AnalysisFailedException("CPP2IL failed to recover any usable IL for this method.");
		}

		// Token: 0x0600256C RID: 9580 RVA: 0x000020D3 File Offset: 0x000002D3
		[Token(Token = "0x600256C")]
		[Address(RVA = "0x4BA7E0", Offset = "0x4B95E0", VA = "0x1804BA7E0")]
		public void SolveTrigonometric(IKSolverFullBody solver, bool calculateBendDirection = false)
		{
			throw new AnalysisFailedException("CPP2IL failed to recover any usable IL for this method.");
		}

		// Token: 0x0600256D RID: 9581 RVA: 0x000020D3 File Offset: 0x000002D3
		[Token(Token = "0x600256D")]
		[Address(RVA = "0x4BAD10", Offset = "0x4B9B10", VA = "0x1804BAD10")]
		public void Stage1(IKSolverFullBody solver)
		{
			throw new AnalysisFailedException("CPP2IL failed to recover any usable IL for this method.");
		}

		// Token: 0x0600256E RID: 9582 RVA: 0x000020D3 File Offset: 0x000002D3
		[Token(Token = "0x600256E")]
		[Address(RVA = "0x4BB2E0", Offset = "0x4BA0E0", VA = "0x1804BB2E0")]
		public void Stage2(IKSolverFullBody solver, Vector3 position)
		{
			throw new AnalysisFailedException("CPP2IL failed to recover any usable IL for this method.");
		}

		// Token: 0x0600256F RID: 9583 RVA: 0x000020D3 File Offset: 0x000002D3
		[Token(Token = "0x600256F")]
		[Address(RVA = "0x4BA1A0", Offset = "0x4B8FA0", VA = "0x1804BA1A0")]
		public void SolveConstraintSystems(IKSolverFullBody solver)
		{
			throw new AnalysisFailedException("CPP2IL failed to recover any usable IL for this method.");
		}

		// Token: 0x06002570 RID: 9584 RVA: 0x000020D3 File Offset: 0x000002D3
		[Token(Token = "0x6002570")]
		[Address(RVA = "0x4BA4D0", Offset = "0x4B92D0", VA = "0x1804BA4D0")]
		private Vector3 SolveFABRIKJoint(Vector3 pos1, Vector3 pos2, float length)
		{
			throw new AnalysisFailedException("CPP2IL failed to recover any usable IL for this method.");
		}

		// Token: 0x06002571 RID: 9585 RVA: 0x000020D3 File Offset: 0x000002D3
		[Token(Token = "0x6002571")]
		[Address(RVA = "0x4B8B40", Offset = "0x4B7940", VA = "0x1804B8B40")]
		protected Vector3 GetDirToBendPoint(Vector3 direction, Vector3 bendDirection, float directionMagnitude)
		{
			throw new AnalysisFailedException("CPP2IL failed to recover any usable IL for this method.");
		}

		// Token: 0x06002572 RID: 9586 RVA: 0x000549D4 File Offset: 0x00052BD4
		[Token(Token = "0x6002572")]
		[Address(RVA = "0x4BA110", Offset = "0x4B8F10", VA = "0x1804BA110")]
		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: 0x06002573 RID: 9587 RVA: 0x000020D3 File Offset: 0x000002D3
		[Token(Token = "0x6002573")]
		[Address(RVA = "0x4BA5F0", Offset = "0x4B93F0", VA = "0x1804BA5F0")]
		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: 0x06002574 RID: 9588 RVA: 0x000020D3 File Offset: 0x000002D3
		[Token(Token = "0x6002574")]
		[Address(RVA = "0x4B8960", Offset = "0x4B7760", VA = "0x1804B8960")]
		public void ForwardReach(Vector3 position)
		{
			throw new AnalysisFailedException("CPP2IL failed to recover any usable IL for this method.");
		}

		// Token: 0x06002575 RID: 9589 RVA: 0x000020D3 File Offset: 0x000002D3
		[Token(Token = "0x6002575")]
		[Address(RVA = "0x4B7EC0", Offset = "0x4B6CC0", VA = "0x1804B7EC0")]
		private void BackwardReach(Vector3 position)
		{
			throw new AnalysisFailedException("CPP2IL failed to recover any usable IL for this method.");
		}

		// Token: 0x04002EFB RID: 12027
		[FieldOffset(Offset = "0x10")]
		[Token(Token = "0x4002EFB")]
		[Range(0f, 1f)]
		public float pin;

		// Token: 0x04002EFC RID: 12028
		[FieldOffset(Offset = "0x14")]
		[Token(Token = "0x4002EFC")]
		[Range(0f, 1f)]
		public float pull;

		// Token: 0x04002EFD RID: 12029
		[FieldOffset(Offset = "0x18")]
		[Token(Token = "0x4002EFD")]
		[Range(0f, 1f)]
		public float push;

		// Token: 0x04002EFE RID: 12030
		[FieldOffset(Offset = "0x1C")]
		[Token(Token = "0x4002EFE")]
		[Range(-1f, 1f)]
		public float pushParent;

		// Token: 0x04002EFF RID: 12031
		[FieldOffset(Offset = "0x20")]
		[Token(Token = "0x4002EFF")]
		[Range(0f, 1f)]
		public float reach;

		// Token: 0x04002F00 RID: 12032
		[FieldOffset(Offset = "0x24")]
		[Token(Token = "0x4002F00")]
		public FBIKChain.Smoothing reachSmoothing;

		// Token: 0x04002F01 RID: 12033
		[FieldOffset(Offset = "0x28")]
		[Token(Token = "0x4002F01")]
		public FBIKChain.Smoothing pushSmoothing;

		// Token: 0x04002F02 RID: 12034
		[FieldOffset(Offset = "0x30")]
		[Token(Token = "0x4002F02")]
		public IKSolver.Node[] nodes;

		// Token: 0x04002F03 RID: 12035
		[FieldOffset(Offset = "0x38")]
		[Token(Token = "0x4002F03")]
		public int[] children;

		// Token: 0x04002F04 RID: 12036
		[FieldOffset(Offset = "0x40")]
		[Token(Token = "0x4002F04")]
		public FBIKChain.ChildConstraint[] childConstraints;

		// Token: 0x04002F05 RID: 12037
		[FieldOffset(Offset = "0x48")]
		[Token(Token = "0x4002F05")]
		public IKConstraintBend bendConstraint;

		// Token: 0x04002F06 RID: 12038
		[FieldOffset(Offset = "0x50")]
		[Token(Token = "0x4002F06")]
		private float rootLength;

		// Token: 0x04002F07 RID: 12039
		[FieldOffset(Offset = "0x54")]
		[Token(Token = "0x4002F07")]
		private bool initiated;

		// Token: 0x04002F08 RID: 12040
		[FieldOffset(Offset = "0x58")]
		[Token(Token = "0x4002F08")]
		private float length;

		// Token: 0x04002F09 RID: 12041
		[FieldOffset(Offset = "0x5C")]
		[Token(Token = "0x4002F09")]
		private float distance;

		// Token: 0x04002F0A RID: 12042
		[FieldOffset(Offset = "0x60")]
		[Token(Token = "0x4002F0A")]
		private IKSolver.Point p;

		// Token: 0x04002F0B RID: 12043
		[FieldOffset(Offset = "0x68")]
		[Token(Token = "0x4002F0B")]
		private float reachForce;

		// Token: 0x04002F0C RID: 12044
		[FieldOffset(Offset = "0x6C")]
		[Token(Token = "0x4002F0C")]
		private float pullParentSum;

		// Token: 0x04002F0D RID: 12045
		[FieldOffset(Offset = "0x70")]
		[Token(Token = "0x4002F0D")]
		private float[] crossFades;

		// Token: 0x04002F0E RID: 12046
		[FieldOffset(Offset = "0x78")]
		[Token(Token = "0x4002F0E")]
		private float sqrMag1;

		// Token: 0x04002F0F RID: 12047
		[FieldOffset(Offset = "0x7C")]
		[Token(Token = "0x4002F0F")]
		private float sqrMag2;

		// Token: 0x04002F10 RID: 12048
		[FieldOffset(Offset = "0x80")]
		[Token(Token = "0x4002F10")]
		private float sqrMagDif;

		// Token: 0x04002F11 RID: 12049
		[Token(Token = "0x4002F11")]
		private const float maxLimbLength = 0.99999f;

		// Token: 0x02000418 RID: 1048
		[Token(Token = "0x2000418")]
		[Serializable]
		public class ChildConstraint
		{
			// Token: 0x1700022A RID: 554
			// (get) Token: 0x06002576 RID: 9590 RVA: 0x00054A14 File Offset: 0x00052C14
			// (set) Token: 0x06002577 RID: 9591 RVA: 0x00054A28 File Offset: 0x00052C28
			[Token(Token = "0x1700022A")]
			public float nominalDistance
			{
				[Token(Token = "0x6002576")]
				[Address(RVA = "0x5F9910", Offset = "0x5F8710", VA = "0x1805F9910")]
				get;
				[Token(Token = "0x6002577")]
				[Address(RVA = "0x5F9930", Offset = "0x5F8730", VA = "0x1805F9930")]
				private set;
			}

			// Token: 0x1700022B RID: 555
			// (get) Token: 0x06002578 RID: 9592 RVA: 0x00054A3C File Offset: 0x00052C3C
			// (set) Token: 0x06002579 RID: 9593 RVA: 0x00054A50 File Offset: 0x00052C50
			[Token(Token = "0x1700022B")]
			public bool isRigid
			{
				[Token(Token = "0x6002578")]
				[Address(RVA = "0x468150", Offset = "0x466F50", VA = "0x180468150")]
				get;
				[Token(Token = "0x6002579")]
				[Address(RVA = "0x5F9920", Offset = "0x5F8720", VA = "0x1805F9920")]
				private set;
			}

			// Token: 0x0600257A RID: 9594 RVA: 0x00054A64 File Offset: 0x00052C64
			[Token(Token = "0x600257A")]
			[Address(RVA = "0x5F98A0", Offset = "0x5F86A0", VA = "0x1805F98A0")]
			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: 0x0600257B RID: 9595 RVA: 0x00054A94 File Offset: 0x00052C94
			[Token(Token = "0x600257B")]
			[Address(RVA = "0x5F9240", Offset = "0x5F8040", VA = "0x1805F9240")]
			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: 0x0600257C RID: 9596 RVA: 0x000020D3 File Offset: 0x000002D3
			[Token(Token = "0x600257C")]
			[Address(RVA = "0x5F92A0", Offset = "0x5F80A0", VA = "0x1805F92A0")]
			public void OnPreSolve(IKSolverFullBody solver)
			{
				throw new AnalysisFailedException("CPP2IL failed to recover any usable IL for this method.");
			}

			// Token: 0x0600257D RID: 9597 RVA: 0x000020D3 File Offset: 0x000002D3
			[Token(Token = "0x600257D")]
			[Address(RVA = "0x5F94E0", Offset = "0x5F82E0", VA = "0x1805F94E0")]
			public void Solve(IKSolverFullBody solver)
			{
				throw new AnalysisFailedException("CPP2IL failed to recover any usable IL for this method.");
			}

			// Token: 0x04002F12 RID: 12050
			[FieldOffset(Offset = "0x10")]
			[Token(Token = "0x4002F12")]
			public float pushElasticity;

			// Token: 0x04002F13 RID: 12051
			[FieldOffset(Offset = "0x14")]
			[Token(Token = "0x4002F13")]
			public float pullElasticity;

			// Token: 0x04002F14 RID: 12052
			[FieldOffset(Offset = "0x18")]
			[Token(Token = "0x4002F14")]
			[SerializeField]
			private Transform bone1;

			// Token: 0x04002F15 RID: 12053
			[FieldOffset(Offset = "0x20")]
			[Token(Token = "0x4002F15")]
			[SerializeField]
			private Transform bone2;

			// Token: 0x04002F18 RID: 12056
			[FieldOffset(Offset = "0x30")]
			[Token(Token = "0x4002F18")]
			private float crossFade;

			// Token: 0x04002F19 RID: 12057
			[FieldOffset(Offset = "0x34")]
			[Token(Token = "0x4002F19")]
			private float inverseCrossFade;

			// Token: 0x04002F1A RID: 12058
			[FieldOffset(Offset = "0x38")]
			[Token(Token = "0x4002F1A")]
			private int chain1Index;

			// Token: 0x04002F1B RID: 12059
			[FieldOffset(Offset = "0x3C")]
			[Token(Token = "0x4002F1B")]
			private int chain2Index;
		}

		// Token: 0x02000419 RID: 1049
		[Token(Token = "0x2000419")]
		[Serializable]
		public enum Smoothing
		{
			// Token: 0x04002F1D RID: 12061
			[Token(Token = "0x4002F1D")]
			None,
			// Token: 0x04002F1E RID: 12062
			[Token(Token = "0x4002F1E")]
			Exponential,
			// Token: 0x04002F1F RID: 12063
			[Token(Token = "0x4002F1F")]
			Cubic
		}
	}
}
