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

namespace Obi
{
	// Token: 0x02000493 RID: 1171
	[Token(Token = "0x2000493")]
	[ExecuteInEditMode]
	[RequireComponent(typeof(ObiPinConstraints))]
	[RequireComponent(typeof(ObiAerodynamicConstraints))]
	[RequireComponent(typeof(ObiBendingConstraints))]
	[RequireComponent(typeof(ObiDistanceConstraints))]
	[RequireComponent(typeof(Renderer))]
	public abstract class ObiClothBase : ObiActor
	{
		// Token: 0x1400000E RID: 14
		// (add) Token: 0x06002992 RID: 10642 RVA: 0x000020D3 File Offset: 0x000002D3
		// (remove) Token: 0x06002993 RID: 10643 RVA: 0x000020D3 File Offset: 0x000002D3
		[Token(Token = "0x1400000E")]
		public event EventHandler OnDeformableMeshSetup
		{
			[Token(Token = "0x6002992")]
			[Address(RVA = "0x1002B00", Offset = "0x1001900", VA = "0x181002B00")]
			[CompilerGenerated]
			add
			{
				throw new AnalysisFailedException("CPP2IL failed to recover any usable IL for this method.");
			}
			[Token(Token = "0x6002993")]
			[Address(RVA = "0x1003050", Offset = "0x1001E50", VA = "0x181003050")]
			[CompilerGenerated]
			remove
			{
				throw new AnalysisFailedException("CPP2IL failed to recover any usable IL for this method.");
			}
		}

		// Token: 0x1400000F RID: 15
		// (add) Token: 0x06002994 RID: 10644 RVA: 0x000020D3 File Offset: 0x000002D3
		// (remove) Token: 0x06002995 RID: 10645 RVA: 0x000020D3 File Offset: 0x000002D3
		[Token(Token = "0x1400000F")]
		public event EventHandler OnDeformableMeshTeardown
		{
			[Token(Token = "0x6002994")]
			[Address(RVA = "0x1002BA0", Offset = "0x10019A0", VA = "0x181002BA0")]
			[CompilerGenerated]
			add
			{
				throw new AnalysisFailedException("CPP2IL failed to recover any usable IL for this method.");
			}
			[Token(Token = "0x6002995")]
			[Address(RVA = "0x10030F0", Offset = "0x1001EF0", VA = "0x1810030F0")]
			[CompilerGenerated]
			remove
			{
				throw new AnalysisFailedException("CPP2IL failed to recover any usable IL for this method.");
			}
		}

		// Token: 0x14000010 RID: 16
		// (add) Token: 0x06002996 RID: 10646 RVA: 0x000020D3 File Offset: 0x000002D3
		// (remove) Token: 0x06002997 RID: 10647 RVA: 0x000020D3 File Offset: 0x000002D3
		[Token(Token = "0x14000010")]
		public event EventHandler OnFrameBegin
		{
			[Token(Token = "0x6002996")]
			[Address(RVA = "0x1002C40", Offset = "0x1001A40", VA = "0x181002C40")]
			[CompilerGenerated]
			add
			{
				throw new AnalysisFailedException("CPP2IL failed to recover any usable IL for this method.");
			}
			[Token(Token = "0x6002997")]
			[Address(RVA = "0x1003190", Offset = "0x1001F90", VA = "0x181003190")]
			[CompilerGenerated]
			remove
			{
				throw new AnalysisFailedException("CPP2IL failed to recover any usable IL for this method.");
			}
		}

		// Token: 0x14000011 RID: 17
		// (add) Token: 0x06002998 RID: 10648 RVA: 0x000020D3 File Offset: 0x000002D3
		// (remove) Token: 0x06002999 RID: 10649 RVA: 0x000020D3 File Offset: 0x000002D3
		[Token(Token = "0x14000011")]
		public event EventHandler OnFrameEnd
		{
			[Token(Token = "0x6002998")]
			[Address(RVA = "0x1002CE0", Offset = "0x1001AE0", VA = "0x181002CE0")]
			[CompilerGenerated]
			add
			{
				throw new AnalysisFailedException("CPP2IL failed to recover any usable IL for this method.");
			}
			[Token(Token = "0x6002999")]
			[Address(RVA = "0x1003230", Offset = "0x1002030", VA = "0x181003230")]
			[CompilerGenerated]
			remove
			{
				throw new AnalysisFailedException("CPP2IL failed to recover any usable IL for this method.");
			}
		}

