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

namespace Obi
{
	// Token: 0x020004C6 RID: 1222
	[Token(Token = "0x20004C6")]
	public class ObiMeshTopology : ScriptableObject
	{
		// Token: 0x170002EE RID: 750
		// (get) Token: 0x06002B24 RID: 11044 RVA: 0x0005D838 File Offset: 0x0005BA38
		[Token(Token = "0x170002EE")]
		public bool Initialized
		{
			[Token(Token = "0x6002B24")]
			[Address(RVA = "0x468150", Offset = "0x466F50", VA = "0x180468150")]
			get
			{
				return this.initialized;
			}
		}

		// Token: 0x170002EF RID: 751
		// (get) Token: 0x06002B25 RID: 11045 RVA: 0x0005D84C File Offset: 0x0005BA4C
		[Token(Token = "0x170002EF")]
		public IntPtr HalfEdgeMesh
		{
			[Token(Token = "0x6002B25")]
			[Address(RVA = "0x31E490", Offset = "0x31D290", VA = "0x18031E490")]
			get
			{
				return this.halfEdgeMesh;
			}
		}

		// Token: 0x170002F0 RID: 752
		// (get) Token: 0x06002B27 RID: 11047 RVA: 0x0005D8D8 File Offset: 0x0005BAD8
		// (set) Token: 0x06002B26 RID: 11046 RVA: 0x0005D860 File Offset: 0x0005BA60
		[Token(Token = "0x170002F0")]
		public Mesh InputMesh
		{
			[Token(Token = "0x6002B27")]
			[Address(RVA = "0x2B4380", Offset = "0x2B3180", VA = "0x1802B4380")]
			get
			{
				return this.input;
			}
			[Token(Token = "0x6002B26")]
			[Address(RVA = "0x1013E20", Offset = "0x1012C20", VA = "0x181013E20")]
			set
			{
				Mesh mesh = this.input;
				if (value != mesh)
				{
					this.initialized = false;
					Oni.Face[] array = new Oni.Face[0];
					this.heFaces = array;
					Oni.Vertex[] array2 = new Oni.Vertex[0];
					this.heVertices = array2;
					Oni.HalfEdge[] array3 = new Oni.HalfEdge[0];
					this.heHalfEdges = array3;
					Quaternion[] array4 = new Quaternion[0];
					this.heOrientations = array4;
					int[] array5 = new int[0];
					this.visualMap = array5;
					this.input = value;
				}
			}
		}

		// Token: 0x170002F1 RID: 753
		// (get) Token: 0x06002B28 RID: 11048 RVA: 0x000020D3 File Offset: 0x000002D3
		[Token(Token = "0x170002F1")]
		public float MeshVolume
		{
			[Token(Token = "0x6002B28")]
			[Address(RVA = "0x1013E10", Offset = "0x1012C10", VA = "0x181013E10")]
			get
			{
				throw new AnalysisFailedException("CPP2IL failed to recover any usable IL for this method.");
			}
		}

		// Token: 0x170002F2 RID: 754
		// (get) Token: 0x06002B29 RID: 11049 RVA: 0x0005D8EC File Offset: 0x0005BAEC
		[Token(Token = "0x170002F2")]
		public float MeshArea
		{
			[Token(Token = "0x6002B29")]
			[Address(RVA = "0xBCA660", Offset = "0xBC9460", VA = "0x180BCA660")]
			get
			{
				return this.meshInfo.area;
			}
		}

		// Token: 0x170002F3 RID: 755
		// (get) Token: 0x06002B2A RID: 11050 RVA: 0x0005D904 File Offset: 0x0005BB04
		[Token(Token = "0x170002F3")]
		public int VertexCount
		{
			[Token(Token = "0x6002B2A")]
			[Address(RVA = "0x44D840", Offset = "0x44C640", VA = "0x18044D840")]
			get
			{
				return this.vertexCount;
			}
		}

		// Token: 0x170002F4 RID: 756
		// (get) Token: 0x06002B2B RID: 11051 RVA: 0x0005D918 File Offset: 0x0005BB18
		[Token(Token = "0x170002F4")]
		public int BorderEdgeCount
		{
			[Token(Token = "0x6002B2B")]
			[Address(RVA = "0x6FDBF0", Offset = "0x6FC9F0", VA = "0x1806FDBF0")]
			get
			{
				return this.meshInfo.borderEdgeCount;
			}
		}

