using System;
using Cpp2IlInjected;

namespace MTAssets.UltimateLODSystem.MeshSimplifier.Internal
{
	// Token: 0x02000614 RID: 1556
	[Token(Token = "0x2000614")]
	internal struct Triangle : IEquatable<Triangle>
	{
		// Token: 0x170003BD RID: 957
		[Token(Token = "0x170003BD")]
		public int this[int index]
		{
			[Token(Token = "0x6003104")]
			[Address(RVA = "0x7596A0", Offset = "0x7584A0", VA = "0x1807596A0")]
			get
			{
				if (index == 0)
				{
					return this.v0;
				}
				if (index == 1)
				{
					return this.v1;
				}
				return this.v2;
			}
			[Token(Token = "0x6003105")]
			[Address(RVA = "0x3F3240", Offset = "0x3F2040", VA = "0x1803F3240")]
			set
			{
				/*
An exception occurred when decompiling this method (06003105)

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: 0x06003106 RID: 12550 RVA: 0x00066C88 File Offset: 0x00064E88
		[Token(Token = "0x6003106")]
		[Address(RVA = "0x759650", Offset = "0x758450", VA = "0x180759650")]
		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: 0x06003107 RID: 12551 RVA: 0x00066D08 File Offset: 0x00064F08
		[Token(Token = "0x6003107")]
		[Address(RVA = "0x3F30D0", Offset = "0x3F1ED0", VA = "0x1803F30D0")]
		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: 0x06003108 RID: 12552 RVA: 0x00066D50 File Offset: 0x00064F50
		[Token(Token = "0x6003108")]
		[Address(RVA = "0x3F31C0", Offset = "0x3F1FC0", VA = "0x1803F31C0")]
		public void SetAttributeIndex(int index, int value)
		{
			/*
An exception occurred when decompiling this method (06003108)

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: 0x06003109 RID: 12553 RVA: 0x00066D8C File Offset: 0x00064F8C
		[Token(Token = "0x6003109")]
		[Address(RVA = "0x3F3140", Offset = "0x3F1F40", VA = "0x1803F3140")]
		public void GetErrors(double[] err)
		{
			int length = err.Length;
		}

		// Token: 0x0600310A RID: 12554 RVA: 0x000020D3 File Offset: 0x000002D3
		[Token(Token = "0x600310A")]
		[Address(RVA = "0x2B4370", Offset = "0x2B3170", VA = "0x1802B4370", Slot = "2")]
		public override int GetHashCode()
		{
			throw new AnalysisFailedException("CPP2IL failed to recover any usable IL for this method.");
		}

		// Token: 0x0600310B RID: 12555 RVA: 0x000020D3 File Offset: 0x000002D3
		[Token(Token = "0x600310B")]
		[Address(RVA = "0x7595B0", Offset = "0x7583B0", VA = "0x1807595B0", Slot = "0")]
		public override bool Equals(object obj)
		{
			throw new AnalysisFailedException("CPP2IL failed to recover any usable IL for this method.");
		}

		// Token: 0x0600310C RID: 12556 RVA: 0x000020D3 File Offset: 0x000002D3
		[Token(Token = "0x600310C")]
		[Address(RVA = "0x759640", Offset = "0x758440", VA = "0x180759640", Slot = "4")]
		public bool Equals(Triangle other)
		{
			throw new AnalysisFailedException("CPP2IL failed to recover any usable IL for this method.");
		}

		// Token: 0x04003AD1 RID: 15057
		[FieldOffset(Offset = "0x0")]
		[Token(Token = "0x4003AD1")]
		public int index;

		// Token: 0x04003AD2 RID: 15058
		[FieldOffset(Offset = "0x4")]
		[Token(Token = "0x4003AD2")]
		public int v0;

		// Token: 0x04003AD3 RID: 15059
		[FieldOffset(Offset = "0x8")]
		[Token(Token = "0x4003AD3")]
		public int v1;

		// Token: 0x04003AD4 RID: 15060
		[FieldOffset(Offset = "0xC")]
		[Token(Token = "0x4003AD4")]
		public int v2;

		// Token: 0x04003AD5 RID: 15061
		[FieldOffset(Offset = "0x10")]
		[Token(Token = "0x4003AD5")]
		public int subMeshIndex;

		// Token: 0x04003AD6 RID: 15062
		[FieldOffset(Offset = "0x14")]
		[Token(Token = "0x4003AD6")]
		public int va0;

		// Token: 0x04003AD7 RID: 15063
		[FieldOffset(Offset = "0x18")]
		[Token(Token = "0x4003AD7")]
		public int va1;

		// Token: 0x04003AD8 RID: 15064
		[FieldOffset(Offset = "0x1C")]
		[Token(Token = "0x4003AD8")]
		public int va2;

		// Token: 0x04003AD9 RID: 15065
		[FieldOffset(Offset = "0x20")]
		[Token(Token = "0x4003AD9")]
		public double err0;

		// Token: 0x04003ADA RID: 15066
		[FieldOffset(Offset = "0x28")]
		[Token(Token = "0x4003ADA")]
		public double err1;

		// Token: 0x04003ADB RID: 15067
		[FieldOffset(Offset = "0x30")]
		[Token(Token = "0x4003ADB")]
		public double err2;

		// Token: 0x04003ADC RID: 15068
		[FieldOffset(Offset = "0x38")]
		[Token(Token = "0x4003ADC")]
		public double err3;

		// Token: 0x04003ADD RID: 15069
		[FieldOffset(Offset = "0x40")]
		[Token(Token = "0x4003ADD")]
		public bool deleted;

		// Token: 0x04003ADE RID: 15070
		[FieldOffset(Offset = "0x41")]
		[Token(Token = "0x4003ADE")]
		public bool dirty;

		// Token: 0x04003ADF RID: 15071
		[FieldOffset(Offset = "0x48")]
		[Token(Token = "0x4003ADF")]
		public Vector3d n;
	}
}
