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

namespace Obi
{
	// Token: 0x02000490 RID: 1168
	[Token(Token = "0x2000490")]
	[ExecuteInEditMode]
	[DisallowMultipleComponent]
	[RequireComponent(typeof(ObiTetherConstraints))]
	[RequireComponent(typeof(ObiVolumeConstraints))]
	[RequireComponent(typeof(ObiSkinConstraints))]
	[AddComponentMenu("Physics/Obi/Obi Cloth")]
	public class ObiCloth : ObiClothBase
	{
		// Token: 0x170002B8 RID: 696
		// (get) Token: 0x06002971 RID: 10609 RVA: 0x000020D3 File Offset: 0x000002D3
		[Token(Token = "0x170002B8")]
		public ObiSkinConstraints SkinConstraints
		{
			[Token(Token = "0x6002971")]
			[Address(RVA = "0x100A400", Offset = "0x1009200", VA = "0x18100A400")]
			get
			{
				throw new AnalysisFailedException("CPP2IL failed to recover any usable IL for this method.");
			}
		}

		// Token: 0x170002B9 RID: 697
		// (get) Token: 0x06002972 RID: 10610 RVA: 0x000020D3 File Offset: 0x000002D3
		[Token(Token = "0x170002B9")]
		public ObiVolumeConstraints VolumeConstraints
		{
			[Token(Token = "0x6002972")]
			[Address(RVA = "0x100A560", Offset = "0x1009360", VA = "0x18100A560")]
			get
			{
				throw new AnalysisFailedException("CPP2IL failed to recover any usable IL for this method.");
			}
		}

		// Token: 0x170002BA RID: 698
		// (get) Token: 0x06002973 RID: 10611 RVA: 0x000020D3 File Offset: 0x000002D3
		[Token(Token = "0x170002BA")]
		public ObiTetherConstraints TetherConstraints
		{
			[Token(Token = "0x6002973")]
			[Address(RVA = "0x100A4B0", Offset = "0x10092B0", VA = "0x18100A4B0")]
			get
			{
				throw new AnalysisFailedException("CPP2IL failed to recover any usable IL for this method.");
			}
		}

