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

namespace Obi
{
	// Token: 0x02000518 RID: 1304
	[Token(Token = "0x2000518")]
	[DisallowMultipleComponent]
	public class ObiVolumeConstraints : ObiBatchedConstraints
	{
		// Token: 0x06002DCC RID: 11724 RVA: 0x0006485C File Offset: 0x00062A5C
		[Token(Token = "0x6002DCC")]
		[Address(RVA = "0x547500", Offset = "0x546500", VA = "0x180547500", Slot = "8")]
		public override Oni.ConstraintType GetConstraintType()
		{
			return Oni.ConstraintType.Volume;
		}

		// Token: 0x06002DCD RID: 11725 RVA: 0x000020D3 File Offset: 0x000002D3
		[Token(Token = "0x6002DCD")]
		[Address(RVA = "0xE68090", Offset = "0xE67090", VA = "0x180E68090", Slot = "9")]
		public override List<ObiConstraintBatch> GetBatches()
		{
			throw new AnalysisFailedException("CPP2IL failed to recover any usable IL for this method.");
		}

		// Token: 0x06002DCE RID: 11726 RVA: 0x0006486C File Offset: 0x00062A6C
		[Token(Token = "0x6002DCE")]
		[Address(RVA = "0xE68030", Offset = "0xE67030", VA = "0x180E68030", Slot = "10")]
		public override void Clear()
		{
			int num = 0;
			bool flag = base.RemoveFromSolver(num);
			this.batches.Clear();
		}

		// Token: 0x06002DCF RID: 11727 RVA: 0x00064894 File Offset: 0x00062A94
		[Token(Token = "0x6002DCF")]
		[Address(RVA = "0xE67F90", Offset = "0xE66F90", VA = "0x180E67F90")]
		public void AddBatch(ObiVolumeConstraintBatch batch)
		{
			if (batch != 0)
			{
				int constraintType = (int)batch.GetConstraintType();
				Oni.ConstraintType constraintType2 = this.GetConstraintType();
				if (constraintType == (int)constraintType2)
				{
					this.batches.Add(batch);
				}
			}
		}

		// Token: 0x06002DD0 RID: 11728 RVA: 0x000648CC File Offset: 0x00062ACC
		[Token(Token = "0x6002DD0")]
		[Address(RVA = "0xE68640", Offset = "0xE67640", VA = "0x180E68640")]
		public void RemoveBatch(ObiVolumeConstraintBatch batch)
		{
			bool flag = this.batches.Remove(batch);
		}

		// Token: 0x06002DD1 RID: 11729 RVA: 0x000020D3 File Offset: 0x000002D3
		[Token(Token = "0x6002DD1")]
		[Address(RVA = "0xE681C0", Offset = "0xE671C0", VA = "0x180E681C0")]
		public void OnDrawGizmosSelected()
		{
			throw new AnalysisFailedException("CPP2IL failed to recover any usable IL for this method.");
		}

		// Token: 0x06002DD2 RID: 11730 RVA: 0x000648EC File Offset: 0x00062AEC
		[Token(Token = "0x6002DD2")]
		[Address(RVA = "0xE686A0", Offset = "0xE676A0", VA = "0x180E686A0")]
		public ObiVolumeConstraints()
		{
			List<ObiVolumeConstraintBatch> list = new List();
			this.batches = list;
			base..ctor();
		}

		// Token: 0x04003677 RID: 13943
		[FieldOffset(Offset = "0x30")]
		[Token(Token = "0x4003677")]
		[Tooltip("Amount of pressure applied to the cloth.")]
		public float overpressure = 1f;

		// Token: 0x04003678 RID: 13944
		[FieldOffset(Offset = "0x34")]
		[Token(Token = "0x4003678")]
		[Range(0f, 1f)]
		[Tooltip("Stiffness of the volume constraints. Higher values will make the constraints to try harder to enforce the set volume.")]
		public float stiffness = 1f;

		// Token: 0x04003679 RID: 13945
		[FieldOffset(Offset = "0x38")]
		[Token(Token = "0x4003679")]
		[HideInInspector]
		[SerializeField]
		private List<ObiVolumeConstraintBatch> batches;
	}
}
