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

namespace Obi
{
	// Token: 0x020004E8 RID: 1256
	[Token(Token = "0x20004E8")]
	[DisallowMultipleComponent]
	[ExecuteInEditMode]
	[AddComponentMenu("Physics/Obi/Obi Cloth")]
	[RequireComponent(typeof(ObiSkinConstraints))]
	[RequireComponent(typeof(ObiVolumeConstraints))]
	[RequireComponent(typeof(ObiTetherConstraints))]
	public class ObiCloth : ObiClothBase
	{
		// Token: 0x170002DD RID: 733
		// (get) Token: 0x06002C3A RID: 11322 RVA: 0x000020D3 File Offset: 0x000002D3
		[Token(Token = "0x170002DD")]
		public ObiSkinConstraints SkinConstraints
		{
			[Token(Token = "0x6002C3A")]
			[Address(RVA = "0x109D730", Offset = "0x109C730", VA = "0x18109D730")]
			get
			{
				throw new AnalysisFailedException("CPP2IL failed to recover any usable IL for this method.");
			}
		}

		// Token: 0x170002DE RID: 734
		// (get) Token: 0x06002C3B RID: 11323 RVA: 0x000020D3 File Offset: 0x000002D3
		[Token(Token = "0x170002DE")]
		public ObiVolumeConstraints VolumeConstraints
		{
			[Token(Token = "0x6002C3B")]
			[Address(RVA = "0x109D890", Offset = "0x109C890", VA = "0x18109D890")]
			get
			{
				throw new AnalysisFailedException("CPP2IL failed to recover any usable IL for this method.");
			}
		}

		// Token: 0x170002DF RID: 735
		// (get) Token: 0x06002C3C RID: 11324 RVA: 0x000020D3 File Offset: 0x000002D3
		[Token(Token = "0x170002DF")]
		public ObiTetherConstraints TetherConstraints
		{
			[Token(Token = "0x6002C3C")]
			[Address(RVA = "0x109D7E0", Offset = "0x109C7E0", VA = "0x18109D7E0")]
			get
			{
				throw new AnalysisFailedException("CPP2IL failed to recover any usable IL for this method.");
			}
		}

		// Token: 0x170002E0 RID: 736
		// (get) Token: 0x06002C3D RID: 11325 RVA: 0x0006203C File Offset: 0x0006023C
		[Token(Token = "0x170002E0")]
		public bool IsSkinned
		{
			[Token(Token = "0x6002C3D")]
			[Address(RVA = "0x109D670", Offset = "0x109C670", VA = "0x18109D670")]
			get
			{
				SkinnedMeshRenderer skinnedMeshRenderer = this.skinnedMeshRenderer;
				int num = 0;
				bool flag = skinnedMeshRenderer != num;
				if (!flag)
				{
					return flag;
				}
				Transform rootBone = this.skinnedMeshRenderer.rootBone;
				int num2 = 0;
				return rootBone != num2;
			}
		}

		// Token: 0x170002E1 RID: 737
		// (get) Token: 0x06002C3E RID: 11326 RVA: 0x000020D3 File Offset: 0x000002D3
		[Token(Token = "0x170002E1")]
		public override Matrix4x4 ActorLocalToWorldMatrix
		{
			[Token(Token = "0x6002C3E")]
			[Address(RVA = "0x109D400", Offset = "0x109C400", VA = "0x18109D400", Slot = "10")]
			get
			{
				throw new AnalysisFailedException("CPP2IL failed to recover any usable IL for this method.");
			}
		}

		// Token: 0x170002E2 RID: 738
		// (get) Token: 0x06002C3F RID: 11327 RVA: 0x000020D3 File Offset: 0x000002D3
		[Token(Token = "0x170002E2")]
		public override Matrix4x4 ActorWorldToLocalMatrix
		{
			[Token(Token = "0x6002C3F")]
			[Address(RVA = "0x109D5E0", Offset = "0x109C5E0", VA = "0x18109D5E0", Slot = "11")]
			get
			{
				throw new AnalysisFailedException("CPP2IL failed to recover any usable IL for this method.");
			}
		}

		// Token: 0x06002C40 RID: 11328 RVA: 0x000020D3 File Offset: 0x000002D3
		[Token(Token = "0x6002C40")]
		[Address(RVA = "0x109AC80", Offset = "0x1099C80", VA = "0x18109AC80", Slot = "13")]
		public override void Awake()
		{
			throw new AnalysisFailedException("CPP2IL failed to recover any usable IL for this method.");
		}

