using System;
using System.Collections;
using System.Runtime.InteropServices;
using Cpp2IlInjected;
using UnityEngine;

namespace Obi
{
	// Token: 0x020004EF RID: 1263
	[Token(Token = "0x20004EF")]
	[ExecuteInEditMode]
	[AddComponentMenu("Physics/Obi/Obi Tearable Cloth")]
	public class ObiTearableCloth : ObiClothBase
	{
		// Token: 0x06002CB2 RID: 11442 RVA: 0x00062CF0 File Offset: 0x00060EF0
		[Token(Token = "0x6002CB2")]
		[Address(RVA = "0xE61AA0", Offset = "0xE60AA0", VA = "0x180E61AA0", Slot = "28")]
		public override void OnSolverStepEnd()
		{
			base.OnSolverStepEnd();
			if (base.isActiveAndEnabled)
			{
				this.ApplyTearing();
				return;
			}
		}

		// Token: 0x06002CB3 RID: 11443 RVA: 0x00062D14 File Offset: 0x00060F14
		[Token(Token = "0x6002CB3")]
		[Address(RVA = "0xE61A80", Offset = "0xE60A80", VA = "0x180E61A80", Slot = "17")]
		public override void OnEnable()
		{
			base.OnEnable();
			base.InitializeWithRegularMesh();
		}

		// Token: 0x06002CB4 RID: 11444 RVA: 0x000020D3 File Offset: 0x000002D3
		[Token(Token = "0x6002CB4")]
		[Address(RVA = "0xE60AA0", Offset = "0xE5FAA0", VA = "0x180E60AA0", Slot = "21")]
		public override bool AddToSolver(object info)
		{
			throw new AnalysisFailedException("CPP2IL failed to recover any usable IL for this method.");
		}

		// Token: 0x06002CB5 RID: 11445 RVA: 0x000020D3 File Offset: 0x000002D3
		[Token(Token = "0x6002CB5")]
		[Address(RVA = "0xE61AE0", Offset = "0xE60AE0", VA = "0x180E61AE0", Slot = "22")]
		public override bool RemoveFromSolver(object info)
		{
			throw new AnalysisFailedException("CPP2IL failed to recover any usable IL for this method.");
		}

		// Token: 0x06002CB6 RID: 11446 RVA: 0x000020D3 File Offset: 0x000002D3
		[Token(Token = "0x6002CB6")]
		[Address(RVA = "0xE613C0", Offset = "0xE603C0", VA = "0x180E613C0", Slot = "34")]
		public override void GetMeshDataArrays(Mesh mesh)
		{
			throw new AnalysisFailedException("CPP2IL failed to recover any usable IL for this method.");
		}

		// Token: 0x06002CB7 RID: 11447 RVA: 0x000020D3 File Offset: 0x000002D3
		[Token(Token = "0x6002CB7")]
		[Address(RVA = "0xE611A0", Offset = "0xE601A0", VA = "0x180E611A0", Slot = "36")]
		public override void CommitResultsToMesh()
		{
			throw new AnalysisFailedException("CPP2IL failed to recover any usable IL for this method.");
		}

		// Token: 0x06002CB8 RID: 11448 RVA: 0x000020D3 File Offset: 0x000002D3
		[Token(Token = "0x6002CB8")]
		[Address(RVA = "0xE61350", Offset = "0xE60350", VA = "0x180E61350", Slot = "35")]
		public override IEnumerator GeneratePhysicRepresentationForMesh()
		{
			throw new AnalysisFailedException("CPP2IL failed to recover any usable IL for this method.");
		}

		// Token: 0x06002CB9 RID: 11449 RVA: 0x000020D3 File Offset: 0x000002D3
		[Token(Token = "0x6002CB9")]
		[Address(RVA = "0xE60D80", Offset = "0xE5FD80", VA = "0x180E60D80")]
		private void ApplyTearing()
		{
			throw new AnalysisFailedException("CPP2IL failed to recover any usable IL for this method.");
		}

		// Token: 0x06002CBA RID: 11450 RVA: 0x000020D3 File Offset: 0x000002D3
		[Token(Token = "0x6002CBA")]
		[Address(RVA = "0xE61D30", Offset = "0xE60D30", VA = "0x180E61D30")]
		public void Tear(int constraintIndex)
		{
			throw new AnalysisFailedException("CPP2IL failed to recover any usable IL for this method.");
		}

		// Token: 0x06002CBB RID: 11451 RVA: 0x00062D30 File Offset: 0x00060F30
		[Token(Token = "0x6002CBB")]
		[Address(RVA = "0xE63D00", Offset = "0xE62D00", VA = "0x180E63D00")]
		public ObiTearableCloth()
		{
		}

