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

namespace Obi
{
	// Token: 0x02000512 RID: 1298
	[Token(Token = "0x2000512")]
	[DisallowMultipleComponent]
	public class ObiPinConstraints : ObiBatchedConstraints
	{
		// Token: 0x06002DAE RID: 11694 RVA: 0x000645A8 File Offset: 0x000627A8
		[Token(Token = "0x6002DAE")]
		[Address(RVA = "0x367A80", Offset = "0x366A80", VA = "0x180367A80", Slot = "8")]
		public override Oni.ConstraintType GetConstraintType()
		{
			return Oni.ConstraintType.Pin;
		}

		// Token: 0x06002DAF RID: 11695 RVA: 0x000020D3 File Offset: 0x000002D3
		[Token(Token = "0x6002DAF")]
		[Address(RVA = "0xE58100", Offset = "0xE57100", VA = "0x180E58100", Slot = "9")]
		public override List<ObiConstraintBatch> GetBatches()
		{
			throw new AnalysisFailedException("CPP2IL failed to recover any usable IL for this method.");
		}

		// Token: 0x06002DB0 RID: 11696 RVA: 0x000645B8 File Offset: 0x000627B8
		[Token(Token = "0x6002DB0")]
		[Address(RVA = "0xE580A0", Offset = "0xE570A0", VA = "0x180E580A0", Slot = "10")]
		public override void Clear()
		{
			int num = 0;
			bool flag = base.RemoveFromSolver(num);
			this.batches.Clear();
		}

		// Token: 0x06002DB1 RID: 11697 RVA: 0x000645E0 File Offset: 0x000627E0
		[Token(Token = "0x6002DB1")]
		[Address(RVA = "0xE58000", Offset = "0xE57000", VA = "0x180E58000")]
		public void AddBatch(ObiPinConstraintBatch batch)
		{
			if (batch != 0)
			{
				int constraintType = (int)batch.GetConstraintType();
				Oni.ConstraintType constraintType2 = this.GetConstraintType();
				if (constraintType == (int)constraintType2)
				{
					this.batches.Add(batch);
				}
			}
		}

		// Token: 0x06002DB2 RID: 11698 RVA: 0x00064618 File Offset: 0x00062818
		[Token(Token = "0x6002DB2")]
		[Address(RVA = "0xE585D0", Offset = "0xE575D0", VA = "0x180E585D0")]
		public void RemoveBatch(ObiPinConstraintBatch batch)
		{
			bool flag = this.batches.Remove(batch);
		}

		// Token: 0x06002DB3 RID: 11699 RVA: 0x000020D3 File Offset: 0x000002D3
		[Token(Token = "0x6002DB3")]
		[Address(RVA = "0xE58230", Offset = "0xE57230", VA = "0x180E58230")]
		public void OnDrawGizmosSelected()
		{
			throw new AnalysisFailedException("CPP2IL failed to recover any usable IL for this method.");
		}

		// Token: 0x06002DB4 RID: 11700 RVA: 0x00064638 File Offset: 0x00062838
		[Token(Token = "0x6002DB4")]
		[Address(RVA = "0xE58630", Offset = "0xE57630", VA = "0x180E58630")]
		public ObiPinConstraints()
		{
			List<ObiPinConstraintBatch> list = new List();
			this.batches = list;
			base..ctor();
		}

		// Token: 0x0400366A RID: 13930
		[FieldOffset(Offset = "0x30")]
		[Token(Token = "0x400366A")]
		[Range(0f, 1f)]
		[Tooltip("Pin resistance to stretching. Lower values will yield more elastic pin constraints.")]
		public float stiffness = 1f;

		// Token: 0x0400366B RID: 13931
		[FieldOffset(Offset = "0x38")]
		[Token(Token = "0x400366B")]
		[HideInInspector]
		[SerializeField]
		private List<ObiPinConstraintBatch> batches;
	}
}
