using System;
using Cpp2IlInjected;
using UnityEngine;

namespace RootMotion.FinalIK
{
	// Token: 0x0200041A RID: 1050
	[Token(Token = "0x200041A")]
	[Serializable]
	public class IKConstraintBend
	{
		// Token: 0x0600257E RID: 9598 RVA: 0x000020D3 File Offset: 0x000002D3
		[Token(Token = "0x600257E")]
		[Address(RVA = "0x117FC60", Offset = "0x117EA60", VA = "0x18117FC60")]
		public bool IsValid(IKSolverFullBody solver, Warning.Logger logger)
		{
			throw new AnalysisFailedException("CPP2IL failed to recover any usable IL for this method.");
		}

		// Token: 0x1700022C RID: 556
		// (get) Token: 0x0600257F RID: 9599 RVA: 0x00054ADC File Offset: 0x00052CDC
		// (set) Token: 0x06002580 RID: 9600 RVA: 0x00054AF0 File Offset: 0x00052CF0
		[Token(Token = "0x1700022C")]
		public bool initiated
		{
			[Token(Token = "0x600257F")]
			[Address(RVA = "0x3F9A10", Offset = "0x3F8810", VA = "0x1803F9A10")]
			get;
			[Token(Token = "0x6002580")]
			[Address(RVA = "0x709E30", Offset = "0x708C30", VA = "0x180709E30")]
			private set;
		}

		// Token: 0x06002581 RID: 9601 RVA: 0x00054B04 File Offset: 0x00052D04
		[Token(Token = "0x6002581")]
		[Address(RVA = "0x1180870", Offset = "0x117F670", VA = "0x181180870")]
		public IKConstraintBend()
		{
			float z = Vector3.right.z;
			this.direction.z = z;
			this.clampF = 0.505f;
			base..ctor();
		}

