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

namespace Obi
{
	// Token: 0x02000510 RID: 1296
	[Token(Token = "0x2000510")]
	[DisallowMultipleComponent]
	public class ObiDistanceConstraints : ObiBatchedConstraints
	{
		// Token: 0x06002DA4 RID: 11684 RVA: 0x000644B4 File Offset: 0x000626B4
		[Token(Token = "0x6002DA4")]
		[Address(RVA = "0x547930", Offset = "0x546930", VA = "0x180547930", Slot = "8")]
		public override Oni.ConstraintType GetConstraintType()
		{
			return Oni.ConstraintType.Distance;
		}

		// Token: 0x06002DA5 RID: 11685 RVA: 0x000020D3 File Offset: 0x000002D3
		[Token(Token = "0x6002DA5")]
		[Address(RVA = "0x10A1920", Offset = "0x10A0920", VA = "0x1810A1920", Slot = "9")]
		public override List<ObiConstraintBatch> GetBatches()
		{
			throw new AnalysisFailedException("CPP2IL failed to recover any usable IL for this method.");
		}

		// Token: 0x06002DA6 RID: 11686 RVA: 0x000644C4 File Offset: 0x000626C4
		[Token(Token = "0x6002DA6")]
		[Address(RVA = "0x10A18C0", Offset = "0x10A08C0", VA = "0x1810A18C0", Slot = "10")]
		public override void Clear()
		{
			int num = 0;
			bool flag = base.RemoveFromSolver(num);
			this.batches.Clear();
		}

		// Token: 0x06002DA7 RID: 11687 RVA: 0x000644EC File Offset: 0x000626EC
		[Token(Token = "0x6002DA7")]
		[Address(RVA = "0x10A1820", Offset = "0x10A0820", VA = "0x1810A1820")]
		public void AddBatch(ObiDistanceConstraintBatch batch)
		{
			if (batch != 0)
			{
				int constraintType = (int)batch.GetConstraintType();
				Oni.ConstraintType constraintType2 = this.GetConstraintType();
				if (constraintType == (int)constraintType2)
				{
					this.batches.Add(batch);
				}
			}
		}

		// Token: 0x06002DA8 RID: 11688 RVA: 0x00064524 File Offset: 0x00062724
		[Token(Token = "0x6002DA8")]
		[Address(RVA = "0x10A1D90", Offset = "0x10A0D90", VA = "0x1810A1D90")]
		public void RemoveBatch(ObiDistanceConstraintBatch batch)
		{
			bool flag = this.batches.Remove(batch);
		}

		// Token: 0x06002DA9 RID: 11689 RVA: 0x000020D3 File Offset: 0x000002D3
		[Token(Token = "0x6002DA9")]
		[Address(RVA = "0x10A1A50", Offset = "0x10A0A50", VA = "0x1810A1A50")]
		public void OnDrawGizmosSelected()
		{
			throw new AnalysisFailedException("CPP2IL failed to recover any usable IL for this method.");
		}

		// Token: 0x06002DAA RID: 11690 RVA: 0x00064544 File Offset: 0x00062744
		[Token(Token = "0x6002DAA")]
		[Address(RVA = "0x10A1DF0", Offset = "0x10A0DF0", VA = "0x1810A1DF0")]
		public ObiDistanceConstraints()
		{
			List<ObiDistanceConstraintBatch> list = new List();
			this.batches = list;
			base..ctor();
		}

		// Token: 0x04003664 RID: 13924
		[FieldOffset(Offset = "0x30")]
		[Token(Token = "0x4003664")]
		[Tooltip("Scale of stretching constraints. Values > 1 will expand initial cloth size, values < 1 will make it shrink.")]
		public float stretchingScale = 1f;

		// Token: 0x04003665 RID: 13925
		[FieldOffset(Offset = "0x34")]
		[Token(Token = "0x4003665")]
		[Range(0f, 1f)]
		[Tooltip("Cloth resistance to stretching. Lower values will yield more elastic cloth.")]
		public float stiffness = 1f;

		// Token: 0x04003666 RID: 13926
		[FieldOffset(Offset = "0x38")]
		[Token(Token = "0x4003666")]
		[Range(0f, 1f)]
		[Tooltip("Amount of compression slack. 0 means total resistance to compression, 1 no resistance at all. 0.5 means constraints will allow a compression of up to 50% of their rest length.")]
		public float slack;

		// Token: 0x04003667 RID: 13927
		[FieldOffset(Offset = "0x40")]
		[Token(Token = "0x4003667")]
		[SerializeField]
		[HideInInspector]
		private List<ObiDistanceConstraintBatch> batches;
	}
}