		// Token: 0x170002BB RID: 699
		// (get) Token: 0x06002974 RID: 10612 RVA: 0x0005AC78 File Offset: 0x00058E78
		[Token(Token = "0x170002BB")]
		public bool IsSkinned
		{
			[Token(Token = "0x6002974")]
			[Address(RVA = "0x100A340", Offset = "0x1009140", VA = "0x18100A340")]
			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: 0x170002BC RID: 700
		// (get) Token: 0x06002975 RID: 10613 RVA: 0x000020D3 File Offset: 0x000002D3
		[Token(Token = "0x170002BC")]
		public override Matrix4x4 ActorLocalToWorldMatrix
		{
			[Token(Token = "0x6002975")]
			[Address(RVA = "0x100A0D0", Offset = "0x1008ED0", VA = "0x18100A0D0", Slot = "10")]
			get
			{
				throw new AnalysisFailedException("CPP2IL failed to recover any usable IL for this method.");
			}
		}

		// Token: 0x170002BD RID: 701
		// (get) Token: 0x06002976 RID: 10614 RVA: 0x000020D3 File Offset: 0x000002D3
		[Token(Token = "0x170002BD")]
		public override Matrix4x4 ActorWorldToLocalMatrix
		{
			[Token(Token = "0x6002976")]
			[Address(RVA = "0x100A2B0", Offset = "0x10090B0", VA = "0x18100A2B0", Slot = "11")]
			get
			{
				throw new AnalysisFailedException("CPP2IL failed to recover any usable IL for this method.");
			}
		}

		// Token: 0x06002977 RID: 10615 RVA: 0x000020D3 File Offset: 0x000002D3
		[Token(Token = "0x6002977")]
		[Address(RVA = "0x1007950", Offset = "0x1006750", VA = "0x181007950", Slot = "13")]
		public override void Awake()
		{
			throw new AnalysisFailedException("CPP2IL failed to recover any usable IL for this method.");
		}

		// Token: 0x06002978 RID: 10616 RVA: 0x0005ACBC File Offset: 0x00058EBC
		[Token(Token = "0x6002978")]
		[Address(RVA = "0x1007C00", Offset = "0x1006A00", VA = "0x181007C00")]
		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: 0x06002979 RID: 10617 RVA: 0x0005AD30 File Offset: 0x00058F30
		[Token(Token = "0x6002979")]
		[Address(RVA = "0x1009F70", Offset = "0x1008D70", VA = "0x181009F70")]
		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: 0x0600297A RID: 10618 RVA: 0x000020D3 File Offset: 0x000002D3
		[Token(Token = "0x600297A")]
		[Address(RVA = "0x1009590", Offset = "0x1008390", VA = "0x181009590", Slot = "17")]
		public override void OnEnable()
		{
			throw new AnalysisFailedException("CPP2IL failed to recover any usable IL for this method.");
		}

		// Token: 0x0600297B RID: 10619 RVA: 0x0005AD98 File Offset: 0x00058F98
		[Token(Token = "0x600297B")]
		[Address(RVA = "0x1009480", Offset = "0x1008280", VA = "0x181009480", 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: 0x0600297C RID: 10620 RVA: 0x000020D3 File Offset: 0x000002D3
		[Token(Token = "0x600297C")]
		[Address(RVA = "0x10070A0", Offset = "0x1005EA0", VA = "0x1810070A0", Slot = "21")]
		public override bool AddToSolver(object info)
		{
			throw new AnalysisFailedException("CPP2IL failed to recover any usable IL for this method.");
		}

		// Token: 0x0600297D RID: 10621 RVA: 0x000020D3 File Offset: 0x000002D3
		[Token(Token = "0x600297D")]
		[Address(RVA = "0x1009AB0", Offset = "0x10088B0", VA = "0x181009AB0", Slot = "22")]
		public override bool RemoveFromSolver(object info)
		{
			throw new AnalysisFailedException("CPP2IL failed to recover any usable IL for this method.");
		}

		// Token: 0x0600297E RID: 10622 RVA: 0x000020D3 File Offset: 0x000002D3
		[Token(Token = "0x600297E")]
		[Address(RVA = "0x1009CE0", Offset = "0x1008AE0", VA = "0x181009CE0")]
		protected void SetSkinnedMeshAnimationInfo()
		{
			throw new AnalysisFailedException("CPP2IL failed to recover any usable IL for this method.");
		}

		// Token: 0x0600297F RID: 10623 RVA: 0x000020D3 File Offset: 0x000002D3
		[Token(Token = "0x600297F")]
		[Address(RVA = "0x1009310", Offset = "0x1008110", VA = "0x181009310")]
		protected void InitializeWithSkinnedMesh()
		{
			throw new AnalysisFailedException("CPP2IL failed to recover any usable IL for this method.");
		}

		// Token: 0x06002980 RID: 10624 RVA: 0x000020D3 File Offset: 0x000002D3
		[Token(Token = "0x6002980")]
		[Address(RVA = "0x1008530", Offset = "0x1007330", VA = "0x181008530", Slot = "35")]
		public override IEnumerator GeneratePhysicRepresentationForMesh()
		{
			throw new AnalysisFailedException("CPP2IL failed to recover any usable IL for this method.");
		}

		// Token: 0x06002981 RID: 10625 RVA: 0x000020D3 File Offset: 0x000002D3
		[Token(Token = "0x6002981")]
		[Address(RVA = "0x1009770", Offset = "0x1008570", VA = "0x181009770", Slot = "27")]
		public override void OnSolverStepBegin()
		{
			throw new AnalysisFailedException("CPP2IL failed to recover any usable IL for this method.");
		}

		// Token: 0x06002982 RID: 10626 RVA: 0x000020D3 File Offset: 0x000002D3
		[Token(Token = "0x6002982")]
		[Address(RVA = "0x1009920", Offset = "0x1008720", VA = "0x181009920", Slot = "28")]
		public override void OnSolverStepEnd()
		{
			throw new AnalysisFailedException("CPP2IL failed to recover any usable IL for this method.");
		}

		// Token: 0x06002983 RID: 10627 RVA: 0x000020D3 File Offset: 0x000002D3
		[Token(Token = "0x6002983")]
		[Address(RVA = "0x1007510", Offset = "0x1006310", VA = "0x181007510")]
		public void ApplyWorldSpaceVelocity()
		{
			throw new AnalysisFailedException("CPP2IL failed to recover any usable IL for this method.");
		}

		// Token: 0x06002984 RID: 10628 RVA: 0x000020D3 File Offset: 0x000002D3
		[Token(Token = "0x6002984")]
		[Address(RVA = "0x1008F80", Offset = "0x1007D80", VA = "0x181008F80")]
		public void GrabSkeletonBones()
		{
			throw new AnalysisFailedException("CPP2IL failed to recover any usable IL for this method.");
		}

		// Token: 0x06002985 RID: 10629 RVA: 0x000020D3 File Offset: 0x000002D3
		[Token(Token = "0x6002985")]
		[Address(RVA = "0x1007D40", Offset = "0x1006B40", VA = "0x181007D40")]
		private List<HashSet<int>> GenerateIslands(IEnumerable<int> particles, bool onlyFixed)
		{
			throw new AnalysisFailedException("CPP2IL failed to recover any usable IL for this method.");
		}

		// Token: 0x06002986 RID: 10630 RVA: 0x000020D3 File Offset: 0x000002D3
		[Token(Token = "0x6002986")]
		[Address(RVA = "0x10085A0", Offset = "0x10073A0", VA = "0x1810085A0")]
		private void GenerateTethersForIsland(HashSet<int> particles, int maxTethers)
		{
			throw new AnalysisFailedException("CPP2IL failed to recover any usable IL for this method.");
		}

		// Token: 0x06002987 RID: 10631 RVA: 0x000020D3 File Offset: 0x000002D3
		[Token(Token = "0x6002987")]
		[Address(RVA = "0x1008E10", Offset = "0x1007C10", VA = "0x181008E10", Slot = "25")]
		public override bool GenerateTethers(ObiActor.TetherType type)
		{
			throw new AnalysisFailedException("CPP2IL failed to recover any usable IL for this method.");
		}

		// Token: 0x06002988 RID: 10632 RVA: 0x0005AE14 File Offset: 0x00059014
		[Token(Token = "0x6002988")]
		[Address(RVA = "0x1002AA0", Offset = "0x10018A0", VA = "0x181002AA0")]
		public ObiCloth()
		{
			float[] array = new float[16];
			this.transformData = array;
			base..ctor();
		}

		// Token: 0x040032A4 RID: 12964
		[FieldOffset(Offset = "0x158")]
		[Token(Token = "0x40032A4")]
		protected SkinnedMeshRenderer skinnedMeshRenderer;

		// Token: 0x040032A5 RID: 12965
		[FieldOffset(Offset = "0x160")]
		[Token(Token = "0x40032A5")]
		protected ObiAnimatorController animatorController;

		// Token: 0x040032A6 RID: 12966
		[FieldOffset(Offset = "0x168")]
		[Token(Token = "0x40032A6")]
		protected int rootBindPoseIndex;
	}
}