		// Token: 0x170002F5 RID: 757
		// (get) Token: 0x06002B2C RID: 11052 RVA: 0x0005D930 File Offset: 0x0005BB30
		[Token(Token = "0x170002F5")]
		public bool IsClosed
		{
			[Token(Token = "0x6002B2C")]
			[Address(RVA = "0x3F9A10", Offset = "0x3F8810", VA = "0x1803F9A10")]
			get
			{
				return this.meshInfo.closed;
			}
		}

		// Token: 0x170002F6 RID: 758
		// (get) Token: 0x06002B2D RID: 11053 RVA: 0x000020D3 File Offset: 0x000002D3
		[Token(Token = "0x170002F6")]
		public bool IsModified
		{
			[Token(Token = "0x6002B2D")]
			[Address(RVA = "0x290BB0", Offset = "0x28F9B0", VA = "0x180290BB0")]
			get
			{
				throw new AnalysisFailedException("CPP2IL failed to recover any usable IL for this method.");
			}
		}

		// Token: 0x170002F7 RID: 759
		// (get) Token: 0x06002B2E RID: 11054 RVA: 0x0005D948 File Offset: 0x0005BB48
		[Token(Token = "0x170002F7")]
		public bool IsNonManifold
		{
			[Token(Token = "0x6002B2E")]
			[Address(RVA = "0x709B60", Offset = "0x708960", VA = "0x180709B60")]
			get
			{
				return this.meshInfo.nonManifold;
			}
		}

		// Token: 0x06002B2F RID: 11055 RVA: 0x000020D3 File Offset: 0x000002D3
		[Token(Token = "0x6002B2F")]
		[Address(RVA = "0x1013760", Offset = "0x1012560", VA = "0x181013760")]
		public void OnEnable()
		{
			throw new AnalysisFailedException("CPP2IL failed to recover any usable IL for this method.");
		}

		// Token: 0x06002B30 RID: 11056 RVA: 0x000020D3 File Offset: 0x000002D3
		[Token(Token = "0x6002B30")]
		[Address(RVA = "0x1012410", Offset = "0x1011210", VA = "0x181012410")]
		public void CopyDataFrom(ObiMeshTopology source)
		{
			throw new AnalysisFailedException("CPP2IL failed to recover any usable IL for this method.");
		}

		// Token: 0x06002B31 RID: 11057 RVA: 0x000020D3 File Offset: 0x000002D3
		[Token(Token = "0x6002B31")]
		[Address(RVA = "0x1013B70", Offset = "0x1012970", VA = "0x181013B70")]
		public void SetVertexCapacity(int maxVertices, int maxVisualVertices)
		{
			throw new AnalysisFailedException("CPP2IL failed to recover any usable IL for this method.");
		}

		// Token: 0x06002B32 RID: 11058 RVA: 0x0005D960 File Offset: 0x0005BB60
		[Token(Token = "0x6002B32")]
		[Address(RVA = "0x1013750", Offset = "0x1012550", VA = "0x181013750")]
		public void OnDisable()
		{
			Oni.DestroyHalfEdgeMesh(this.halfEdgeMesh);
		}

		// Token: 0x06002B33 RID: 11059 RVA: 0x0005D978 File Offset: 0x0005BB78
		[Token(Token = "0x6002B33")]
		[Address(RVA = "0x1013DB0", Offset = "0x1012BB0", VA = "0x181013DB0")]
		public void UpdateVertexCount()
		{
			int num = Oni.GetVertexCount(this.halfEdgeMesh);
			this.vertexCount = num;
		}

		// Token: 0x06002B34 RID: 11060 RVA: 0x000020D3 File Offset: 0x000002D3
		[Token(Token = "0x6002B34")]
		[Address(RVA = "0x10128C0", Offset = "0x10116C0", VA = "0x1810128C0")]
		public void Generate()
		{
			throw new AnalysisFailedException("CPP2IL failed to recover any usable IL for this method.");
		}

		// Token: 0x06002B35 RID: 11061 RVA: 0x000020D3 File Offset: 0x000002D3
		[Token(Token = "0x6002B35")]
		[Address(RVA = "0x1013350", Offset = "0x1012150", VA = "0x181013350")]
		public int GetHalfEdgeStartVertex(Oni.HalfEdge edge)
		{
			throw new AnalysisFailedException("CPP2IL failed to recover any usable IL for this method.");
		}

