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

namespace Obi
{
	// Token: 0x020004EB RID: 1259
	[Token(Token = "0x20004EB")]
	[ExecuteInEditMode]
	[RequireComponent(typeof(Renderer))]
	[RequireComponent(typeof(ObiDistanceConstraints))]
	[RequireComponent(typeof(ObiBendingConstraints))]
	[RequireComponent(typeof(ObiPinConstraints))]
	[RequireComponent(typeof(ObiAerodynamicConstraints))]
	public abstract class ObiClothBase : ObiActor
	{
		// Token: 0x1400000E RID: 14
		// (add) Token: 0x06002C5B RID: 11355 RVA: 0x000020D3 File Offset: 0x000002D3
		// (remove) Token: 0x06002C5C RID: 11356 RVA: 0x000020D3 File Offset: 0x000002D3
		[Token(Token = "0x1400000E")]
		public event EventHandler OnDeformableMeshSetup
		{
			[Token(Token = "0x6002C5B")]
			[Address(RVA = "0x1095E30", Offset = "0x1094E30", VA = "0x181095E30")]
			[CompilerGenerated]
			add
			{
				throw new AnalysisFailedException("CPP2IL failed to recover any usable IL for this method.");
			}
			[Token(Token = "0x6002C5C")]
			[Address(RVA = "0x1096380", Offset = "0x1095380", VA = "0x181096380")]
			[CompilerGenerated]
			remove
			{
				throw new AnalysisFailedException("CPP2IL failed to recover any usable IL for this method.");
			}
		}

		// Token: 0x1400000F RID: 15
		// (add) Token: 0x06002C5D RID: 11357 RVA: 0x000020D3 File Offset: 0x000002D3
		// (remove) Token: 0x06002C5E RID: 11358 RVA: 0x000020D3 File Offset: 0x000002D3
		[Token(Token = "0x1400000F")]
		public event EventHandler OnDeformableMeshTeardown
		{
			[Token(Token = "0x6002C5D")]
			[Address(RVA = "0x1095ED0", Offset = "0x1094ED0", VA = "0x181095ED0")]
			[CompilerGenerated]
			add
			{
				throw new AnalysisFailedException("CPP2IL failed to recover any usable IL for this method.");
			}
			[Token(Token = "0x6002C5E")]
			[Address(RVA = "0x1096420", Offset = "0x1095420", VA = "0x181096420")]
			[CompilerGenerated]
			remove
			{
				throw new AnalysisFailedException("CPP2IL failed to recover any usable IL for this method.");
			}
		}

		// Token: 0x14000010 RID: 16
		// (add) Token: 0x06002C5F RID: 11359 RVA: 0x000020D3 File Offset: 0x000002D3
		// (remove) Token: 0x06002C60 RID: 11360 RVA: 0x000020D3 File Offset: 0x000002D3
		[Token(Token = "0x14000010")]
		public event EventHandler OnFrameBegin
		{
			[Token(Token = "0x6002C5F")]
			[Address(RVA = "0x1095F70", Offset = "0x1094F70", VA = "0x181095F70")]
			[CompilerGenerated]
			add
			{
				throw new AnalysisFailedException("CPP2IL failed to recover any usable IL for this method.");
			}
			[Token(Token = "0x6002C60")]
			[Address(RVA = "0x10964C0", Offset = "0x10954C0", VA = "0x1810964C0")]
			[CompilerGenerated]
			remove
			{
				throw new AnalysisFailedException("CPP2IL failed to recover any usable IL for this method.");
			}
		}

		// Token: 0x14000011 RID: 17
		// (add) Token: 0x06002C61 RID: 11361 RVA: 0x000020D3 File Offset: 0x000002D3
		// (remove) Token: 0x06002C62 RID: 11362 RVA: 0x000020D3 File Offset: 0x000002D3
		[Token(Token = "0x14000011")]
		public event EventHandler OnFrameEnd
		{
			[Token(Token = "0x6002C61")]
			[Address(RVA = "0x1096010", Offset = "0x1095010", VA = "0x181096010")]
			[CompilerGenerated]
			add
			{
				throw new AnalysisFailedException("CPP2IL failed to recover any usable IL for this method.");
			}
			[Token(Token = "0x6002C62")]
			[Address(RVA = "0x1096560", Offset = "0x1095560", VA = "0x181096560")]
			[CompilerGenerated]
			remove
			{
				throw new AnalysisFailedException("CPP2IL failed to recover any usable IL for this method.");
			}
		}