		// Token: 0x06002C41 RID: 11329 RVA: 0x00062080 File Offset: 0x00060280
		[Token(Token = "0x6002C41")]
		[Address(RVA = "0x109AF30", Offset = "0x1099F30", VA = "0x18109AF30")]
		private void FindRootboneBindpose()
		{
			if (this.IsSkinned)
			{
				SkinnedMeshRenderer skinnedMeshRenderer = this.skinnedMeshRenderer;
				int num = 0;
				Transform[] bones = skinnedMeshRenderer.bones;
				if (num < bones.Length)
				{
					Transform transform = this.skinnedMeshRenderer.bones[num];
					Transform rootBone = this.skinnedMeshRenderer.rootBone;
					if (!(transform == rootBone))
					{
						SkinnedMeshRenderer skinnedMeshRenderer2 = this.skinnedMeshRenderer;
						num++;
					}
					this.rootBindPoseIndex = num;
				}
			}
		}

		// Token: 0x06002C42 RID: 11330 RVA: 0x000620F4 File Offset: 0x000602F4
		[Token(Token = "0x6002C42")]
		[Address(RVA = "0x109D2A0", Offset = "0x109C2A0", VA = "0x18109D2A0")]
		private void SetupAnimatorController()
		{
			if (this.IsSkinned)
			{
				Animator componentInParent = base.GetComponentInParent<Animator>();
				int num = 0;
				if (componentInParent != num)
				{
					ObiAnimatorController component = componentInParent.GetComponent<ObiAnimatorController>();
					this.animatorController = component;
					ObiAnimatorController obiAnimatorController = this.animatorController;
					int num2 = 0;
					if (obiAnimatorController == num2)
					{
						ObiAnimatorController obiAnimatorController2 = componentInParent.gameObject.AddComponent<ObiAnimatorController>();
						this.animatorController = obiAnimatorController2;
					}
				}
			}
		}

		// Token: 0x06002C43 RID: 11331 RVA: 0x000020D3 File Offset: 0x000002D3
		[Token(Token = "0x6002C43")]
		[Address(RVA = "0x109C8C0", Offset = "0x109B8C0", VA = "0x18109C8C0", Slot = "17")]
		public override void OnEnable()
		{
			throw new AnalysisFailedException("CPP2IL failed to recover any usable IL for this method.");
		}

		// Token: 0x06002C44 RID: 11332 RVA: 0x0006215C File Offset: 0x0006035C
		[Token(Token = "0x6002C44")]
		[Address(RVA = "0x109C7B0", Offset = "0x109B7B0", VA = "0x18109C7B0", 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 sharedMesh = this.sharedMesh;
				meshFilter2.mesh = sharedMesh;
			}
			SkinnedMeshRenderer skinnedMeshRenderer = this.skinnedMeshRenderer;
			int num2 = 0;
			if (skinnedMeshRenderer != num2)
			{
				SkinnedMeshRenderer skinnedMeshRenderer2 = this.skinnedMeshRenderer;
				Mesh sharedMesh2 = this.sharedMesh;
				skinnedMeshRenderer2.sharedMesh = sharedMesh2;
			}
		}

		// Token: 0x06002C45 RID: 11333 RVA: 0x000020D3 File Offset: 0x000002D3
		[Token(Token = "0x6002C45")]
		[Address(RVA = "0x109A3D0", Offset = "0x10993D0", VA = "0x18109A3D0", Slot = "21")]
		public override bool AddToSolver(object info)
		{
			throw new AnalysisFailedException("CPP2IL failed to recover any usable IL for this method.");
		}

		// Token: 0x06002C46 RID: 11334 RVA: 0x000020D3 File Offset: 0x000002D3
		[Token(Token = "0x6002C46")]
		[Address(RVA = "0x109CDE0", Offset = "0x109BDE0", VA = "0x18109CDE0", Slot = "22")]
		public override bool RemoveFromSolver(object info)
		{
			throw new AnalysisFailedException("CPP2IL failed to recover any usable IL for this method.");
		}

		// Token: 0x06002C47 RID: 11335 RVA: 0x000020D3 File Offset: 0x000002D3
		[Token(Token = "0x6002C47")]
		[Address(RVA = "0x109D010", Offset = "0x109C010", VA = "0x18109D010")]
		protected void SetSkinnedMeshAnimationInfo()
		{
			throw new AnalysisFailedException("CPP2IL failed to recover any usable IL for this method.");
		}

		// Token: 0x06002C48 RID: 11336 RVA: 0x000020D3 File Offset: 0x000002D3
		[Token(Token = "0x6002C48")]
		[Address(RVA = "0x109C640", Offset = "0x109B640", VA = "0x18109C640")]
		protected void InitializeWithSkinnedMesh()
		{
			throw new AnalysisFailedException("CPP2IL failed to recover any usable IL for this method.");
		}