		// Token: 0x06002B36 RID: 11062 RVA: 0x000020D3 File Offset: 0x000002D3
		[Token(Token = "0x6002B36")]
		[Address(RVA = "0x1012EA0", Offset = "0x1011CA0", VA = "0x181012EA0")]
		public float GetFaceArea(Oni.Face face)
		{
			throw new AnalysisFailedException("CPP2IL failed to recover any usable IL for this method.");
		}

		// Token: 0x06002B37 RID: 11063 RVA: 0x000020D3 File Offset: 0x000002D3
		[Token(Token = "0x6002B37")]
		[Address(RVA = "0x1013530", Offset = "0x1012330", VA = "0x181013530")]
		public IEnumerable<Oni.Vertex> GetNeighbourVerticesEnumerator(Oni.Vertex vertex)
		{
			throw new AnalysisFailedException("CPP2IL failed to recover any usable IL for this method.");
		}

		// Token: 0x06002B38 RID: 11064 RVA: 0x000020D3 File Offset: 0x000002D3
		[Token(Token = "0x6002B38")]
		[Address(RVA = "0x1013410", Offset = "0x1012210", VA = "0x181013410")]
		public IEnumerable<Oni.HalfEdge> GetNeighbourEdgesEnumerator(Oni.Vertex vertex)
		{
			throw new AnalysisFailedException("CPP2IL failed to recover any usable IL for this method.");
		}

		// Token: 0x06002B39 RID: 11065 RVA: 0x000020D3 File Offset: 0x000002D3
		[Token(Token = "0x6002B39")]
		[Address(RVA = "0x10134A0", Offset = "0x10122A0", VA = "0x1810134A0")]
		public IEnumerable<Oni.Face> GetNeighbourFacesEnumerator(Oni.Vertex vertex)
		{
			throw new AnalysisFailedException("CPP2IL failed to recover any usable IL for this method.");
		}

		// Token: 0x06002B3A RID: 11066 RVA: 0x000020D3 File Offset: 0x000002D3
		[Token(Token = "0x6002B3A")]
		[Address(RVA = "0x10131E0", Offset = "0x1011FE0", VA = "0x1810131E0")]
		public int[] GetFaceEdges(Oni.Face face)
		{
			throw new AnalysisFailedException("CPP2IL failed to recover any usable IL for this method.");
		}

		// Token: 0x06002B3B RID: 11067 RVA: 0x000020D3 File Offset: 0x000002D3
		[Token(Token = "0x6002B3B")]
		[Address(RVA = "0x1012CA0", Offset = "0x1011AA0", VA = "0x181012CA0")]
		public List<ObiMeshTopology.HEEdge> GetEdgeList()
		{
			throw new AnalysisFailedException("CPP2IL failed to recover any usable IL for this method.");
		}

		// Token: 0x06002B3C RID: 11068 RVA: 0x000020D3 File Offset: 0x000002D3
		[Token(Token = "0x6002B3C")]
		[Address(RVA = "0x10135C0", Offset = "0x10123C0", VA = "0x1810135C0")]
		public bool IsSplit(int halfEdgeIndex)
		{
			throw new AnalysisFailedException("CPP2IL failed to recover any usable IL for this method.");
		}

		// Token: 0x06002B3D RID: 11069 RVA: 0x0005D998 File Offset: 0x0005BB98
		[Token(Token = "0x6002B3D")]
		[Address(RVA = "0x1013DD0", Offset = "0x1012BD0", VA = "0x181013DD0")]
		public ObiMeshTopology()
		{
			float z = Vector3.one.z;
			this.scale.z = z;
			base..ctor();
		}

		// Token: 0x040033A2 RID: 13218
		[Cpp2IlInjected.FieldOffset(Offset = "0x18")]
		[Token(Token = "0x40033A2")]
		public Mesh input;

		// Token: 0x040033A3 RID: 13219
		[Cpp2IlInjected.FieldOffset(Offset = "0x20")]
		[Token(Token = "0x40033A3")]
		public Vector3 scale;

		// Token: 0x040033A4 RID: 13220
		[Cpp2IlInjected.FieldOffset(Offset = "0x2C")]
		[Token(Token = "0x40033A4")]
		[HideInInspector]
		public bool initialized;

		// Token: 0x040033A5 RID: 13221
		[Cpp2IlInjected.FieldOffset(Offset = "0x30")]
		[Token(Token = "0x40033A5")]
		private IntPtr halfEdgeMesh;

