using System;
using Cpp2IlInjected;

namespace MTAssets.UltimateLODSystem.MeshSimplifier.Internal
{
	// Token: 0x0200066C RID: 1644
	[Token(Token = "0x200066C")]
	internal struct Triangle : IEquatable<Triangle>
	{
		// Token: 0x170003E2 RID: 994
		[Token(Token = "0x170003E2")]
		public int this[int index]
		{
			[Token(Token = "0x60033CD")]
			[Address(RVA = "0xF69E00", Offset = "0xF68E00", VA = "0x180F69E00")]
			get
			{
				if (index == 0)
				{
					return this.v0;
				}
				if (index == 1)
				{
					return this.v1;
				}
				return this.v2;
			}
			[Token(Token = "0x60033CE")]
			[Address(RVA = "0x4159E0", Offset = "0x4149E0", VA = "0x1804159E0")]
			set
			{
				/*
An exception occurred when decompiling this method (060033CE)

ICSharpCode.Decompiler.DecompilerException: Error decompiling System.Void MTAssets.UltimateLODSystem.MeshSimplifier.Internal.Triangle::set_Item(System.Int32,System.Int32)

 ---> System.Exception: Basic block has to end with unconditional control flow. 
{; 	IL_24:; 	stloc:ArgumentOutOfRangeException(var_0_2E, newobj:ArgumentOutOfRangeException(ArgumentOutOfRangeException::.ctor, ldstr:string("index"))); }; 
   at ICSharpCode.Decompiler.ILAst.ILAstOptimizer.FlattenBasicBlocks(ILNode node) in D:\a\dnSpy\dnSpy\Extensions\ILSpy.Decompiler\ICSharpCode.Decompiler\ICSharpCode.Decompiler\ILAst\ILAstOptimizer.cs:line 1810
   at ICSharpCode.Decompiler.ILAst.ILAstOptimizer.FlattenBasicBlocks(ILNode node) in D:\a\dnSpy\dnSpy\Extensions\ILSpy.Decompiler\ICSharpCode.Decompiler\ICSharpCode.Decompiler\ILAst\ILAstOptimizer.cs:line 1836
   at ICSharpCode.Decompiler.ILAst.ILAstOptimizer.FlattenBasicBlocks(ILNode node) in D:\a\dnSpy\dnSpy\Extensions\ILSpy.Decompiler\ICSharpCode.Decompiler\ICSharpCode.Decompiler\ILAst\ILAstOptimizer.cs:line 1836
   at ICSharpCode.Decompiler.ILAst.ILAstOptimizer.FlattenBasicBlocks(ILNode node) in D:\a\dnSpy\dnSpy\Extensions\ILSpy.Decompiler\ICSharpCode.Decompiler\ICSharpCode.Decompiler\ILAst\ILAstOptimizer.cs:line 1804
   at ICSharpCode.Decompiler.ILAst.ILAstOptimizer.FlattenBasicBlocks(ILNode node) in D:\a\dnSpy\dnSpy\Extensions\ILSpy.Decompiler\ICSharpCode.Decompiler\ICSharpCode.Decompiler\ILAst\ILAstOptimizer.cs:line 1836
   at ICSharpCode.Decompiler.ILAst.ILAstOptimizer.FlattenBasicBlocks(ILNode node) in D:\a\dnSpy\dnSpy\Extensions\ILSpy.Decompiler\ICSharpCode.Decompiler\ICSharpCode.Decompiler\ILAst\ILAstOptimizer.cs:line 1836
   at ICSharpCode.Decompiler.ILAst.ILAstOptimizer.FlattenBasicBlocks(ILNode node) in D:\a\dnSpy\dnSpy\Extensions\ILSpy.Decompiler\ICSharpCode.Decompiler\ICSharpCode.Decompiler\ILAst\ILAstOptimizer.cs:line 1804
   at ICSharpCode.Decompiler.ILAst.ILAstOptimizer.FlattenBasicBlocks(ILNode node) in D:\a\dnSpy\dnSpy\Extensions\ILSpy.Decompiler\ICSharpCode.Decompiler\ICSharpCode.Decompiler\ILAst\ILAstOptimizer.cs:line 1836
   at ICSharpCode.Decompiler.ILAst.ILAstOptimizer.FlattenBasicBlocks(ILNode node) in D:\a\dnSpy\dnSpy\Extensions\ILSpy.Decompiler\ICSharpCode.Decompiler\ICSharpCode.Decompiler\ILAst\ILAstOptimizer.cs:line 1836
   at ICSharpCode.Decompiler.ILAst.ILAstOptimizer.FlattenBasicBlocks(ILNode node) in D:\a\dnSpy\dnSpy\Extensions\ILSpy.Decompiler\ICSharpCode.Decompiler\ICSharpCode.Decompiler\ILAst\ILAstOptimizer.cs:line 1804
   at ICSharpCode.Decompiler.ILAst.ILAstOptimizer.Optimize(DecompilerContext context, ILBlock method, AutoPropertyProvider autoPropertyProvider, StateMachineKind& stateMachineKind, MethodDef& inlinedMethod, AsyncMethodDebugInfo& asyncInfo, ILAstOptimizationStep abortBeforeStep) in D:\a\dnSpy\dnSpy\Extensions\ILSpy.Decompiler\ICSharpCode.Decompiler\ICSharpCode.Decompiler\ILAst\ILAstOptimizer.cs:line 344
   at ICSharpCode.Decompiler.Ast.AstMethodBodyBuilder.CreateMethodBody(IEnumerable`1 parameters, MethodDebugInfoBuilder& builder) in D:\a\dnSpy\dnSpy\Extensions\ILSpy.Decompiler\ICSharpCode.Decompiler\ICSharpCode.Decompiler\Ast\AstMethodBodyBuilder.cs:line 123
   at ICSharpCode.Decompiler.Ast.AstMethodBodyBuilder.CreateMethodBody(MethodDef methodDef, DecompilerContext context, AutoPropertyProvider autoPropertyProvider, IEnumerable`1 parameters, Boolean valueParameterIsKeyword, StringBuilder sb, MethodDebugInfoBuilder& stmtsBuilder) in D:\a\dnSpy\dnSpy\Extensions\ILSpy.Decompiler\ICSharpCode.Decompiler\ICSharpCode.Decompiler\Ast\AstMethodBodyBuilder.cs:line 88
   --- End of inner exception stack trace ---
   at ICSharpCode.Decompiler.Ast.AstMethodBodyBuilder.CreateMethodBody(MethodDef methodDef, DecompilerContext context, AutoPropertyProvider autoPropertyProvider, IEnumerable`1 parameters, Boolean valueParameterIsKeyword, StringBuilder sb, MethodDebugInfoBuilder& stmtsBuilder) in D:\a\dnSpy\dnSpy\Extensions\ILSpy.Decompiler\ICSharpCode.Decompiler\ICSharpCode.Decompiler\Ast\AstMethodBodyBuilder.cs:line 92
   at ICSharpCode.Decompiler.Ast.AstBuilder.AddMethodBody(EntityDeclaration methodNode, EntityDeclaration& updatedNode, MethodDef method, IEnumerable`1 parameters, Boolean valueParameterIsKeyword, MethodKind methodKind) in D:\a\dnSpy\dnSpy\Extensions\ILSpy.Decompiler\ICSharpCode.Decompiler\ICSharpCode.Decompiler\Ast\AstBuilder.cs:line 1618
*/;
			}
		}