		// Token: 0x170002E5 RID: 741
		// (get) Token: 0x06002C63 RID: 11363 RVA: 0x000020D3 File Offset: 0x000002D3
		[Token(Token = "0x170002E5")]
		public ObiDistanceConstraints DistanceConstraints
		{
			[Token(Token = "0x6002C63")]
			[Address(RVA = "0x1096210", Offset = "0x1095210", VA = "0x181096210")]
			get
			{
				throw new AnalysisFailedException("CPP2IL failed to recover any usable IL for this method.");
			}
		}

		// Token: 0x170002E6 RID: 742
		// (get) Token: 0x06002C64 RID: 11364 RVA: 0x000020D3 File Offset: 0x000002D3
		[Token(Token = "0x170002E6")]
		public ObiBendingConstraints BendingConstraints
		{
			[Token(Token = "0x6002C64")]
			[Address(RVA = "0x1096160", Offset = "0x1095160", VA = "0x181096160")]
			get
			{
				throw new AnalysisFailedException("CPP2IL failed to recover any usable IL for this method.");
			}
		}

		// Token: 0x170002E7 RID: 743
		// (get) Token: 0x06002C65 RID: 11365 RVA: 0x000020D3 File Offset: 0x000002D3
		[Token(Token = "0x170002E7")]
		public ObiAerodynamicConstraints AerodynamicConstraints
		{
			[Token(Token = "0x6002C65")]
			[Address(RVA = "0x10960B0", Offset = "0x10950B0", VA = "0x1810960B0")]
			get
			{
				throw new AnalysisFailedException("CPP2IL failed to recover any usable IL for this method.");
			}
		}

		// Token: 0x170002E8 RID: 744
		// (get) Token: 0x06002C66 RID: 11366 RVA: 0x000020D3 File Offset: 0x000002D3
		[Token(Token = "0x170002E8")]
		public ObiPinConstraints PinConstraints
		{
			[Token(Token = "0x6002C66")]
			[Address(RVA = "0x10962C0", Offset = "0x10952C0", VA = "0x1810962C0")]
			get
			{
				throw new AnalysisFailedException("CPP2IL failed to recover any usable IL for this method.");
			}
		}

		// Token: 0x170002E9 RID: 745
		// (get) Token: 0x06002C67 RID: 11367 RVA: 0x00062280 File Offset: 0x00060480
		// (set) Token: 0x06002C68 RID: 11368 RVA: 0x00062294 File Offset: 0x00060494
		[Token(Token = "0x170002E9")]
		public ObiMeshTopology SharedTopology
		{
			[Token(Token = "0x6002C67")]
			[Address(RVA = "0x6FDC90", Offset = "0x6FCC90", VA = "0x1806FDC90")]
			get
			{
				return this.sharedTopology;
			}
			[Token(Token = "0x6002C68")]
			[Address(RVA = "0x1096620", Offset = "0x1095620", VA = "0x181096620")]
			set
			{
				if (this.sharedTopology != value)
				{
					this.sharedTopology = value;
					this.initialized = false;
				}
			}
		}

		// Token: 0x170002EA RID: 746
		// (get) Token: 0x06002C69 RID: 11369 RVA: 0x000622C0 File Offset: 0x000604C0
		// (set) Token: 0x06002C6A RID: 11370 RVA: 0x000622D4 File Offset: 0x000604D4
		[Token(Token = "0x170002EA")]
		public Oni.NormalsUpdate NormalsUpdate
		{
			[Token(Token = "0x6002C69")]
			[Address(RVA = "0xBEC7E0", Offset = "0xBEB7E0", VA = "0x180BEC7E0")]
			get
			{
				return this.normalsUpdate;
			}
			[Token(Token = "0x6002C6A")]
			[Address(RVA = "0x1096600", Offset = "0x1095600", VA = "0x181096600")]
			set
			{
				bool flag = this.updateTangents;
				this.normalsUpdate = value;
				Oni.SetDeformableMeshTBNUpdate(this.deformableMesh, value, flag);
			}
		}