		// Token: 0x06002C49 RID: 11337 RVA: 0x000020D3 File Offset: 0x000002D3
		[Token(Token = "0x6002C49")]
		[Address(RVA = "0x109B860", Offset = "0x109A860", VA = "0x18109B860", Slot = "35")]
		public override IEnumerator GeneratePhysicRepresentationForMesh()
		{
			throw new AnalysisFailedException("CPP2IL failed to recover any usable IL for this method.");
		}

		// Token: 0x06002C4A RID: 11338 RVA: 0x000020D3 File Offset: 0x000002D3
		[Token(Token = "0x6002C4A")]
		[Address(RVA = "0x109CAA0", Offset = "0x109BAA0", VA = "0x18109CAA0", Slot = "27")]
		public override void OnSolverStepBegin()
		{
			throw new AnalysisFailedException("CPP2IL failed to recover any usable IL for this method.");
		}

		// Token: 0x06002C4B RID: 11339 RVA: 0x000020D3 File Offset: 0x000002D3
		[Token(Token = "0x6002C4B")]
		[Address(RVA = "0x109CC50", Offset = "0x109BC50", VA = "0x18109CC50", Slot = "28")]
		public override void OnSolverStepEnd()
		{
			throw new AnalysisFailedException("CPP2IL failed to recover any usable IL for this method.");
		}

		// Token: 0x06002C4C RID: 11340 RVA: 0x000020D3 File Offset: 0x000002D3
		[Token(Token = "0x6002C4C")]
		[Address(RVA = "0x109A840", Offset = "0x1099840", VA = "0x18109A840")]
		public void ApplyWorldSpaceVelocity()
		{
			throw new AnalysisFailedException("CPP2IL failed to recover any usable IL for this method.");
		}

		// Token: 0x06002C4D RID: 11341 RVA: 0x000020D3 File Offset: 0x000002D3
		[Token(Token = "0x6002C4D")]
		[Address(RVA = "0x109C2B0", Offset = "0x109B2B0", VA = "0x18109C2B0")]
		public void GrabSkeletonBones()
		{
			throw new AnalysisFailedException("CPP2IL failed to recover any usable IL for this method.");
		}

		// Token: 0x06002C4E RID: 11342 RVA: 0x000020D3 File Offset: 0x000002D3
		[Token(Token = "0x6002C4E")]
		[Address(RVA = "0x109B070", Offset = "0x109A070", VA = "0x18109B070")]
		private List<HashSet<int>> GenerateIslands(IEnumerable<int> particles, bool onlyFixed)
		{
			throw new AnalysisFailedException("CPP2IL failed to recover any usable IL for this method.");
		}

		// Token: 0x06002C4F RID: 11343 RVA: 0x000020D3 File Offset: 0x000002D3
		[Token(Token = "0x6002C4F")]
		[Address(RVA = "0x109B8D0", Offset = "0x109A8D0", VA = "0x18109B8D0")]
		private void GenerateTethersForIsland(HashSet<int> particles, int maxTethers)
		{
			throw new AnalysisFailedException("CPP2IL failed to recover any usable IL for this method.");
		}

		// Token: 0x06002C50 RID: 11344 RVA: 0x000020D3 File Offset: 0x000002D3
		[Token(Token = "0x6002C50")]
		[Address(RVA = "0x109C140", Offset = "0x109B140", VA = "0x18109C140", Slot = "25")]
		public override bool GenerateTethers(ObiActor.TetherType type)
		{
			throw new AnalysisFailedException("CPP2IL failed to recover any usable IL for this method.");
		}

		// Token: 0x06002C51 RID: 11345 RVA: 0x000621D8 File Offset: 0x000603D8
		[Token(Token = "0x6002C51")]
		[Address(RVA = "0x1095DD0", Offset = "0x1094DD0", VA = "0x181095DD0")]
		public ObiCloth()
		{
			float[] array = new float[16];
			this.transformData = array;
			base..ctor();
		}

		// Token: 0x0400358E RID: 13710
		[FieldOffset(Offset = "0x158")]
		[Token(Token = "0x400358E")]
		protected SkinnedMeshRenderer skinnedMeshRenderer;

		// Token: 0x0400358F RID: 13711
		[FieldOffset(Offset = "0x160")]
		[Token(Token = "0x400358F")]
		protected ObiAnimatorController animatorController;

		// Token: 0x04003590 RID: 13712
		[FieldOffset(Offset = "0x168")]
		[Token(Token = "0x4003590")]
		protected int rootBindPoseIndex;
	}
}