		// Token: 0x060033CF RID: 13263 RVA: 0x0006DE48 File Offset: 0x0006C048
		[Token(Token = "0x60033CF")]
		[Address(RVA = "0xF69DB0", Offset = "0xF68DB0", VA = "0x180F69DB0")]
		public Triangle(int index, int v0, int v1, int v2, int subMeshIndex)
		{
			int num = 0;
			this.subMeshIndex = 0;
			int num2 = 0;
			this.index = index;
			this.err3 = (double)num2;
			this.err2 = (double)num2;
			this.err1 = (double)num2;
			this.err0 = (double)num2;
			this.deleted = num2 != 0;
			this.v0 = v0;
			this.v1 = v1;
			this.v2 = 0;
			this.va0 = v0;
			this.va1 = v1;
			this.va2 = 0;
			this.n = num;
			this.n.z = (double)num2;
		}

		// Token: 0x060033D0 RID: 13264 RVA: 0x0006DEC8 File Offset: 0x0006C0C8
		[Token(Token = "0x60033D0")]
		[Address(RVA = "0x415870", Offset = "0x414870", VA = "0x180415870")]
		public void GetAttributeIndices(int[] attributeIndices)
		{
			int num = this.va0;
			int length = attributeIndices.Length;
			attributeIndices[0] = num;
			int num2 = this.va1;
			attributeIndices[0] = num2;
			int num3 = this.va2;
			attributeIndices[1] = num3;
		}