		// Token: 0x170002C0 RID: 704
		// (get) Token: 0x0600299A RID: 10650 RVA: 0x000020D3 File Offset: 0x000002D3
		[Token(Token = "0x170002C0")]
		public ObiDistanceConstraints DistanceConstraints
		{
			[Token(Token = "0x600299A")]
			[Address(RVA = "0x1002EE0", Offset = "0x1001CE0", VA = "0x181002EE0")]
			get
			{
				throw new AnalysisFailedException("CPP2IL failed to recover any usable IL for this method.");
			}
		}

		// Token: 0x170002C1 RID: 705
		// (get) Token: 0x0600299B RID: 10651 RVA: 0x000020D3 File Offset: 0x000002D3
		[Token(Token = "0x170002C1")]
		public ObiBendingConstraints BendingConstraints
		{
			[Token(Token = "0x600299B")]
			[Address(RVA = "0x1002E30", Offset = "0x1001C30", VA = "0x181002E30")]
			get
			{
				throw new AnalysisFailedException("CPP2IL failed to recover any usable IL for this method.");
			}
		}

		// Token: 0x170002C2 RID: 706
		// (get) Token: 0x0600299C RID: 10652 RVA: 0x000020D3 File Offset: 0x000002D3
		[Token(Token = "0x170002C2")]
		public ObiAerodynamicConstraints AerodynamicConstraints
		{
			[Token(Token = "0x600299C")]
			[Address(RVA = "0x1002D80", Offset = "0x1001B80", VA = "0x181002D80")]
			get
			{
				throw new AnalysisFailedException("CPP2IL failed to recover any usable IL for this method.");
			}
		}

		// Token: 0x170002C3 RID: 707
		// (get) Token: 0x0600299D RID: 10653 RVA: 0x000020D3 File Offset: 0x000002D3
		[Token(Token = "0x170002C3")]
		public ObiPinConstraints PinConstraints
		{
			[Token(Token = "0x600299D")]
			[Address(RVA = "0x1002F90", Offset = "0x1001D90", VA = "0x181002F90")]
			get
			{
				throw new AnalysisFailedException("CPP2IL failed to recover any usable IL for this method.");
			}
		}

		// Token: 0x170002C4 RID: 708
		// (get) Token: 0x0600299E RID: 10654 RVA: 0x0005AEBC File Offset: 0x000590BC
		// (set) Token: 0x0600299F RID: 10655 RVA: 0x0005AED0 File Offset: 0x000590D0
		[Token(Token = "0x170002C4")]
		public ObiMeshTopology SharedTopology
		{
			[Token(Token = "0x600299E")]
			[Address(RVA = "0x6D4570", Offset = "0x6D3370", VA = "0x1806D4570")]
			get
			{
				return this.sharedTopology;
			}
			[Token(Token = "0x600299F")]
			[Address(RVA = "0x10032F0", Offset = "0x10020F0", VA = "0x1810032F0")]
			set
			{
				if (this.sharedTopology != value)
				{
					this.sharedTopology = value;
					this.initialized = false;
				}
			}
		}