		// Token: 0x170002EB RID: 747
		// (get) Token: 0x06002C6B RID: 11371 RVA: 0x000622FC File Offset: 0x000604FC
		// (set) Token: 0x06002C6C RID: 11372 RVA: 0x00062310 File Offset: 0x00060510
		[Token(Token = "0x170002EB")]
		public bool UpdateTangents
		{
			[Token(Token = "0x6002C6B")]
			[Address(RVA = "0x1096370", Offset = "0x1095370", VA = "0x181096370")]
			get
			{
				return this.updateTangents;
			}
			[Token(Token = "0x6002C6C")]
			[Address(RVA = "0x10966C0", Offset = "0x10956C0", VA = "0x1810966C0")]
			set
			{
				this.updateTangents = value;
				Oni.NormalsUpdate normalsUpdate = this.normalsUpdate;
				Oni.SetDeformableMeshTBNUpdate(this.deformableMesh, normalsUpdate, value);
			}
		}

		// Token: 0x170002EC RID: 748
		// (get) Token: 0x06002C6D RID: 11373 RVA: 0x00062338 File Offset: 0x00060538
		[Token(Token = "0x170002EC")]
		public IntPtr DeformableMesh
		{
			[Token(Token = "0x6002C6D")]
			[Address(RVA = "0x68AE50", Offset = "0x689E50", VA = "0x18068AE50")]
			get
			{
				return this.deformableMesh;
			}
		}

		// Token: 0x170002ED RID: 749
		// (get) Token: 0x06002C6E RID: 11374 RVA: 0x0006234C File Offset: 0x0006054C
		[Token(Token = "0x170002ED")]
		public Vector3[] MeshVertices
		{
			[Token(Token = "0x6002C6E")]
			[Address(RVA = "0x3F1780", Offset = "0x3F0780", VA = "0x1803F1780")]
			get
			{
				return this.meshVertices;
			}
		}

		// Token: 0x170002EE RID: 750
		// (get) Token: 0x06002C6F RID: 11375 RVA: 0x00062360 File Offset: 0x00060560
		[Token(Token = "0x170002EE")]
		public Vector3[] MeshNormals
		{
			[Token(Token = "0x6002C6F")]
			[Address(RVA = "0x3F1790", Offset = "0x3F0790", VA = "0x1803F1790")]
			get
			{
				return this.meshNormals;
			}
		}

		// Token: 0x170002EF RID: 751
		// (get) Token: 0x06002C70 RID: 11376 RVA: 0x00062374 File Offset: 0x00060574
		[Token(Token = "0x170002EF")]
		public Vector4[] MeshTangents
		{
			[Token(Token = "0x6002C70")]
			[Address(RVA = "0x3F66A0", Offset = "0x3F56A0", VA = "0x1803F66A0")]
			get
			{
				return this.meshTangents;
			}
		}

		// Token: 0x170002F0 RID: 752
		// (get) Token: 0x06002C71 RID: 11377 RVA: 0x00062388 File Offset: 0x00060588
		[Token(Token = "0x170002F0")]
		public override bool UsesCustomExternalForces
		{
			[Token(Token = "0x6002C71")]
			[Address(RVA = "0x4990D0", Offset = "0x4980D0", VA = "0x1804990D0", Slot = "12")]
			get
			{
				return true;
			}
		}

		// Token: 0x06002C72 RID: 11378 RVA: 0x000020D3 File Offset: 0x000002D3
		[Token(Token = "0x6002C72")]
		[Address(RVA = "0x1094350", Offset = "0x1093350", VA = "0x181094350", Slot = "13")]
		public override void Awake()
		{
			throw new AnalysisFailedException("CPP2IL failed to recover any usable IL for this method.");
		}