		// Token: 0x060033D1 RID: 13265 RVA: 0x0006DF10 File Offset: 0x0006C110
		[Token(Token = "0x60033D1")]
		[Address(RVA = "0x415960", Offset = "0x414960", VA = "0x180415960")]
		public void SetAttributeIndex(int index, int value)
		{
			/*
An exception occurred when decompiling this method (060033D1)

ICSharpCode.Decompiler.DecompilerException: Error decompiling System.Void MTAssets.UltimateLODSystem.MeshSimplifier.Internal.Triangle::SetAttributeIndex(System.Int32,System.Int32)

 ---> System.Exception: Basic block has to end with unconditional control flow. 
{; 	IL_24:; 	stloc:ArgumentOutOfRangeException(var_0_2E, newobj:ArgumentOutOfRangeException(ArgumentOutOfRangeException::.ctor, ldstr:string("index"))); }; 
   at ICSharpCode.Decompiler.ILAst.ILAstOptimizer.FlattenBasicBlocks(ILNode node) in D:\a\dnSpy\dnSpy\Extensions\ILSpy.Decompiler\ICSharpCode.Decompiler\ICSharpCode.Decompiler\ILAst\ILAstOptimizer.cs:line 1810
   at ICSharpCode.Decompiler.ILAst.ILAstOptimizer.FlattenBasicBlocks(ILNode node) in D:\a\dnSpy\dnSpy\Extensions\ILSpy.Decompiler\ICSharpCode.Decompiler\ICSharpCode.Decompiler\ILAst\ILAstOptimizer.cs:line 1836
   at ICSharpCode.Decompiler.ILAst.ILAstOptimizer.FlattenBasicBlocks(ILNode node) in D:\a\dnSpy\dnSpy\Extensions\ILSpy.Decompiler\ICSharpCode.Decompiler\ICSharpCode.Decompiler\ILAst\ILAstOptimizer.cs:line 1836
   at ICSharpCode.Decompiler.ILAst.ILAstOptimizer.FlattenBasicBlocks(ILNode node) in D:\a\dnSpy\dnSpy\Extensions\ILSpy.Decompiler\ICSharpCode.Decompiler\ICSharpCode.Decompiler\ILAst\ILAstOptimizer.cs:line 1804
   at ICSharpCode.Decompiler.ILAst.ILAstOptimizer.FlattenBasicBlocks(ILNode node) in D:\a\dnSpy\dnSpy\Extensions\ILSpy.Decompiler\ICSharpCode.Decompiler\ICSharpCode.Decompiler\ILAst\ILAstOptimizer.cs:line 1836
   at ICSharpCode.Decompiler.ILAst.ILAstOptimizer.FlattenBasicBlocks(ILNode node) in D:\a\dnSpy\dnSpy\Extensions\ILSpy.Decompiler\ICSharpCode.Decompiler\ICSharpCode.Decompiler\ILAst\ILAstOptimizer.cs:line 1836
   at ICSharpCode.Decompiler.ILAst.ILAstOptimizer.FlattenBasicBlocks(ILNode node) in D:\a\dnSpy\dnSpy\Extensions\ILSpy.Decompiler\ICSharpCode.Decompiler\ICSharpCode.Decompiler\ILAst\ILAstOptimizer.cs:line 1804
   at ICSharpCode.Decompiler.ILAst.ILAstOptimizer.FlattenBasicBlocks(ILNode node) in D:\a\dnSpy\dnSpy\Extensions\ILSpy.Decompiler\ICSharpCode.Decompiler\ICSharpCode.Decompiler\ILAst\ILAstOptimizer.cs:line 1836
   at ICSharpCode.Decompiler.ILAst.ILAstOptimizer.FlattenBasicBlocks(ILNode node) in D:\a\dnSpy\dnSpy\Extensions\ILSpy.Decompiler\ICSharpCode.Decompiler\ICSharpCode.Decompiler\ILAst\ILAstOptimizer.cs:line 1836
   at ICSharpCode.Decompiler.ILAst.ILAstOptimizer.FlattenBasicBlocks(ILNode node) in D:\a\dnSpy\dnSpy\Extensions\ILSpy.Decompiler\ICSharpCode.Decompiler\ICSharpCode.Decompiler\ILAst\ILAstOptimizer.cs:line 1804
   at ICSharpCode.Decompiler.ILAst.ILAstOptimizer.Optimize(DecompilerContext context, ILBlock method, AutoPropertyProvider autoPropertyProvider, StateMachineKind& stateMachineKind, MethodDef& inlinedMethod, AsyncMethodDebugInfo& asyncInfo, ILAstOptimizationStep abortBeforeStep) in D:\a\dnSpy\dnSpy\Extensions\ILSpy.Decompiler\ICSharpCode.Decompiler\ICSharpCode.Decompiler\ILAst\ILAstOptimizer.cs:line 344
   at ICSharpCode.Decompiler.Ast.AstMethodBodyBuilder.CreateMethodBody(IEnumerable`1 parameters, MethodDebugInfoBuilder& builder) in D:\a\dnSpy\dnSpy\Extensions\ILSpy.Decompiler\ICSharpCode.Decompiler\ICSharpCode.Decompiler\Ast\AstMethodBodyBuilder.cs:line 123
   at ICSharpCode.Decompiler.Ast.AstMethodBodyBuilder.CreateMethodBody(MethodDef methodDef, DecompilerContext context, AutoPropertyProvider autoPropertyProvider, IEnumerable`1 parameters, Boolean valueParameterIsKeyword, StringBuilder sb, MethodDebugInfoBuilder& stmtsBuilder) in D:\a\dnSpy\dnSpy\Extensions\ILSpy.Decompiler\ICSharpCode.Decompiler\ICSharpCode.Decompiler\Ast\AstMethodBodyBuilder.cs:line 88
   --- End of inner exception stack trace ---
   at ICSharpCode.Decompiler.Ast.AstMethodBodyBuilder.CreateMethodBody(MethodDef methodDef, DecompilerContext context, AutoPropertyProvider autoPropertyProvider, IEnumerable`1 parameters, Boolean valueParameterIsKeyword, StringBuilder sb, MethodDebugInfoBuilder& stmtsBuilder) in D:\a\dnSpy\dnSpy\Extensions\ILSpy.Decompiler\ICSharpCode.Decompiler\ICSharpCode.Decompiler\Ast\AstMethodBodyBuilder.cs:line 92
   at ICSharpCode.Decompiler.Ast.AstBuilder.AddMethodBody(EntityDeclaration methodNode, EntityDeclaration& updatedNode, MethodDef method, IEnumerable`1 parameters, Boolean valueParameterIsKeyword, MethodKind methodKind) in D:\a\dnSpy\dnSpy\Extensions\ILSpy.Decompiler\ICSharpCode.Decompiler\ICSharpCode.Decompiler\Ast\AstBuilder.cs:line 1618
*/;
		}