		// Token: 0x06002582 RID: 9602 RVA: 0x00054B3C File Offset: 0x00052D3C
		[Token(Token = "0x6002582")]
		[Address(RVA = "0x11808B0", Offset = "0x117F6B0", VA = "0x1811808B0")]
		public IKConstraintBend(Transform bone1, Transform bone2, Transform bone3)
		{
			/*
An exception occurred when decompiling this method (06002582)

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: 0x06002583 RID: 9603 RVA: 0x00054B88 File Offset: 0x00052D88
		[Token(Token = "0x6002583")]
		[Address(RVA = "0x1180600", Offset = "0x117F400", VA = "0x181180600")]
		public void SetBones(Transform bone1, Transform bone2, Transform bone3)
		{
			/*
An exception occurred when decompiling this method (06002583)

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: 0x06002584 RID: 9604 RVA: 0x000020D3 File Offset: 0x000002D3
		[Token(Token = "0x6002584")]
		[Address(RVA = "0x117F7D0", Offset = "0x117E5D0", VA = "0x18117F7D0")]
		public void Initiate(IKSolverFullBody solver)
		{
			throw new AnalysisFailedException("CPP2IL failed to recover any usable IL for this method.");
		}

		// Token: 0x06002585 RID: 9605 RVA: 0x000020D3 File Offset: 0x000002D3
		[Token(Token = "0x6002585")]
		[Address(RVA = "0x1180660", Offset = "0x117F460", VA = "0x181180660")]
		public void SetLimbOrientation(Vector3 upper, Vector3 lower, Vector3 last)
		{
			throw new AnalysisFailedException("CPP2IL failed to recover any usable IL for this method.");
		}

		// Token: 0x06002586 RID: 9606 RVA: 0x000020D3 File Offset: 0x000002D3
		[Token(Token = "0x6002586")]
		[Address(RVA = "0x117FEB0", Offset = "0x117ECB0", VA = "0x18117FEB0")]
		public void LimitBend(float solverWeight, float positionWeight)
		{
			throw new AnalysisFailedException("CPP2IL failed to recover any usable IL for this method.");
		}

		// Token: 0x06002587 RID: 9607 RVA: 0x000020D3 File Offset: 0x000002D3
		[Token(Token = "0x6002587")]
		[Address(RVA = "0x117EFE0", Offset = "0x117DDE0", VA = "0x18117EFE0")]
		public Vector3 GetDir(IKSolverFullBody solver)
		{
			throw new AnalysisFailedException("CPP2IL failed to recover any usable IL for this method.");
		}

		// Token: 0x06002588 RID: 9608 RVA: 0x000020D3 File Offset: 0x000002D3
		[Token(Token = "0x6002588")]
		[Address(RVA = "0x1180500", Offset = "0x117F300", VA = "0x181180500")]
		private Vector3 OrthoToLimb(IKSolverFullBody solver, Vector3 tangent)
		{
			throw new AnalysisFailedException("CPP2IL failed to recover any usable IL for this method.");
		}

		// Token: 0x06002589 RID: 9609 RVA: 0x000020D3 File Offset: 0x000002D3
		[Token(Token = "0x6002589")]
		[Address(RVA = "0x1180410", Offset = "0x117F210", VA = "0x181180410")]
		private Vector3 OrthoToBone1(IKSolverFullBody solver, Vector3 tangent)
		{
			throw new AnalysisFailedException("CPP2IL failed to recover any usable IL for this method.");
		}

		// Token: 0x04002F20 RID: 12064
		[FieldOffset(Offset = "0x10")]
		[Token(Token = "0x4002F20")]
		public Transform bone1;

		// Token: 0x04002F21 RID: 12065
		[FieldOffset(Offset = "0x18")]
		[Token(Token = "0x4002F21")]
		public Transform bone2;

		// Token: 0x04002F22 RID: 12066
		[FieldOffset(Offset = "0x20")]
		[Token(Token = "0x4002F22")]
		public Transform bone3;

		// Token: 0x04002F23 RID: 12067
		[FieldOffset(Offset = "0x28")]
		[Token(Token = "0x4002F23")]
		public Transform bendGoal;

		// Token: 0x04002F24 RID: 12068
		[FieldOffset(Offset = "0x30")]
		[Token(Token = "0x4002F24")]
		public Vector3 direction;

		// Token: 0x04002F25 RID: 12069
		[FieldOffset(Offset = "0x3C")]
		[Token(Token = "0x4002F25")]
		public Quaternion rotationOffset;

		// Token: 0x04002F26 RID: 12070
		[FieldOffset(Offset = "0x4C")]
		[Token(Token = "0x4002F26")]
		[Range(0f, 1f)]
		public float weight;

		// Token: 0x04002F27 RID: 12071
		[FieldOffset(Offset = "0x50")]
		[Token(Token = "0x4002F27")]
		public Vector3 defaultLocalDirection;

		// Token: 0x04002F28 RID: 12072
		[FieldOffset(Offset = "0x5C")]
		[Token(Token = "0x4002F28")]
		public Vector3 defaultChildDirection;

		// Token: 0x04002F29 RID: 12073
		[FieldOffset(Offset = "0x68")]
		[Token(Token = "0x4002F29")]
		[NonSerialized]
		public float clampF;

		// Token: 0x04002F2A RID: 12074
		[FieldOffset(Offset = "0x6C")]
		[Token(Token = "0x4002F2A")]
		private int chainIndex1;

		// Token: 0x04002F2B RID: 12075
		[FieldOffset(Offset = "0x70")]
		[Token(Token = "0x4002F2B")]
		private int nodeIndex1;

		// Token: 0x04002F2C RID: 12076
		[FieldOffset(Offset = "0x74")]
		[Token(Token = "0x4002F2C")]
		private int chainIndex2;

		// Token: 0x04002F2D RID: 12077
		[FieldOffset(Offset = "0x78")]
		[Token(Token = "0x4002F2D")]
		private int nodeIndex2;

		// Token: 0x04002F2E RID: 12078
		[FieldOffset(Offset = "0x7C")]
		[Token(Token = "0x4002F2E")]
		private int chainIndex3;

		// Token: 0x04002F2F RID: 12079
		[FieldOffset(Offset = "0x80")]
		[Token(Token = "0x4002F2F")]
		private int nodeIndex3;
	}
}