		// Token: 0x06002C73 RID: 11379 RVA: 0x00062398 File Offset: 0x00060598
		[Token(Token = "0x6002C73")]
		[Address(RVA = "0x1094BC0", Offset = "0x1093BC0", VA = "0x181094BC0", Slot = "18")]
		public override void OnDisable()
		{
			base.OnDisable();
			UnityEngine.Object.DestroyImmediate(this.clothMesh);
			MeshFilter meshFilter = this.meshFilter;
			int num = 0;
			if (meshFilter != num)
			{
				MeshFilter meshFilter2 = this.meshFilter;
				Mesh mesh = this.sharedMesh;
				meshFilter2.mesh = mesh;
			}
		}

		// Token: 0x06002C74 RID: 11380 RVA: 0x000623E4 File Offset: 0x000605E4
		[Token(Token = "0x6002C74")]
		[Address(RVA = "0x1094C70", Offset = "0x1093C70", VA = "0x181094C70", Slot = "29")]
		public override void OnSolverFrameBegin()
		{
			EventHandler onFrameBegin = this.OnFrameBegin;
			if (onFrameBegin != 0)
			{
				int num = 0;
				onFrameBegin(this, num);
				return;
			}
		}

		// Token: 0x06002C75 RID: 11381 RVA: 0x000020D3 File Offset: 0x000002D3
		[Token(Token = "0x6002C75")]
		[Address(RVA = "0x1094CE0", Offset = "0x1093CE0", VA = "0x181094CE0", Slot = "26")]
		public override void OnSolverPreInterpolation()
		{
			throw new AnalysisFailedException("CPP2IL failed to recover any usable IL for this method.");
		}

		// Token: 0x06002C76 RID: 11382 RVA: 0x00062408 File Offset: 0x00060608
		[Token(Token = "0x6002C76")]
		[Address(RVA = "0x1094C90", Offset = "0x1093C90", VA = "0x181094C90", Slot = "30")]
		public override void OnSolverFrameEnd()
		{
			base..ctor();
			this.CommitResultsToMesh();
			EventHandler onFrameEnd = this.OnFrameEnd;
			if (onFrameEnd != 0)
			{
				int num = 0;
				onFrameEnd(this, num);
				return;
			}
		}

		// Token: 0x06002C77 RID: 11383 RVA: 0x000020D3 File Offset: 0x000002D3
		[Token(Token = "0x6002C77")]
		[Address(RVA = "0x1094EC0", Offset = "0x1093EC0", VA = "0x181094EC0", Slot = "28")]
		public override void OnSolverStepEnd()
		{
			throw new AnalysisFailedException("CPP2IL failed to recover any usable IL for this method.");
		}

		// Token: 0x06002C78 RID: 11384 RVA: 0x00062438 File Offset: 0x00060638
		[Token(Token = "0x6002C78")]
		[Address(RVA = "0x1094B50", Offset = "0x1093B50", VA = "0x181094B50", Slot = "15")]
		public override void OnDestroy()
		{
			base.OnDestroy();
			UnityEngine.Object.DestroyImmediate(this.topology);
		}

		// Token: 0x06002C79 RID: 11385 RVA: 0x00062458 File Offset: 0x00060658
		[Token(Token = "0x6002C79")]
		[Address(RVA = "0x1094510", Offset = "0x1093510", VA = "0x181094510", Slot = "32")]
		protected virtual void CallOnDeformableMeshSetup()
		{
			EventHandler onDeformableMeshSetup = this.OnDeformableMeshSetup;
			if (onDeformableMeshSetup != 0)
			{
				int num = 0;
				onDeformableMeshSetup(this, num);
				return;
			}
		}

		// Token: 0x06002C7A RID: 11386 RVA: 0x0006247C File Offset: 0x0006067C
		[Token(Token = "0x6002C7A")]
		[Address(RVA = "0x1094530", Offset = "0x1093530", VA = "0x181094530", Slot = "33")]
		protected virtual void CallOnDeformableMeshTearDown()
		{
			EventHandler onDeformableMeshTeardown = this.OnDeformableMeshTeardown;
			if (onDeformableMeshTeardown != 0)
			{
				int num = 0;
				onDeformableMeshTeardown(this, num);
				return;
			}
		}

