using System;
using Cpp2IlInjected;
using UnityEngine;

namespace RootMotion.FinalIK
{
	// Token: 0x02000472 RID: 1138
	[Token(Token = "0x2000472")]
	[Serializable]
	public class IKConstraintBend
	{
		// Token: 0x06002847 RID: 10311 RVA: 0x000020D3 File Offset: 0x000002D3
		[Token(Token = "0x6002847")]
		[Address(RVA = "0x1706330", Offset = "0x1705330", VA = "0x181706330")]
		public bool IsValid(IKSolverFullBody solver, Warning.Logger logger)
		{
			throw new AnalysisFailedException("CPP2IL failed to recover any usable IL for this method.");
		}

		// Token: 0x17000251 RID: 593
		// (get) Token: 0x06002848 RID: 10312 RVA: 0x0005BE38 File Offset: 0x0005A038
		// (set) Token: 0x06002849 RID: 10313 RVA: 0x0005BE4C File Offset: 0x0005A04C
		[Token(Token = "0x17000251")]
		public bool initiated
		{
			[Token(Token = "0x6002848")]
			[Address(RVA = "0x41C7C0", Offset = "0x41B7C0", VA = "0x18041C7C0")]
			get;
			[Token(Token = "0x6002849")]
			[Address(RVA = "0x77DB70", Offset = "0x77CB70", VA = "0x18077DB70")]
			private set;
		}

		// Token: 0x0600284A RID: 10314 RVA: 0x0005BE60 File Offset: 0x0005A060
		[Token(Token = "0x600284A")]
		[Address(RVA = "0x1706F40", Offset = "0x1705F40", VA = "0x181706F40")]
		public IKConstraintBend()
		{
			float z = Vector3.right.z;
			this.direction.z = z;
			this.clampF = 0.505f;
			base..ctor();
		}