		// Token: 0x060033D2 RID: 13266 RVA: 0x0006DF4C File Offset: 0x0006C14C
		[Token(Token = "0x60033D2")]
		[Address(RVA = "0x4158E0", Offset = "0x4148E0", VA = "0x1804158E0")]
		public void GetErrors(double[] err)
		{
			int length = err.Length;
		}

		// Token: 0x060033D3 RID: 13267 RVA: 0x000020D3 File Offset: 0x000002D3
		[Token(Token = "0x60033D3")]
		[Address(RVA = "0x38AAE0", Offset = "0x389AE0", VA = "0x18038AAE0", Slot = "2")]
		public override int GetHashCode()
		{
			throw new AnalysisFailedException("CPP2IL failed to recover any usable IL for this method.");
		}

		// Token: 0x060033D4 RID: 13268 RVA: 0x000020D3 File Offset: 0x000002D3
		[Token(Token = "0x60033D4")]
		[Address(RVA = "0xF69D20", Offset = "0xF68D20", VA = "0x180F69D20", Slot = "0")]
		public override bool Equals(object obj)
		{
			throw new AnalysisFailedException("CPP2IL failed to recover any usable IL for this method.");
		}

		// Token: 0x060033D5 RID: 13269 RVA: 0x000020D3 File Offset: 0x000002D3
		[Token(Token = "0x60033D5")]
		[Address(RVA = "0x4B0BD0", Offset = "0x4AFBD0", VA = "0x1804B0BD0", Slot = "4")]
		public bool Equals(Triangle other)
		{
			throw new AnalysisFailedException("CPP2IL failed to recover any usable IL for this method.");
		}

