using System;
using System.Collections.Generic;
using Cpp2IlInjected;
using UnityEngine;

namespace Obi
{
	// Token: 0x0200050E RID: 1294
	[Token(Token = "0x200050E")]
	[DisallowMultipleComponent]
	public class ObiBendingConstraints : ObiBatchedConstraints
	{
		// Token: 0x06002D9A RID: 11674 RVA: 0x000643CC File Offset: 0x000625CC
		[Token(Token = "0x6002D9A")]
		[Address(RVA = "0x5474F0", Offset = "0x5464F0", VA = "0x1805474F0", Slot = "8")]
		public override Oni.ConstraintType GetConstraintType()
		{
			return Oni.ConstraintType.Bending;
		}

		// Token: 0x06002D9B RID: 11675 RVA: 0x000020D3 File Offset: 0x000002D3
		[Token(Token = "0x6002D9B")]
		[Address(RVA = "0x1091BD0", Offset = "0x1090BD0", VA = "0x181091BD0", Slot = "9")]
		public override List<ObiConstraintBatch> GetBatches()
		{
			throw new AnalysisFailedException("CPP2IL failed to recover any usable IL for this method.");
		}

		// Token: 0x06002D9C RID: 11676 RVA: 0x000643DC File Offset: 0x000625DC
		[Token(Token = "0x6002D9C")]
		[Address(RVA = "0x1091B70", Offset = "0x1090B70", VA = "0x181091B70", Slot = "10")]
		public override void Clear()
		{
			int num = 0;
			bool flag = base.RemoveFromSolver(num);
			this.batches.Clear();
		}

		// Token: 0x06002D9D RID: 11677 RVA: 0x00064404 File Offset: 0x00062604
		[Token(Token = "0x6002D9D")]
		[Address(RVA = "0x1091AD0", Offset = "0x1090AD0", VA = "0x181091AD0")]
		public void AddBatch(ObiBendConstraintBatch batch)
		{
			if (batch != 0)
			{
				int constraintType = (int)batch.GetConstraintType();
				Oni.ConstraintType constraintType2 = this.GetConstraintType();
				if (constraintType == (int)constraintType2)
				{
					this.batches.Add(batch);
				}
			}
		}

		// Token: 0x06002D9E RID: 11678 RVA: 0x0006443C File Offset: 0x0006263C
		[Token(Token = "0x6002D9E")]
		[Address(RVA = "0x1092060", Offset = "0x1091060", VA = "0x181092060")]
		public void RemoveBatch(ObiBendConstraintBatch batch)
		{
			bool flag = this.batches.Remove(batch);
		}

		// Token: 0x06002D9F RID: 11679 RVA: 0x000020D3 File Offset: 0x000002D3
		[Token(Token = "0x6002D9F")]
		[Address(RVA = "0x1091D00", Offset = "0x1090D00", VA = "0x181091D00")]
		public void OnDrawGizmosSelected()
		{
			throw new AnalysisFailedException("CPP2IL failed to recover any usable IL for this method.");
		}

		// Token: 0x06002DA0 RID: 11680 RVA: 0x0006445C File Offset: 0x0006265C
		[Token(Token = "0x6002DA0")]
		[Address(RVA = "0x10920C0", Offset = "0x10910C0", VA = "0x1810920C0")]
		public ObiBendingConstraints()
		{
			List<ObiBendConstraintBatch> list = new List();
			this.batches = list;
			base..ctor();
		}

		// Token: 0x0400365F RID: 13919
		[FieldOffset(Offset = "0x30")]
		[Token(Token = "0x400365F")]
		[Tooltip("Bending offset. Leave at zero to keep the original bending amount.")]
		public float maxBending;

		// Token: 0x04003660 RID: 13920
		[FieldOffset(Offset = "0x34")]
		[Token(Token = "0x4003660")]
		[Range(0f, 1f)]
		[Tooltip("Cloth resistance to bending. Higher values will yield more stiff cloth.")]
		public float stiffness = 1f;

		// Token: 0x04003661 RID: 13921
		[FieldOffset(Offset = "0x38")]
		[Token(Token = "0x4003661")]
		[HideInInspector]
		[SerializeField]
		private List<ObiBendConstraintBatch> batches;
	}
}