		// Token: 0x170002C5 RID: 709
		// (get) Token: 0x060029A0 RID: 10656 RVA: 0x0005AEFC File Offset: 0x000590FC
		// (set) Token: 0x060029A1 RID: 10657 RVA: 0x0005AF10 File Offset: 0x00059110
		[Token(Token = "0x170002C5")]
		public Oni.NormalsUpdate NormalsUpdate
		{
			[Token(Token = "0x60029A0")]
			[Address(RVA = "0xAF93C0", Offset = "0xAF81C0", VA = "0x180AF93C0")]
			get
			{
				return this.normalsUpdate;
			}
			[Token(Token = "0x60029A1")]
			[Address(RVA = "0x10032D0", Offset = "0x10020D0", VA = "0x1810032D0")]
			set
			{
				bool flag = this.updateTangents;
				this.normalsUpdate = value;
				Oni.SetDeformableMeshTBNUpdate(this.deformableMesh, value, flag);
			}
		}

		// Token: 0x170002C6 RID: 710
		// (get) Token: 0x060029A2 RID: 10658 RVA: 0x0005AF38 File Offset: 0x00059138
		// (set) Token: 0x060029A3 RID: 10659 RVA: 0x0005AF4C File Offset: 0x0005914C
		[Token(Token = "0x170002C6")]
		public bool UpdateTangents
		{
			[Token(Token = "0x60029A2")]
			[Address(RVA = "0x1003040", Offset = "0x1001E40", VA = "0x181003040")]
			get
			{
				return this.updateTangents;
			}
			[Token(Token = "0x60029A3")]
			[Address(RVA = "0x1003390", Offset = "0x1002190", VA = "0x181003390")]
			set
			{
				this.updateTangents = value;
				Oni.NormalsUpdate normalsUpdate = this.normalsUpdate;
				Oni.SetDeformableMeshTBNUpdate(this.deformableMesh, normalsUpdate, value);
			}
		}

		// Token: 0x170002C7 RID: 711
		// (get) Token: 0x060029A4 RID: 10660 RVA: 0x0005AF74 File Offset: 0x00059174
		[Token(Token = "0x170002C7")]
		public IntPtr DeformableMesh
		{
			[Token(Token = "0x60029A4")]
			[Address(RVA = "0x68F990", Offset = "0x68E790", VA = "0x18068F990")]
			get
			{
				return this.deformableMesh;
			}
		}

		// Token: 0x170002C8 RID: 712
		// (get) Token: 0x060029A5 RID: 10661 RVA: 0x0005AF88 File Offset: 0x00059188
		[Token(Token = "0x170002C8")]
		public Vector3[] MeshVertices
		{
			[Token(Token = "0x60029A5")]
			[Address(RVA = "0x388BB0", Offset = "0x3879B0", VA = "0x180388BB0")]
			get
			{
				return this.meshVertices;
			}
		}

		// Token: 0x170002C9 RID: 713
		// (get) Token: 0x060029A6 RID: 10662 RVA: 0x0005AF9C File Offset: 0x0005919C
		[Token(Token = "0x170002C9")]
		public Vector3[] MeshNormals
		{
			[Token(Token = "0x60029A6")]
			[Address(RVA = "0x388BC0", Offset = "0x3879C0", VA = "0x180388BC0")]
			get
			{
				return this.meshNormals;
			}
		}

		// Token: 0x170002CA RID: 714
		// (get) Token: 0x060029A7 RID: 10663 RVA: 0x0005AFB0 File Offset: 0x000591B0
		[Token(Token = "0x170002CA")]
		public Vector4[] MeshTangents
		{
			[Token(Token = "0x60029A7")]
			[Address(RVA = "0x38DAD0", Offset = "0x38C8D0", VA = "0x18038DAD0")]
			get
			{
				return this.meshTangents;
			}
		}

		// Token: 0x170002CB RID: 715
		// (get) Token: 0x060029A8 RID: 10664 RVA: 0x0005AFC4 File Offset: 0x000591C4
		[Token(Token = "0x170002CB")]
		public override bool UsesCustomExternalForces
		{
			[Token(Token = "0x60029A8")]
			[Address(RVA = "0x454840", Offset = "0x453640", VA = "0x180454840", Slot = "12")]
			get
			{
				return true;
			}
		}