		// Token: 0x0600284B RID: 10315 RVA: 0x0005BE98 File Offset: 0x0005A098
		[Token(Token = "0x600284B")]
		[Address(RVA = "0x1706F80", Offset = "0x1705F80", VA = "0x181706F80")]
		public IKConstraintBend(Transform bone1, Transform bone2, Transform bone3)
		{
			/*
An exception occurred when decompiling this method (0600284B)

ICSharpCode.Decompiler.DecompilerException: Error decompiling System.Void RootMotion.FinalIK.IKConstraintBend::.ctor(UnityEngine.Transform,UnityEngine.Transform,UnityEngine.Transform)

 ---> System.Exception: Basic block has to end with unconditional control flow. 
{; 	Block_0:; 	stloc:float32(var_0_0A, ldfld:float32(Vector3::z, callgetter:Vector3[exp:valuetype [UnityEngine.CoreModule]UnityEngine.Vector3&](Vector3::get_right))); 	stfld:float32(Vector3::z, ldfld:Vector3[exp:valuetype [UnityEngine.CoreModule]UnityEngine.Vector3&](IKConstraintBend::direction, ldloc:IKConstraintBend(this)), ldloc:float32(var_0_0A)); 	stfld:float32(IKConstraintBend::clampF, ldloc:IKConstraintBend(this), ldc.r4:float32(0.505)); 	call:void(object::.ctor, ldloc:IKConstraintBend[exp:object](this)); 	stfld:Transform(IKConstraintBend::bone1, ldloc:IKConstraintBend(this), ldloc:Transform(bone1)); 	stfld:Transform(IKConstraintBend::bone2, ldloc:IKConstraintBend(this), ldloc:Transform(bone2)); 	stfld:Transform(IKConstraintBend::bone3, ldloc:IKConstraintBend(this), ldloc:Transform(bone3)); }; 
   at ICSharpCode.Decompiler.ILAst.ILAstOptimizer.FlattenBasicBlocks(ILNode node) in D:\a\dnSpy\dnSpy\Extensions\ILSpy.Decompiler\ICSharpCode.Decompiler\ICSharpCode.Decompiler\ILAst\ILAstOptimizer.cs:line 1810
   at ICSharpCode.Decompiler.ILAst.ILAstOptimizer.Optimize(DecompilerContext context, ILBlock method, AutoPropertyProvider autoPropertyProvider, StateMachineKind& stateMachineKind, MethodDef& inlinedMethod, AsyncMethodDebugInfo& asyncInfo, ILAstOptimizationStep abortBeforeStep) in D:\a\dnSpy\dnSpy\Extensions\ILSpy.Decompiler\ICSharpCode.Decompiler\ICSharpCode.Decompiler\ILAst\ILAstOptimizer.cs:line 344
   at ICSharpCode.Decompiler.Ast.AstMethodBodyBuilder.CreateMethodBody(IEnumerable`1 parameters, MethodDebugInfoBuilder& builder) in D:\a\dnSpy\dnSpy\Extensions\ILSpy.Decompiler\ICSharpCode.Decompiler\ICSharpCode.Decompiler\Ast\AstMethodBodyBuilder.cs:line 123
   at ICSharpCode.Decompiler.Ast.AstMethodBodyBuilder.CreateMethodBody(MethodDef methodDef, DecompilerContext context, AutoPropertyProvider autoPropertyProvider, IEnumerable`1 parameters, Boolean valueParameterIsKeyword, StringBuilder sb, MethodDebugInfoBuilder& stmtsBuilder) in D:\a\dnSpy\dnSpy\Extensions\ILSpy.Decompiler\ICSharpCode.Decompiler\ICSharpCode.Decompiler\Ast\AstMethodBodyBuilder.cs:line 88
   --- End of inner exception stack trace ---
   at ICSharpCode.Decompiler.Ast.AstMethodBodyBuilder.CreateMethodBody(MethodDef methodDef, DecompilerContext context, AutoPropertyProvider autoPropertyProvider, IEnumerable`1 parameters, Boolean valueParameterIsKeyword, StringBuilder sb, MethodDebugInfoBuilder& stmtsBuilder) in D:\a\dnSpy\dnSpy\Extensions\ILSpy.Decompiler\ICSharpCode.Decompiler\ICSharpCode.Decompiler\Ast\AstMethodBodyBuilder.cs:line 92
   at ICSharpCode.Decompiler.Ast.AstBuilder.AddMethodBody(EntityDeclaration methodNode, EntityDeclaration& updatedNode, MethodDef method, IEnumerable`1 parameters, Boolean valueParameterIsKeyword, MethodKind methodKind) in D:\a\dnSpy\dnSpy\Extensions\ILSpy.Decompiler\ICSharpCode.Decompiler\ICSharpCode.Decompiler\Ast\AstBuilder.cs:line 1618
*/;
		}