		// Token: 0x040035CA RID: 13770
		[Cpp2IlInjected.FieldOffset(Offset = "0x158")]
		[Token(Token = "0x40035CA")]
		[Tooltip("Amount of memory preallocated to create extra particles and mesh data when tearing the cloth. 0 means no extra memory will be allocated, and the cloth will not be tearable. 1 means all cloth triangles will be fully tearable.")]
		[Range(0f, 1f)]
		public float tearCapacity = 0.5f;

		// Token: 0x040035CB RID: 13771
		[Cpp2IlInjected.FieldOffset(Offset = "0x15C")]
		[Token(Token = "0x40035CB")]
		[Delayed]
		[Tooltip("Maximum strain betweeen particles before the spring constraint holding them together would break.")]
		public float tearResistanceMultiplier = 1000f;

		// Token: 0x040035CC RID: 13772
		[Cpp2IlInjected.FieldOffset(Offset = "0x160")]
		[Token(Token = "0x40035CC")]
		[Tooltip("Percentage of debilitation suffered by the cloth around existing tears. Higher values cause already teared regions to become less tear resistant.")]
		[Range(0f, 1f)]
		public float tearDebilitation = 0.5f;

		// Token: 0x040035CD RID: 13773
		[Cpp2IlInjected.FieldOffset(Offset = "0x168")]
		[Token(Token = "0x40035CD")]
		[Delayed]
		[HideInInspector]
		public float[] tearResistance;

		// Token: 0x040035CE RID: 13774
		[Cpp2IlInjected.FieldOffset(Offset = "0x170")]
		[Token(Token = "0x40035CE")]
		[HideInInspector]
		[SerializeField]
		private int maxVertexValency;

		// Token: 0x040035CF RID: 13775
		[Cpp2IlInjected.FieldOffset(Offset = "0x174")]
		[Token(Token = "0x40035CF")]
		[SerializeField]
		[HideInInspector]
		private int pooledVertices;

		// Token: 0x040035D0 RID: 13776
		[Cpp2IlInjected.FieldOffset(Offset = "0x178")]
		[Token(Token = "0x40035D0")]
		[HideInInspector]
		[SerializeField]
		private int pooledParticles;

		// Token: 0x040035D1 RID: 13777
		[Cpp2IlInjected.FieldOffset(Offset = "0x17C")]
		[Token(Token = "0x40035D1")]
		[HideInInspector]
		[SerializeField]
		private int usedParticles;

		// Token: 0x040035D2 RID: 13778
		[Cpp2IlInjected.FieldOffset(Offset = "0x180")]
		[Token(Token = "0x40035D2")]
		[SerializeField]
		[HideInInspector]
		private int[] distanceConstraintMap;

		// Token: 0x040035D3 RID: 13779
		[Cpp2IlInjected.FieldOffset(Offset = "0x188")]
		[Token(Token = "0x40035D3")]
		[SerializeField]
		[HideInInspector]
		private int[] bendConstraintOffsets;

		// Token: 0x040035D4 RID: 13780
		[Cpp2IlInjected.FieldOffset(Offset = "0x190")]
		[Token(Token = "0x40035D4")]
		protected Color[] meshColors;

		// Token: 0x040035D5 RID: 13781
		[Cpp2IlInjected.FieldOffset(Offset = "0x198")]
		[Token(Token = "0x40035D5")]
		protected Vector2[] meshUV1;

		// Token: 0x040035D6 RID: 13782
		[Cpp2IlInjected.FieldOffset(Offset = "0x1A0")]
		[Token(Token = "0x40035D6")]
		protected Vector2[] meshUV2;

		// Token: 0x040035D7 RID: 13783
		[Cpp2IlInjected.FieldOffset(Offset = "0x1A8")]
		[Token(Token = "0x40035D7")]
		protected Vector2[] meshUV3;

		// Token: 0x040035D8 RID: 13784
		[Cpp2IlInjected.FieldOffset(Offset = "0x1B0")]
		[Token(Token = "0x40035D8")]
		protected Vector2[] meshUV4;

		// Token: 0x040035D9 RID: 13785
		[Cpp2IlInjected.FieldOffset(Offset = "0x1B8")]
		[Token(Token = "0x40035D9")]
		protected GCHandle meshColorsHandle;

		// Token: 0x040035DA RID: 13786
		[Cpp2IlInjected.FieldOffset(Offset = "0x1BC")]
		[Token(Token = "0x40035DA")]
		protected GCHandle meshUV1Handle;

		// Token: 0x040035DB RID: 13787
		[Cpp2IlInjected.FieldOffset(Offset = "0x1C0")]
		[Token(Token = "0x40035DB")]
		protected GCHandle meshUV2Handle;

		// Token: 0x040035DC RID: 13788
		[Cpp2IlInjected.FieldOffset(Offset = "0x1C4")]
		[Token(Token = "0x40035DC")]
		protected GCHandle meshUV3Handle;

		// Token: 0x040035DD RID: 13789
		[Cpp2IlInjected.FieldOffset(Offset = "0x1C8")]
		[Token(Token = "0x40035DD")]
		protected GCHandle meshUV4Handle;
	}
}