		// Token: 0x040033A6 RID: 13222
		[Cpp2IlInjected.FieldOffset(Offset = "0x38")]
		[Token(Token = "0x40033A6")]
		[SerializeField]
		[HideInInspector]
		protected int vertexCount;

		// Token: 0x040033A7 RID: 13223
		[Cpp2IlInjected.FieldOffset(Offset = "0x40")]
		[Token(Token = "0x40033A7")]
		[HideInInspector]
		public Oni.Face[] heFaces;

		// Token: 0x040033A8 RID: 13224
		[Cpp2IlInjected.FieldOffset(Offset = "0x48")]
		[Token(Token = "0x40033A8")]
		[HideInInspector]
		public Oni.HalfEdge[] heHalfEdges;

		// Token: 0x040033A9 RID: 13225
		[Cpp2IlInjected.FieldOffset(Offset = "0x50")]
		[Token(Token = "0x40033A9")]
		[HideInInspector]
		public Oni.Vertex[] heVertices;

		// Token: 0x040033AA RID: 13226
		[Cpp2IlInjected.FieldOffset(Offset = "0x58")]
		[Token(Token = "0x40033AA")]
		[HideInInspector]
		public Quaternion[] heOrientations;

		// Token: 0x040033AB RID: 13227
		[Cpp2IlInjected.FieldOffset(Offset = "0x60")]
		[Token(Token = "0x40033AB")]
		[HideInInspector]
		public Vector3[] normals;

		// Token: 0x040033AC RID: 13228
		[Cpp2IlInjected.FieldOffset(Offset = "0x68")]
		[Token(Token = "0x40033AC")]
		[HideInInspector]
		public Vector4[] tangents;

		// Token: 0x040033AD RID: 13229
		[Cpp2IlInjected.FieldOffset(Offset = "0x70")]
		[Token(Token = "0x40033AD")]
		[HideInInspector]
		public int[] visualMap;

		// Token: 0x040033AE RID: 13230
		[Cpp2IlInjected.FieldOffset(Offset = "0x78")]
		[Token(Token = "0x40033AE")]
		[HideInInspector]
		[SerializeField]
		protected Oni.MeshInformation meshInfo;

		// Token: 0x040033AF RID: 13231
		[Cpp2IlInjected.FieldOffset(Offset = "0x88")]
		[Token(Token = "0x40033AF")]
		private GCHandle facesHandle;

		// Token: 0x040033B0 RID: 13232
		[Cpp2IlInjected.FieldOffset(Offset = "0x8C")]
		[Token(Token = "0x40033B0")]
		private GCHandle halfEdgesHandle;

		// Token: 0x040033B1 RID: 13233
		[Cpp2IlInjected.FieldOffset(Offset = "0x90")]
		[Token(Token = "0x40033B1")]
		private GCHandle verticesHandle;

		// Token: 0x040033B2 RID: 13234
		[Cpp2IlInjected.FieldOffset(Offset = "0x94")]
		[Token(Token = "0x40033B2")]
		private GCHandle orientationsHandle;

		// Token: 0x040033B3 RID: 13235
		[Cpp2IlInjected.FieldOffset(Offset = "0x98")]
		[Token(Token = "0x40033B3")]
		private GCHandle visualMapHandle;

		// Token: 0x040033B4 RID: 13236
		[Cpp2IlInjected.FieldOffset(Offset = "0x9C")]
		[Token(Token = "0x40033B4")]
		private GCHandle normalsHandle;

		// Token: 0x040033B5 RID: 13237
		[Cpp2IlInjected.FieldOffset(Offset = "0xA0")]
		[Token(Token = "0x40033B5")]
		private GCHandle tangentsHandle;

		// Token: 0x020004C7 RID: 1223
		[Token(Token = "0x20004C7")]
		public class HEEdge
		{
			// Token: 0x06002B3E RID: 11070 RVA: 0x0005D9C4 File Offset: 0x0005BBC4
			[Token(Token = "0x6002B3E")]
			[Address(RVA = "0x457380", Offset = "0x456180", VA = "0x180457380")]
			public HEEdge(int halfEdgeIndex)
			{
				this.halfEdgeIndex = halfEdgeIndex;
			}

			// Token: 0x040033B6 RID: 13238
			[Cpp2IlInjected.FieldOffset(Offset = "0x10")]
			[Token(Token = "0x40033B6")]
			public int halfEdgeIndex;
		}
	}
}