		// Token: 0x0600284C RID: 10316 RVA: 0x0005BEE4 File Offset: 0x0005A0E4
		[Token(Token = "0x600284C")]
		[Address(RVA = "0x1706CD0", Offset = "0x1705CD0", VA = "0x181706CD0")]
		public void SetBones(Transform bone1, Transform bone2, Transform bone3)
		{
			/*
An exception occurred when decompiling this method (0600284C)

ICSharpCode.Decompiler.DecompilerException: Error decompiling System.Void RootMotion.FinalIK.IKConstraintBend::SetBones(UnityEngine.Transform,UnityEngine.Transform,UnityEngine.Transform)

 ---> System.Exception: Basic block has to end with unconditional control flow. 
{; 	Block_0:; 	stfld:Transform(IKConstraintBend::bone1, ldloc:IKConstraintBend(this), ldloc:Transform(bone1)); 	stfld:Transform(IKConstraintBend::bone2, ldloc:IKConstraintBend(this), ldloc:Transform(bone2)); 	stfld:Transform(IKConstraintBend::bone3, ldloc:IKConstraintBend(this), ldloc:Transform(bone3)); }; 
   at ICSharpCode.Decompiler.ILAst.ILAstOptimizer.FlattenBasicBlocks(ILNode node) in D:\a\dnSpy\dnSpy\Extensions\ILSpy.Decompiler\ICSharpCode.Decompiler\ICSharpCode.Decompiler\ILAst\ILAstOptimizer.cs:line 1810
   at ICSharpCode.Decompiler.ILAst.ILAstOptimizer.Optimize(DecompilerContext context, ILBlock method, AutoPropertyProvider autoPropertyProvider, StateMachineKind& stateMachineKind, MethodDef& inlinedMethod, AsyncMethodDebugInfo& asyncInfo, ILAstOptimizationStep abortBeforeStep) in D:\a\dnSpy\dnSpy\Extensions\ILSpy.Decompiler\ICSharpCode.Decompiler\ICSharpCode.Decompiler\ILAst\ILAstOptimizer.cs:line 344
   at ICSharpCode.Decompiler.Ast.AstMethodBodyBuilder.CreateMethodBody(IEnumerable`1 parameters, MethodDebugInfoBuilder& builder) in D:\a\dnSpy\dnSpy\Extensions\ILSpy.Decompiler\ICSharpCode.Decompiler\ICSharpCode.Decompiler\Ast\AstMethodBodyBuilder.cs:line 123
   at ICSharpCode.Decompiler.Ast.AstMethodBodyBuilder.CreateMethodBody(MethodDef methodDef, DecompilerContext context, AutoPropertyProvider autoPropertyProvider, IEnumerable`1 parameters, Boolean valueParameterIsKeyword, StringBuilder sb, MethodDebugInfoBuilder& stmtsBuilder) in D:\a\dnSpy\dnSpy\Extensions\ILSpy.Decompiler\ICSharpCode.Decompiler\ICSharpCode.Decompiler\Ast\AstMethodBodyBuilder.cs:line 88
   --- End of inner exception stack trace ---
   at ICSharpCode.Decompiler.Ast.AstMethodBodyBuilder.CreateMethodBody(MethodDef methodDef, DecompilerContext context, AutoPropertyProvider autoPropertyProvider, IEnumerable`1 parameters, Boolean valueParameterIsKeyword, StringBuilder sb, MethodDebugInfoBuilder& stmtsBuilder) in D:\a\dnSpy\dnSpy\Extensions\ILSpy.Decompiler\ICSharpCode.Decompiler\ICSharpCode.Decompiler\Ast\AstMethodBodyBuilder.cs:line 92
   at ICSharpCode.Decompiler.Ast.AstBuilder.AddMethodBody(EntityDeclaration methodNode, EntityDeclaration& updatedNode, MethodDef method, IEnumerable`1 parameters, Boolean valueParameterIsKeyword, MethodKind methodKind) in D:\a\dnSpy\dnSpy\Extensions\ILSpy.Decompiler\ICSharpCode.Decompiler\ICSharpCode.Decompiler\Ast\AstBuilder.cs:line 1618
*/;
		}

		// Token: 0x0600284D RID: 10317 RVA: 0x000020D3 File Offset: 0x000002D3
		[Token(Token = "0x600284D")]
		[Address(RVA = "0x1705EA0", Offset = "0x1704EA0", VA = "0x181705EA0")]
		public void Initiate(IKSolverFullBody solver)
		{
			throw new AnalysisFailedException("CPP2IL failed to recover any usable IL for this method.");
		}

		// Token: 0x0600284E RID: 10318 RVA: 0x000020D3 File Offset: 0x000002D3
		[Token(Token = "0x600284E")]
		[Address(RVA = "0x1706D30", Offset = "0x1705D30", VA = "0x181706D30")]
		public void SetLimbOrientation(Vector3 upper, Vector3 lower, Vector3 last)
		{
			throw new AnalysisFailedException("CPP2IL failed to recover any usable IL for this method.");
		}

		// Token: 0x0600284F RID: 10319 RVA: 0x000020D3 File Offset: 0x000002D3
		[Token(Token = "0x600284F")]
		[Address(RVA = "0x1706580", Offset = "0x1705580", VA = "0x181706580")]
		public void LimitBend(float solverWeight, float positionWeight)
		{
			throw new AnalysisFailedException("CPP2IL failed to recover any usable IL for this method.");
		}