		// Token: 0x04003DBB RID: 15803
		[FieldOffset(Offset = "0x0")]
		[Token(Token = "0x4003DBB")]
		public int index;

		// Token: 0x04003DBC RID: 15804
		[FieldOffset(Offset = "0x4")]
		[Token(Token = "0x4003DBC")]
		public int v0;

		// Token: 0x04003DBD RID: 15805
		[FieldOffset(Offset = "0x8")]
		[Token(Token = "0x4003DBD")]
		public int v1;

		// Token: 0x04003DBE RID: 15806
		[FieldOffset(Offset = "0xC")]
		[Token(Token = "0x4003DBE")]
		public int v2;

		// Token: 0x04003DBF RID: 15807
		[FieldOffset(Offset = "0x10")]
		[Token(Token = "0x4003DBF")]
		public int subMeshIndex;

		// Token: 0x04003DC0 RID: 15808
		[FieldOffset(Offset = "0x14")]
		[Token(Token = "0x4003DC0")]
		public int va0;

		// Token: 0x04003DC1 RID: 15809
		[FieldOffset(Offset = "0x18")]
		[Token(Token = "0x4003DC1")]
		public int va1;

		// Token: 0x04003DC2 RID: 15810
		[FieldOffset(Offset = "0x1C")]
		[Token(Token = "0x4003DC2")]
		public int va2;

		// Token: 0x04003DC3 RID: 15811
		[FieldOffset(Offset = "0x20")]
		[Token(Token = "0x4003DC3")]
		public double err0;

		// Token: 0x04003DC4 RID: 15812
		[FieldOffset(Offset = "0x28")]
		[Token(Token = "0x4003DC4")]
		public double err1;

		// Token: 0x04003DC5 RID: 15813
		[FieldOffset(Offset = "0x30")]
		[Token(Token = "0x4003DC5")]
		public double err2;

		// Token: 0x04003DC6 RID: 15814
		[FieldOffset(Offset = "0x38")]
		[Token(Token = "0x4003DC6")]
		public double err3;

		// Token: 0x04003DC7 RID: 15815
		[FieldOffset(Offset = "0x40")]
		[Token(Token = "0x4003DC7")]
		public bool deleted;

		// Token: 0x04003DC8 RID: 15816
		[FieldOffset(Offset = "0x41")]
		[Token(Token = "0x4003DC8")]
		public bool dirty;

		// Token: 0x04003DC9 RID: 15817
		[FieldOffset(Offset = "0x48")]
		[Token(Token = "0x4003DC9")]
		public Vector3d n;
	}
}