		// Token: 0x06002C7B RID: 11387 RVA: 0x000020D3 File Offset: 0x000002D3
		[Token(Token = "0x6002C7B")]
		[Address(RVA = "0x1094660", Offset = "0x1093660", VA = "0x181094660", Slot = "34")]
		public virtual void GetMeshDataArrays(Mesh mesh)
		{
			throw new AnalysisFailedException("CPP2IL failed to recover any usable IL for this method.");
		}

		// Token: 0x06002C7C RID: 11388 RVA: 0x000020D3 File Offset: 0x000002D3
		[Token(Token = "0x6002C7C")]
		[Address(RVA = "0x1094950", Offset = "0x1093950", VA = "0x181094950")]
		protected void InitializeWithRegularMesh()
		{
			throw new AnalysisFailedException("CPP2IL failed to recover any usable IL for this method.");
		}

		// Token: 0x06002C7D RID: 11389
		[Token(Token = "0x6002C7D")]
		[Address(Slot = "35")]
		public abstract IEnumerator GeneratePhysicRepresentationForMesh();

		// Token: 0x06002C7E RID: 11390 RVA: 0x000020D3 File Offset: 0x000002D3
		[Token(Token = "0x6002C7E")]
		[Address(RVA = "0x1094550", Offset = "0x1093550", VA = "0x181094550", Slot = "36")]
		public virtual void CommitResultsToMesh()
		{
			throw new AnalysisFailedException("CPP2IL failed to recover any usable IL for this method.");
		}

		// Token: 0x06002C7F RID: 11391 RVA: 0x000020D3 File Offset: 0x000002D3
		[Token(Token = "0x6002C7F")]
		[Address(RVA = "0x10958A0", Offset = "0x10948A0", VA = "0x1810958A0", Slot = "19")]
		public override void ResetActor()
		{
			throw new AnalysisFailedException("CPP2IL failed to recover any usable IL for this method.");
		}

		// Token: 0x06002C80 RID: 11392 RVA: 0x000020D3 File Offset: 0x000002D3
		[Token(Token = "0x6002C80")]
		[Address(RVA = "0x1095610", Offset = "0x1094610", VA = "0x181095610", Slot = "31")]
		public override bool ReadParticlePropertyFromTexture(Texture2D source, Action<int, Color> onReadProperty)
		{
			throw new AnalysisFailedException("CPP2IL failed to recover any usable IL for this method.");
		}

		// Token: 0x06002C81 RID: 11393 RVA: 0x000020D3 File Offset: 0x000002D3
		[Token(Token = "0x6002C81")]
		[Address(RVA = "0x1094FE0", Offset = "0x1093FE0", VA = "0x181094FE0")]
		public void Optimize()
		{
			throw new AnalysisFailedException("CPP2IL failed to recover any usable IL for this method.");
		}

		// Token: 0x06002C82 RID: 11394 RVA: 0x000020D3 File Offset: 0x000002D3
		[Token(Token = "0x6002C82")]
		[Address(RVA = "0x1095B10", Offset = "0x1094B10", VA = "0x181095B10")]
		public void Unoptimize()
		{
			throw new AnalysisFailedException("CPP2IL failed to recover any usable IL for this method.");
		}

		// Token: 0x06002C83 RID: 11395 RVA: 0x000624A0 File Offset: 0x000606A0
		[Token(Token = "0x6002C83")]
		[Address(RVA = "0x1095DD0", Offset = "0x1094DD0", VA = "0x181095DD0")]
		protected ObiClothBase()
		{
			float[] array = new float[16];
			this.transformData = array;
			base..ctor();
		}

		// Token: 0x0400359F RID: 13727
		[Token(Token = "0x400359F")]
		public const float DEFAULT_PARTICLE_MASS = 0.1f;

		// Token: 0x040035A4 RID: 13732
		[Cpp2IlInjected.FieldOffset(Offset = "0xC8")]
		[Token(Token = "0x40035A4")]
		[HideInInspector]
		[SerializeField]
		protected Oni.NormalsUpdate normalsUpdate;

		// Token: 0x040035A5 RID: 13733
		[Cpp2IlInjected.FieldOffset(Offset = "0xCC")]
		[Token(Token = "0x40035A5")]
		[SerializeField]
		[HideInInspector]
		protected bool updateTangents;