		// Token: 0x06002850 RID: 10320 RVA: 0x000020D3 File Offset: 0x000002D3
		[Token(Token = "0x6002850")]
		[Address(RVA = "0x17056B0", Offset = "0x17046B0", VA = "0x1817056B0")]
		public Vector3 GetDir(IKSolverFullBody solver)
		{
			throw new AnalysisFailedException("CPP2IL failed to recover any usable IL for this method.");
		}

		// Token: 0x06002851 RID: 10321 RVA: 0x000020D3 File Offset: 0x000002D3
		[Token(Token = "0x6002851")]
		[Address(RVA = "0x1706BD0", Offset = "0x1705BD0", VA = "0x181706BD0")]
		private Vector3 OrthoToLimb(IKSolverFullBody solver, Vector3 tangent)
		{
			throw new AnalysisFailedException("CPP2IL failed to recover any usable IL for this method.");
		}

		// Token: 0x06002852 RID: 10322 RVA: 0x000020D3 File Offset: 0x000002D3
		[Token(Token = "0x6002852")]
		[Address(RVA = "0x1706AE0", Offset = "0x1705AE0", VA = "0x181706AE0")]
		private Vector3 OrthoToBone1(IKSolverFullBody solver, Vector3 tangent)
		{
			throw new AnalysisFailedException("CPP2IL failed to recover any usable IL for this method.");
		}

		// Token: 0x0400320A RID: 12810
		[FieldOffset(Offset = "0x10")]
		[Token(Token = "0x400320A")]
		public Transform bone1;

		// Token: 0x0400320B RID: 12811
		[FieldOffset(Offset = "0x18")]
		[Token(Token = "0x400320B")]
		public Transform bone2;

		// Token: 0x0400320C RID: 12812
		[FieldOffset(Offset = "0x20")]
		[Token(Token = "0x400320C")]
		public Transform bone3;

		// Token: 0x0400320D RID: 12813
		[FieldOffset(Offset = "0x28")]
		[Token(Token = "0x400320D")]
		public Transform bendGoal;

		// Token: 0x0400320E RID: 12814
		[FieldOffset(Offset = "0x30")]
		[Token(Token = "0x400320E")]
		public Vector3 direction;

		// Token: 0x0400320F RID: 12815
		[FieldOffset(Offset = "0x3C")]
		[Token(Token = "0x400320F")]
		public Quaternion rotationOffset;

		// Token: 0x04003210 RID: 12816
		[FieldOffset(Offset = "0x4C")]
		[Token(Token = "0x4003210")]
		[Range(0f, 1f)]
		public float weight;

		// Token: 0x04003211 RID: 12817
		[FieldOffset(Offset = "0x50")]
		[Token(Token = "0x4003211")]
		public Vector3 defaultLocalDirection;

		// Token: 0x04003212 RID: 12818
		[FieldOffset(Offset = "0x5C")]
		[Token(Token = "0x4003212")]
		public Vector3 defaultChildDirection;

		// Token: 0x04003213 RID: 12819
		[FieldOffset(Offset = "0x68")]
		[Token(Token = "0x4003213")]
		[NonSerialized]
		public float clampF;

		// Token: 0x04003214 RID: 12820
		[FieldOffset(Offset = "0x6C")]
		[Token(Token = "0x4003214")]
		private int chainIndex1;

		// Token: 0x04003215 RID: 12821
		[FieldOffset(Offset = "0x70")]
		[Token(Token = "0x4003215")]
		private int nodeIndex1;

		// Token: 0x04003216 RID: 12822
		[FieldOffset(Offset = "0x74")]
		[Token(Token = "0x4003216")]
		private int chainIndex2;

		// Token: 0x04003217 RID: 12823
		[FieldOffset(Offset = "0x78")]
		[Token(Token = "0x4003217")]
		private int nodeIndex2;

		// Token: 0x04003218 RID: 12824
		[FieldOffset(Offset = "0x7C")]
		[Token(Token = "0x4003218")]
		private int chainIndex3;

		// Token: 0x04003219 RID: 12825
		[FieldOffset(Offset = "0x80")]
		[Token(Token = "0x4003219")]
		private int nodeIndex3;
	}
}