		// Token: 0x060029A9 RID: 10665 RVA: 0x000020D3 File Offset: 0x000002D3
		[Token(Token = "0x60029A9")]
		[Address(RVA = "0x1001020", Offset = "0xFFFE20", VA = "0x181001020", Slot = "13")]
		public override void Awake()
		{
			throw new AnalysisFailedException("CPP2IL failed to recover any usable IL for this method.");
		}

		// Token: 0x060029AA RID: 10666 RVA: 0x0005AFD4 File Offset: 0x000591D4
		[Token(Token = "0x60029AA")]
		[Address(RVA = "0x1001890", Offset = "0x1000690", VA = "0x181001890", 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: 0x060029AB RID: 10667 RVA: 0x0005B020 File Offset: 0x00059220
		[Token(Token = "0x60029AB")]
		[Address(RVA = "0x1001940", Offset = "0x1000740", VA = "0x181001940", Slot = "29")]
		public override void OnSolverFrameBegin()
		{
			EventHandler onFrameBegin = this.OnFrameBegin;
			if (onFrameBegin != 0)
			{
				int num = 0;
				onFrameBegin(this, num);
				return;
			}
		}

		// Token: 0x060029AC RID: 10668 RVA: 0x000020D3 File Offset: 0x000002D3
		[Token(Token = "0x60029AC")]
		[Address(RVA = "0x10019B0", Offset = "0x10007B0", VA = "0x1810019B0", Slot = "26")]
		public override void OnSolverPreInterpolation()
		{
			throw new AnalysisFailedException("CPP2IL failed to recover any usable IL for this method.");
		}

		// Token: 0x060029AD RID: 10669 RVA: 0x0005B044 File Offset: 0x00059244
		[Token(Token = "0x60029AD")]
		[Address(RVA = "0x1001960", Offset = "0x1000760", VA = "0x181001960", 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: 0x060029AE RID: 10670 RVA: 0x000020D3 File Offset: 0x000002D3
		[Token(Token = "0x60029AE")]
		[Address(RVA = "0x1001B90", Offset = "0x1000990", VA = "0x181001B90", Slot = "28")]
		public override void OnSolverStepEnd()
		{
			throw new AnalysisFailedException("CPP2IL failed to recover any usable IL for this method.");
		}

		// Token: 0x060029AF RID: 10671 RVA: 0x0005B074 File Offset: 0x00059274
		[Token(Token = "0x60029AF")]
		[Address(RVA = "0x1001820", Offset = "0x1000620", VA = "0x181001820", Slot = "15")]
		public override void OnDestroy()
		{
			base.OnDestroy();
			UnityEngine.Object.DestroyImmediate(this.topology);
		}

		// Token: 0x060029B0 RID: 10672 RVA: 0x0005B094 File Offset: 0x00059294
		[Token(Token = "0x60029B0")]
		[Address(RVA = "0x10011E0", Offset = "0xFFFFE0", VA = "0x1810011E0", Slot = "32")]
		protected virtual void CallOnDeformableMeshSetup()
		{
			EventHandler onDeformableMeshSetup = this.OnDeformableMeshSetup;
			if (onDeformableMeshSetup != 0)
			{
				int num = 0;
				onDeformableMeshSetup(this, num);
				return;
			}
		}

		// Token: 0x060029B1 RID: 10673 RVA: 0x0005B0B8 File Offset: 0x000592B8
		[Token(Token = "0x60029B1")]
		[Address(RVA = "0x1001200", Offset = "0x1000000", VA = "0x181001200", Slot = "33")]
		protected virtual void CallOnDeformableMeshTearDown()
		{
			EventHandler onDeformableMeshTeardown = this.OnDeformableMeshTeardown;
			if (onDeformableMeshTeardown != 0)
			{
				int num = 0;
				onDeformableMeshTeardown(this, num);
				return;
			}
		}

		// Token: 0x060029B2 RID: 10674 RVA: 0x000020D3 File Offset: 0x000002D3
		[Token(Token = "0x60029B2")]
		[Address(RVA = "0x1001330", Offset = "0x1000130", VA = "0x181001330", Slot = "34")]
		public virtual void GetMeshDataArrays(Mesh mesh)
		{
			throw new AnalysisFailedException("CPP2IL failed to recover any usable IL for this method.");
		}

		// Token: 0x060029B3 RID: 10675 RVA: 0x000020D3 File Offset: 0x000002D3
		[Token(Token = "0x60029B3")]
		[Address(RVA = "0x1001620", Offset = "0x1000420", VA = "0x181001620")]
		protected void InitializeWithRegularMesh()
		{
			throw new AnalysisFailedException("CPP2IL failed to recover any usable IL for this method.");
		}

		// Token: 0x060029B4 RID: 10676
		[Token(Token = "0x60029B4")]
		[Address(Slot = "35")]
		public abstract IEnumerator GeneratePhysicRepresentationForMesh();

		// Token: 0x060029B5 RID: 10677 RVA: 0x000020D3 File Offset: 0x000002D3
		[Token(Token = "0x60029B5")]
		[Address(RVA = "0x1001220", Offset = "0x1000020", VA = "0x181001220", Slot = "36")]
		public virtual void CommitResultsToMesh()
		{
			throw new AnalysisFailedException("CPP2IL failed to recover any usable IL for this method.");
		}

		// Token: 0x060029B6 RID: 10678 RVA: 0x000020D3 File Offset: 0x000002D3
		[Token(Token = "0x60029B6")]
		[Address(RVA = "0x1002570", Offset = "0x1001370", VA = "0x181002570", Slot = "19")]
		public override void ResetActor()
		{
			throw new AnalysisFailedException("CPP2IL failed to recover any usable IL for this method.");
		}

		// Token: 0x060029B7 RID: 10679 RVA: 0x000020D3 File Offset: 0x000002D3
		[Token(Token = "0x60029B7")]
		[Address(RVA = "0x10022E0", Offset = "0x10010E0", VA = "0x1810022E0", 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: 0x060029B8 RID: 10680 RVA: 0x000020D3 File Offset: 0x000002D3
		[Token(Token = "0x60029B8")]
		[Address(RVA = "0x1001CB0", Offset = "0x1000AB0", VA = "0x181001CB0")]
		public void Optimize()
		{
			throw new AnalysisFailedException("CPP2IL failed to recover any usable IL for this method.");
		}

		// Token: 0x060029B9 RID: 10681 RVA: 0x000020D3 File Offset: 0x000002D3
		[Token(Token = "0x60029B9")]
		[Address(RVA = "0x10027E0", Offset = "0x10015E0", VA = "0x1810027E0")]
		public void Unoptimize()
		{
			throw new AnalysisFailedException("CPP2IL failed to recover any usable IL for this method.");
		}

		// Token: 0x060029BA RID: 10682 RVA: 0x0005B0DC File Offset: 0x000592DC
		[Token(Token = "0x60029BA")]
		[Address(RVA = "0x1002AA0", Offset = "0x10018A0", VA = "0x181002AA0")]
		protected ObiClothBase()
		{
			float[] array = new float[16];
			this.transformData = array;
			base..ctor();
		}

		// Token: 0x040032B5 RID: 12981
		[Token(Token = "0x40032B5")]
		public const float DEFAULT_PARTICLE_MASS = 0.1f;

		// Token: 0x040032BA RID: 12986
		[Cpp2IlInjected.FieldOffset(Offset = "0xC8")]
		[Token(Token = "0x40032BA")]
		[HideInInspector]
		[SerializeField]
		protected Oni.NormalsUpdate normalsUpdate;

		// Token: 0x040032BB RID: 12987
		[Cpp2IlInjected.FieldOffset(Offset = "0xCC")]
		[Token(Token = "0x40032BB")]
		[HideInInspector]
		[SerializeField]
		protected bool updateTangents;

		// Token: 0x040032BC RID: 12988
		[Cpp2IlInjected.FieldOffset(Offset = "0xD0")]
		[Token(Token = "0x40032BC")]
		[HideInInspector]
		[SerializeField]
		protected ObiMeshTopology sharedTopology;

		// Token: 0x040032BD RID: 12989
		[Cpp2IlInjected.FieldOffset(Offset = "0xD8")]
		[Token(Token = "0x40032BD")]
		[HideInInspector]
		public ObiMeshTopology topology;

		// Token: 0x040032BE RID: 12990
		[Cpp2IlInjected.FieldOffset(Offset = "0xE0")]
		[Token(Token = "0x40032BE")]
		[HideInInspector]
		public Mesh sharedMesh;

		// Token: 0x040032BF RID: 12991
		[Cpp2IlInjected.FieldOffset(Offset = "0xE8")]
		[Token(Token = "0x40032BF")]
		[HideInInspector]
		public Mesh clothMesh;

		// Token: 0x040032C0 RID: 12992
		[Cpp2IlInjected.FieldOffset(Offset = "0xF0")]
		[Token(Token = "0x40032C0")]
		protected MeshFilter meshFilter;

		// Token: 0x040032C1 RID: 12993
		[Cpp2IlInjected.FieldOffset(Offset = "0xF8")]
		[Token(Token = "0x40032C1")]
		protected MeshRenderer meshRenderer;

		// Token: 0x040032C2 RID: 12994
		[Cpp2IlInjected.FieldOffset(Offset = "0x100")]
		[Token(Token = "0x40032C2")]
		protected float[] transformData;

		// Token: 0x040032C3 RID: 12995
		[Cpp2IlInjected.FieldOffset(Offset = "0x108")]
		[Token(Token = "0x40032C3")]
		protected int[] meshTriangles;

		// Token: 0x040032C4 RID: 12996
		[Cpp2IlInjected.FieldOffset(Offset = "0x110")]
		[Token(Token = "0x40032C4")]
		protected Vector3[] meshVertices;

		// Token: 0x040032C5 RID: 12997
		[Cpp2IlInjected.FieldOffset(Offset = "0x118")]
		[Token(Token = "0x40032C5")]
		protected Vector3[] meshNormals;

		// Token: 0x040032C6 RID: 12998
		[Cpp2IlInjected.FieldOffset(Offset = "0x120")]
		[Token(Token = "0x40032C6")]
		protected Vector4[] meshTangents;

		// Token: 0x040032C7 RID: 12999
		[Cpp2IlInjected.FieldOffset(Offset = "0x128")]
		[Token(Token = "0x40032C7")]
		protected Quaternion[] orientation;

		// Token: 0x040032C8 RID: 13000
		[Cpp2IlInjected.FieldOffset(Offset = "0x130")]
		[Token(Token = "0x40032C8")]
		protected IntPtr deformableMesh;

		// Token: 0x040032C9 RID: 13001
		[Cpp2IlInjected.FieldOffset(Offset = "0x138")]
		[Token(Token = "0x40032C9")]
		protected GCHandle particleIndicesHandle;

		// Token: 0x040032CA RID: 13002
		[Cpp2IlInjected.FieldOffset(Offset = "0x13C")]
		[Token(Token = "0x40032CA")]
		protected GCHandle meshTrianglesHandle;

		// Token: 0x040032CB RID: 13003
		[Cpp2IlInjected.FieldOffset(Offset = "0x140")]
		[Token(Token = "0x40032CB")]
		protected GCHandle meshVerticesHandle;

		// Token: 0x040032CC RID: 13004
		[Cpp2IlInjected.FieldOffset(Offset = "0x144")]
		[Token(Token = "0x40032CC")]
		protected GCHandle meshNormalsHandle;

		// Token: 0x040032CD RID: 13005
		[Cpp2IlInjected.FieldOffset(Offset = "0x148")]
		[Token(Token = "0x40032CD")]
		protected GCHandle meshTangentsHandle;

		// Token: 0x040032CE RID: 13006
		[Cpp2IlInjected.FieldOffset(Offset = "0x150")]
		[Token(Token = "0x40032CE")]
		[HideInInspector]
		public float[] areaContribution;
	}
}
