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

namespace Obi
{
	// Token: 0x02000497 RID: 1175
	[Token(Token = "0x2000497")]
	[ExecuteInEditMode]
	[AddComponentMenu("Physics/Obi/Obi Tearable Cloth")]
	public class ObiTearableCloth : ObiClothBase
	{
		// Token: 0x060029E9 RID: 10729 RVA: 0x0005B92C File Offset: 0x00059B2C
		[Token(Token = "0x60029E9")]
		[Address(RVA = "0xD30920", Offset = "0xD2F720", VA = "0x180D30920", Slot = "28")]
		public override void OnSolverStepEnd()
		{
			base.OnSolverStepEnd();
			if (base.isActiveAndEnabled)
			{
				this.ApplyTearing();
				return;
			}
		}

		// Token: 0x060029EA RID: 10730 RVA: 0x0005B950 File Offset: 0x00059B50
		[Token(Token = "0x60029EA")]
		[Address(RVA = "0xD30900", Offset = "0xD2F700", VA = "0x180D30900", Slot = "17")]
		public override void OnEnable()
		{
			base.OnEnable();
			base.InitializeWithRegularMesh();
		}

		// Token: 0x060029EB RID: 10731 RVA: 0x000020D3 File Offset: 0x000002D3
		[Token(Token = "0x60029EB")]
		[Address(RVA = "0xD2F920", Offset = "0xD2E720", VA = "0x180D2F920", Slot = "21")]
		public override bool AddToSolver(object info)
		{
			throw new AnalysisFailedException("CPP2IL failed to recover any usable IL for this method.");
		}

		// Token: 0x060029EC RID: 10732 RVA: 0x000020D3 File Offset: 0x000002D3
		[Token(Token = "0x60029EC")]
		[Address(RVA = "0xD30960", Offset = "0xD2F760", VA = "0x180D30960", Slot = "22")]
		public override bool RemoveFromSolver(object info)
		{
			throw new AnalysisFailedException("CPP2IL failed to recover any usable IL for this method.");
		}

		// Token: 0x060029ED RID: 10733 RVA: 0x000020D3 File Offset: 0x000002D3
		[Token(Token = "0x60029ED")]
		[Address(RVA = "0xD30240", Offset = "0xD2F040", VA = "0x180D30240", Slot = "34")]
		public override void GetMeshDataArrays(Mesh mesh)
		{
			throw new AnalysisFailedException("CPP2IL failed to recover any usable IL for this method.");
		}

		// Token: 0x060029EE RID: 10734 RVA: 0x000020D3 File Offset: 0x000002D3
		[Token(Token = "0x60029EE")]
		[Address(RVA = "0xD30020", Offset = "0xD2EE20", VA = "0x180D30020", Slot = "36")]
		public override void CommitResultsToMesh()
		{
			throw new AnalysisFailedException("CPP2IL failed to recover any usable IL for this method.");
		}

		// Token: 0x060029EF RID: 10735 RVA: 0x000020D3 File Offset: 0x000002D3
		[Token(Token = "0x60029EF")]
		[Address(RVA = "0xD301D0", Offset = "0xD2EFD0", VA = "0x180D301D0", Slot = "35")]
		public override IEnumerator GeneratePhysicRepresentationForMesh()
		{
			throw new AnalysisFailedException("CPP2IL failed to recover any usable IL for this method.");
		}

		// Token: 0x060029F0 RID: 10736 RVA: 0x000020D3 File Offset: 0x000002D3
		[Token(Token = "0x60029F0")]
		[Address(RVA = "0xD2FC00", Offset = "0xD2EA00", VA = "0x180D2FC00")]
		private void ApplyTearing()
		{
			throw new AnalysisFailedException("CPP2IL failed to recover any usable IL for this method.");
		}

		// Token: 0x060029F1 RID: 10737 RVA: 0x000020D3 File Offset: 0x000002D3
		[Token(Token = "0x60029F1")]
		[Address(RVA = "0xD30BB0", Offset = "0xD2F9B0", VA = "0x180D30BB0")]
		public void Tear(int constraintIndex)
		{
			throw new AnalysisFailedException("CPP2IL failed to recover any usable IL for this method.");
		}

		// Token: 0x060029F2 RID: 10738 RVA: 0x0005B96C File Offset: 0x00059B6C
		[Token(Token = "0x60029F2")]
		[Address(RVA = "0xD32B80", Offset = "0xD31980", VA = "0x180D32B80")]
		public ObiTearableCloth()
		{
		}

