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

namespace Obi
{
	// Token: 0x020004B6 RID: 1206
	[Token(Token = "0x20004B6")]
	[DisallowMultipleComponent]
	public class ObiBendingConstraints : ObiBatchedConstraints
	{
		// Token: 0x06002AD1 RID: 10961 RVA: 0x0005D0CC File Offset: 0x0005B2CC
		[Token(Token = "0x6002AD1")]
		[Address(RVA = "0x51C1D0", Offset = "0x51AFD0", VA = "0x18051C1D0", Slot = "8")]
		public override Oni.ConstraintType GetConstraintType()
		{
			return Oni.ConstraintType.Bending;
		}

		// Token: 0x06002AD2 RID: 10962 RVA: 0x000020D3 File Offset: 0x000002D3
		[Token(Token = "0x6002AD2")]
		[Address(RVA = "0xFFE8A0", Offset = "0xFFD6A0", VA = "0x180FFE8A0", Slot = "9")]
		public override List<ObiConstraintBatch> GetBatches()
		{
			throw new AnalysisFailedException("CPP2IL failed to recover any usable IL for this method.");
		}

		// Token: 0x06002AD3 RID: 10963 RVA: 0x0005D0DC File Offset: 0x0005B2DC
		[Token(Token = "0x6002AD3")]
		[Address(RVA = "0xFFE840", Offset = "0xFFD640", VA = "0x180FFE840", Slot = "10")]
		public override void Clear()
		{
			int num = 0;
			bool flag = base.RemoveFromSolver(num);
			this.batches.Clear();
		}

		// Token: 0x06002AD4 RID: 10964 RVA: 0x0005D104 File Offset: 0x0005B304
		[Token(Token = "0x6002AD4")]
		[Address(RVA = "0xFFE7A0", Offset = "0xFFD5A0", VA = "0x180FFE7A0")]
		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: 0x06002AD5 RID: 10965 RVA: 0x0005D13C File Offset: 0x0005B33C
		[Token(Token = "0x6002AD5")]
		[Address(RVA = "0xFFED30", Offset = "0xFFDB30", VA = "0x180FFED30")]
		public void RemoveBatch(ObiBendConstraintBatch batch)
		{
			bool flag = this.batches.Remove(batch);
		}

		// Token: 0x06002AD6 RID: 10966 RVA: 0x000020D3 File Offset: 0x000002D3
		[Token(Token = "0x6002AD6")]
		[Address(RVA = "0xFFE9D0", Offset = "0xFFD7D0", VA = "0x180FFE9D0")]
		public void OnDrawGizmosSelected()
		{
			throw new AnalysisFailedException("CPP2IL failed to recover any usable IL for this method.");
		}

		// Token: 0x06002AD7 RID: 10967 RVA: 0x0005D15C File Offset: 0x0005B35C
		[Token(Token = "0x6002AD7")]
		[Address(RVA = "0xFFED90", Offset = "0xFFDB90", VA = "0x180FFED90")]
		public ObiBendingConstraints()
		{
			List<ObiBendConstraintBatch> list = new List();
			this.batches = list;
			base..ctor();
		}

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

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

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