		// Token: 0x040035A6 RID: 13734
		[Cpp2IlInjected.FieldOffset(Offset = "0xD0")]
		[Token(Token = "0x40035A6")]
		[HideInInspector]
		[SerializeField]
		protected ObiMeshTopology sharedTopology;

		// Token: 0x040035A7 RID: 13735
		[Cpp2IlInjected.FieldOffset(Offset = "0xD8")]
		[Token(Token = "0x40035A7")]
		[HideInInspector]
		public ObiMeshTopology topology;

		// Token: 0x040035A8 RID: 13736
		[Cpp2IlInjected.FieldOffset(Offset = "0xE0")]
		[Token(Token = "0x40035A8")]
		[HideInInspector]
		public Mesh sharedMesh;

		// Token: 0x040035A9 RID: 13737
		[Cpp2IlInjected.FieldOffset(Offset = "0xE8")]
		[Token(Token = "0x40035A9")]
		[HideInInspector]
		public Mesh clothMesh;

		// Token: 0x040035AA RID: 13738
		[Cpp2IlInjected.FieldOffset(Offset = "0xF0")]
		[Token(Token = "0x40035AA")]
		protected MeshFilter meshFilter;

		// Token: 0x040035AB RID: 13739
		[Cpp2IlInjected.FieldOffset(Offset = "0xF8")]
		[Token(Token = "0x40035AB")]
		protected MeshRenderer meshRenderer;

		// Token: 0x040035AC RID: 13740
		[Cpp2IlInjected.FieldOffset(Offset = "0x100")]
		[Token(Token = "0x40035AC")]
		protected float[] transformData;

		// Token: 0x040035AD RID: 13741
		[Cpp2IlInjected.FieldOffset(Offset = "0x108")]
		[Token(Token = "0x40035AD")]
		protected int[] meshTriangles;

		// Token: 0x040035AE RID: 13742
		[Cpp2IlInjected.FieldOffset(Offset = "0x110")]
		[Token(Token = "0x40035AE")]
		protected Vector3[] meshVertices;

		// Token: 0x040035AF RID: 13743
		[Cpp2IlInjected.FieldOffset(Offset = "0x118")]
		[Token(Token = "0x40035AF")]
		protected Vector3[] meshNormals;

		// Token: 0x040035B0 RID: 13744
		[Cpp2IlInjected.FieldOffset(Offset = "0x120")]
		[Token(Token = "0x40035B0")]
		protected Vector4[] meshTangents;

		// Token: 0x040035B1 RID: 13745
		[Cpp2IlInjected.FieldOffset(Offset = "0x128")]
		[Token(Token = "0x40035B1")]
		protected Quaternion[] orientation;

		// Token: 0x040035B2 RID: 13746
		[Cpp2IlInjected.FieldOffset(Offset = "0x130")]
		[Token(Token = "0x40035B2")]
		protected IntPtr deformableMesh;

		// Token: 0x040035B3 RID: 13747
		[Cpp2IlInjected.FieldOffset(Offset = "0x138")]
		[Token(Token = "0x40035B3")]
		protected GCHandle particleIndicesHandle;

		// Token: 0x040035B4 RID: 13748
		[Cpp2IlInjected.FieldOffset(Offset = "0x13C")]
		[Token(Token = "0x40035B4")]
		protected GCHandle meshTrianglesHandle;

		// Token: 0x040035B5 RID: 13749
		[Cpp2IlInjected.FieldOffset(Offset = "0x140")]
		[Token(Token = "0x40035B5")]
		protected GCHandle meshVerticesHandle;

		// Token: 0x040035B6 RID: 13750
		[Cpp2IlInjected.FieldOffset(Offset = "0x144")]
		[Token(Token = "0x40035B6")]
		protected GCHandle meshNormalsHandle;

		// Token: 0x040035B7 RID: 13751
		[Cpp2IlInjected.FieldOffset(Offset = "0x148")]
		[Token(Token = "0x40035B7")]
		protected GCHandle meshTangentsHandle;

		// Token: 0x040035B8 RID: 13752
		[Cpp2IlInjected.FieldOffset(Offset = "0x150")]
		[Token(Token = "0x40035B8")]
		[HideInInspector]
		public float[] areaContribution;
	}
}