		// Token: 0x040032E0 RID: 13024
		[Cpp2IlInjected.FieldOffset(Offset = "0x158")]
		[Token(Token = "0x40032E0")]
		[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: 0x040032E1 RID: 13025
		[Cpp2IlInjected.FieldOffset(Offset = "0x15C")]
		[Token(Token = "0x40032E1")]
		[Delayed]
		[Tooltip("Maximum strain betweeen particles before the spring constraint holding them together would break.")]
		public float tearResistanceMultiplier = 1000f;

		// Token: 0x040032E2 RID: 13026
		[Cpp2IlInjected.FieldOffset(Offset = "0x160")]
		[Token(Token = "0x40032E2")]
		[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: 0x040032E3 RID: 13027
		[Cpp2IlInjected.FieldOffset(Offset = "0x168")]
		[Token(Token = "0x40032E3")]
		[HideInInspector]
		[Delayed]
		public float[] tearResistance;

		// Token: 0x040032E4 RID: 13028
		[Cpp2IlInjected.FieldOffset(Offset = "0x170")]
		[Token(Token = "0x40032E4")]
		[HideInInspector]
		[SerializeField]
		private int maxVertexValency;

		// Token: 0x040032E5 RID: 13029
		[Cpp2IlInjected.FieldOffset(Offset = "0x174")]
		[Token(Token = "0x40032E5")]
		[HideInInspector]
		[SerializeField]
		private int pooledVertices;

		// Token: 0x040032E6 RID: 13030
		[Cpp2IlInjected.FieldOffset(Offset = "0x178")]
		[Token(Token = "0x40032E6")]
		[HideInInspector]
		[SerializeField]
		private int pooledParticles;

		// Token: 0x040032E7 RID: 13031
		[Cpp2IlInjected.FieldOffset(Offset = "0x17C")]
		[Token(Token = "0x40032E7")]
		[HideInInspector]
		[SerializeField]
		private int usedParticles;

		// Token: 0x040032E8 RID: 13032
		[Cpp2IlInjected.FieldOffset(Offset = "0x180")]
		[Token(Token = "0x40032E8")]
		[HideInInspector]
		[SerializeField]
		private int[] distanceConstraintMap;

		// Token: 0x040032E9 RID: 13033
		[Cpp2IlInjected.FieldOffset(Offset = "0x188")]
		[Token(Token = "0x40032E9")]
		[HideInInspector]
		[SerializeField]
		private int[] bendConstraintOffsets;

		// Token: 0x040032EA RID: 13034
		[Cpp2IlInjected.FieldOffset(Offset = "0x190")]
		[Token(Token = "0x40032EA")]
		protected Color[] meshColors;

		// Token: 0x040032EB RID: 13035
		[Cpp2IlInjected.FieldOffset(Offset = "0x198")]
		[Token(Token = "0x40032EB")]
		protected Vector2[] meshUV1;

		// Token: 0x040032EC RID: 13036
		[Cpp2IlInjected.FieldOffset(Offset = "0x1A0")]
		[Token(Token = "0x40032EC")]
		protected Vector2[] meshUV2;

		// Token: 0x040032ED RID: 13037
		[Cpp2IlInjected.FieldOffset(Offset = "0x1A8")]
		[Token(Token = "0x40032ED")]
		protected Vector2[] meshUV3;

		// Token: 0x040032EE RID: 13038
		[Cpp2IlInjected.FieldOffset(Offset = "0x1B0")]
		[Token(Token = "0x40032EE")]
		protected Vector2[] meshUV4;

		// Token: 0x040032EF RID: 13039
		[Cpp2IlInjected.FieldOffset(Offset = "0x1B8")]
		[Token(Token = "0x40032EF")]
		protected GCHandle meshColorsHandle;

		// Token: 0x040032F0 RID: 13040
		[Cpp2IlInjected.FieldOffset(Offset = "0x1BC")]
		[Token(Token = "0x40032F0")]
		protected GCHandle meshUV1Handle;

		// Token: 0x040032F1 RID: 13041
		[Cpp2IlInjected.FieldOffset(Offset = "0x1C0")]
		[Token(Token = "0x40032F1")]
		protected GCHandle meshUV2Handle;

		// Token: 0x040032F2 RID: 13042
		[Cpp2IlInjected.FieldOffset(Offset = "0x1C4")]
		[Token(Token = "0x40032F2")]
		protected GCHandle meshUV3Handle;

		// Token: 0x040032F3 RID: 13043
		[Cpp2IlInjected.FieldOffset(Offset = "0x1C8")]
		[Token(Token = "0x40032F3")]
		protected GCHandle meshUV4Handle;
	}
}
