using System;
using System.Runtime.InteropServices;
using Il2CppInterop.Common.Attributes;
using Il2CppInterop.Runtime;
using Il2CppInterop.Runtime.InteropTypes.Arrays;
using Il2CppSystem;

namespace MTAssets.UltimateLODSystem.MeshSimplifier.Internal
{
	// Token: 0x02000632 RID: 1586
	[StructLayout(LayoutKind.Explicit)]
	public struct Triangle
	{
		// Token: 0x170036C2 RID: 14018
		public unsafe int this[int index]
		{
			[CallerCount(0)]
			get
			{
				checked
				{
					IntPtr* ptr = stackalloc IntPtr[unchecked((UIntPtr)1) * (UIntPtr)sizeof(IntPtr)];
					*ptr = ref index;
					IntPtr intPtr2;
					IntPtr intPtr = IL2CPP.il2cpp_runtime_invoke(Triangle.NativeMethodInfoPtr_get_Item_Public_get_Int32_Int32_0, ref this, (void**)ptr, ref intPtr2);
					Il2CppException.RaiseExceptionIfNecessary(intPtr2);
					return *IL2CPP.il2cpp_object_unbox(intPtr);
				}
			}
			[CallerCount(1)]
			[CachedScanResults(RefRangeStart = 626377, RefRangeEnd = 626378, XrefRangeStart = 626377, XrefRangeEnd = 626377, MetadataInitTokenRva = 0L, MetadataInitFlagRva = 0L)]
			set
			{
				IntPtr* ptr;
				checked
				{
					ptr = stackalloc IntPtr[unchecked((UIntPtr)2) * (UIntPtr)sizeof(IntPtr)];
					*ptr = ref index;
				}
				ptr[checked(unchecked((UIntPtr)1) * (UIntPtr)sizeof(IntPtr)) / (UIntPtr)sizeof(IntPtr)] = ref value;
				IntPtr intPtr2;
				IntPtr intPtr = IL2CPP.il2cpp_runtime_invoke(Triangle.NativeMethodInfoPtr_set_Item_Public_set_Void_Int32_Int32_0, ref this, (void**)ptr, ref intPtr2);
				Il2CppException.RaiseExceptionIfNecessary(intPtr2);
			}
		}

		// Token: 0x0600A1BD RID: 41405 RVA: 0x00298B34 File Offset: 0x00296D34
		[CallerCount(0)]
		public unsafe Triangle(int index, int v0, int v1, int v2, int subMeshIndex)
		{
			IntPtr* ptr;
			checked
			{
				ptr = stackalloc IntPtr[unchecked((UIntPtr)5) * (UIntPtr)sizeof(IntPtr)];
				*ptr = ref index;
			}
			ptr[checked(unchecked((UIntPtr)1) * (UIntPtr)sizeof(IntPtr)) / (UIntPtr)sizeof(IntPtr)] = ref v0;
			ptr[checked(unchecked((UIntPtr)2) * (UIntPtr)sizeof(IntPtr)) / (UIntPtr)sizeof(IntPtr)] = ref v1;
			ptr[checked(unchecked((UIntPtr)3) * (UIntPtr)sizeof(IntPtr)) / (UIntPtr)sizeof(IntPtr)] = ref v2;
			ptr[checked(unchecked((UIntPtr)4) * (UIntPtr)sizeof(IntPtr)) / (UIntPtr)sizeof(IntPtr)] = ref subMeshIndex;
			IntPtr intPtr2;
			IntPtr intPtr = IL2CPP.il2cpp_runtime_invoke(Triangle.NativeMethodInfoPtr__ctor_Public_Void_Int32_Int32_Int32_Int32_Int32_0, ref this, (void**)ptr, ref intPtr2);
			Il2CppException.RaiseExceptionIfNecessary(intPtr2);
		}

		// Token: 0x0600A1BE RID: 41406 RVA: 0x00298BC8 File Offset: 0x00296DC8
		[CallerCount(1)]
		[CachedScanResults(RefRangeStart = 626378, RefRangeEnd = 626379, XrefRangeStart = 626378, XrefRangeEnd = 626378, MetadataInitTokenRva = 0L, MetadataInitFlagRva = 0L)]
		public unsafe void GetAttributeIndices(Il2CppStructArray<int> attributeIndices)
		{
			checked
			{
				IntPtr* ptr = stackalloc IntPtr[unchecked((UIntPtr)1) * (UIntPtr)sizeof(IntPtr)];
				*ptr = IL2CPP.Il2CppObjectBaseToPtr(attributeIndices);
				IntPtr intPtr2;
				IntPtr intPtr = IL2CPP.il2cpp_runtime_invoke(Triangle.NativeMethodInfoPtr_GetAttributeIndices_Public_Void_Il2CppStructArray_1_Int32_0, ref this, (void**)ptr, ref intPtr2);
				Il2CppException.RaiseExceptionIfNecessary(intPtr2);
			}
		}

		// Token: 0x0600A1BF RID: 41407 RVA: 0x00298C14 File Offset: 0x00296E14
		[CallerCount(1)]
		[CachedScanResults(RefRangeStart = 626379, RefRangeEnd = 626380, XrefRangeStart = 626379, XrefRangeEnd = 626379, MetadataInitTokenRva = 0L, MetadataInitFlagRva = 0L)]
		public unsafe void SetAttributeIndex(int index, int value)
		{
			IntPtr* ptr;
			checked
			{
				ptr = stackalloc IntPtr[unchecked((UIntPtr)2) * (UIntPtr)sizeof(IntPtr)];
				*ptr = ref index;
			}
			ptr[checked(unchecked((UIntPtr)1) * (UIntPtr)sizeof(IntPtr)) / (UIntPtr)sizeof(IntPtr)] = ref value;
			IntPtr intPtr2;
			IntPtr intPtr = IL2CPP.il2cpp_runtime_invoke(Triangle.NativeMethodInfoPtr_SetAttributeIndex_Public_Void_Int32_Int32_0, ref this, (void**)ptr, ref intPtr2);
			Il2CppException.RaiseExceptionIfNecessary(intPtr2);
		}

		// Token: 0x0600A1C0 RID: 41408 RVA: 0x00298C6C File Offset: 0x00296E6C
		[CallerCount(1)]
		[CachedScanResults(RefRangeStart = 626380, RefRangeEnd = 626381, XrefRangeStart = 626380, XrefRangeEnd = 626380, MetadataInitTokenRva = 0L, MetadataInitFlagRva = 0L)]
		public unsafe void GetErrors(Il2CppStructArray<double> err)
		{
			checked
			{
				IntPtr* ptr = stackalloc IntPtr[unchecked((UIntPtr)1) * (UIntPtr)sizeof(IntPtr)];
				*ptr = IL2CPP.Il2CppObjectBaseToPtr(err);
				IntPtr intPtr2;
				IntPtr intPtr = IL2CPP.il2cpp_runtime_invoke(Triangle.NativeMethodInfoPtr_GetErrors_Public_Void_Il2CppStructArray_1_Double_0, ref this, (void**)ptr, ref intPtr2);
				Il2CppException.RaiseExceptionIfNecessary(intPtr2);
			}
		}

		// Token: 0x0600A1C1 RID: 41409 RVA: 0x00298CB8 File Offset: 0x00296EB8
		[CallerCount(54)]
		[CachedScanResults(RefRangeStart = 22303, RefRangeEnd = 22357, XrefRangeStart = 22303, XrefRangeEnd = 22357, MetadataInitTokenRva = 0L, MetadataInitFlagRva = 0L)]
		public unsafe override int GetHashCode()
		{
			IntPtr* ptr = null;
			IntPtr intPtr2;
			IntPtr intPtr = IL2CPP.il2cpp_runtime_invoke(Triangle.NativeMethodInfoPtr_GetHashCode_Public_Virtual_Int32_0, ref this, (void**)ptr, ref intPtr2);
			Il2CppException.RaiseExceptionIfNecessary(intPtr2);
			return *IL2CPP.il2cpp_object_unbox(intPtr);
		}

		// Token: 0x0600A1C2 RID: 41410 RVA: 0x00298CFC File Offset: 0x00296EFC
		[CallerCount(0)]
		[CachedScanResults(RefRangeStart = 0, RefRangeEnd = 0, XrefRangeStart = 626381, XrefRangeEnd = 626384, MetadataInitTokenRva = 0L, MetadataInitFlagRva = 0L)]
		public unsafe override bool Equals(Object obj)
		{
			checked
			{
				IntPtr* ptr = stackalloc IntPtr[unchecked((UIntPtr)1) * (UIntPtr)sizeof(IntPtr)];
				*ptr = IL2CPP.Il2CppObjectBaseToPtr(obj);
				IntPtr intPtr2;
				IntPtr intPtr = IL2CPP.il2cpp_runtime_invoke(Triangle.NativeMethodInfoPtr_Equals_Public_Virtual_Boolean_Object_0, ref this, (void**)ptr, ref intPtr2);
				Il2CppException.RaiseExceptionIfNecessary(intPtr2);
				return *IL2CPP.il2cpp_object_unbox(intPtr);
			}
		}

		// Token: 0x0600A1C3 RID: 41411 RVA: 0x00298D54 File Offset: 0x00296F54
		[CallerCount(0)]
		public unsafe bool Equals(Triangle other)
		{
			checked
			{
				IntPtr* ptr = stackalloc IntPtr[unchecked((UIntPtr)1) * (UIntPtr)sizeof(IntPtr)];
				*ptr = ref other;
				IntPtr intPtr2;
				IntPtr intPtr = IL2CPP.il2cpp_runtime_invoke(Triangle.NativeMethodInfoPtr_Equals_Public_Virtual_Final_New_Boolean_Triangle_0, ref this, (void**)ptr, ref intPtr2);
				Il2CppException.RaiseExceptionIfNecessary(intPtr2);
				return *IL2CPP.il2cpp_object_unbox(intPtr);
			}
		}

		// Token: 0x0600A1C4 RID: 41412 RVA: 0x00298DA8 File Offset: 0x00296FA8
		// Note: this type is marked as 'beforefieldinit'.
		static Triangle()
		{
			Il2CppClassPointerStore<Triangle>.NativeClassPtr = IL2CPP.GetIl2CppClass("Assembly-CSharp.dll", "MTAssets.UltimateLODSystem.MeshSimplifier.Internal", "Triangle");
			IL2CPP.il2cpp_runtime_class_init(Il2CppClassPointerStore<Triangle>.NativeClassPtr);
			Triangle.NativeFieldInfoPtr_index = IL2CPP.GetIl2CppField(Il2CppClassPointerStore<Triangle>.NativeClassPtr, "index");
			Triangle.NativeFieldInfoPtr_v0 = IL2CPP.GetIl2CppField(Il2CppClassPointerStore<Triangle>.NativeClassPtr, "v0");
			Triangle.NativeFieldInfoPtr_v1 = IL2CPP.GetIl2CppField(Il2CppClassPointerStore<Triangle>.NativeClassPtr, "v1");
			Triangle.NativeFieldInfoPtr_v2 = IL2CPP.GetIl2CppField(Il2CppClassPointerStore<Triangle>.NativeClassPtr, "v2");
			Triangle.NativeFieldInfoPtr_subMeshIndex = IL2CPP.GetIl2CppField(Il2CppClassPointerStore<Triangle>.NativeClassPtr, "subMeshIndex");
			Triangle.NativeFieldInfoPtr_va0 = IL2CPP.GetIl2CppField(Il2CppClassPointerStore<Triangle>.NativeClassPtr, "va0");
			Triangle.NativeFieldInfoPtr_va1 = IL2CPP.GetIl2CppField(Il2CppClassPointerStore<Triangle>.NativeClassPtr, "va1");
			Triangle.NativeFieldInfoPtr_va2 = IL2CPP.GetIl2CppField(Il2CppClassPointerStore<Triangle>.NativeClassPtr, "va2");
			Triangle.NativeFieldInfoPtr_err0 = IL2CPP.GetIl2CppField(Il2CppClassPointerStore<Triangle>.NativeClassPtr, "err0");
			Triangle.NativeFieldInfoPtr_err1 = IL2CPP.GetIl2CppField(Il2CppClassPointerStore<Triangle>.NativeClassPtr, "err1");
			Triangle.NativeFieldInfoPtr_err2 = IL2CPP.GetIl2CppField(Il2CppClassPointerStore<Triangle>.NativeClassPtr, "err2");
			Triangle.NativeFieldInfoPtr_err3 = IL2CPP.GetIl2CppField(Il2CppClassPointerStore<Triangle>.NativeClassPtr, "err3");
			Triangle.NativeFieldInfoPtr_deleted = IL2CPP.GetIl2CppField(Il2CppClassPointerStore<Triangle>.NativeClassPtr, "deleted");
			Triangle.NativeFieldInfoPtr_dirty = IL2CPP.GetIl2CppField(Il2CppClassPointerStore<Triangle>.NativeClassPtr, "dirty");
			Triangle.NativeFieldInfoPtr_n = IL2CPP.GetIl2CppField(Il2CppClassPointerStore<Triangle>.NativeClassPtr, "n");
			Triangle.NativeMethodInfoPtr_get_Item_Public_get_Int32_Int32_0 = IL2CPP.GetIl2CppMethodByToken(Il2CppClassPointerStore<Triangle>.NativeClassPtr, 100675844);
			Triangle.NativeMethodInfoPtr_set_Item_Public_set_Void_Int32_Int32_0 = IL2CPP.GetIl2CppMethodByToken(Il2CppClassPointerStore<Triangle>.NativeClassPtr, 100675845);
			Triangle.NativeMethodInfoPtr__ctor_Public_Void_Int32_Int32_Int32_Int32_Int32_0 = IL2CPP.GetIl2CppMethodByToken(Il2CppClassPointerStore<Triangle>.NativeClassPtr, 100675846);
			Triangle.NativeMethodInfoPtr_GetAttributeIndices_Public_Void_Il2CppStructArray_1_Int32_0 = IL2CPP.GetIl2CppMethodByToken(Il2CppClassPointerStore<Triangle>.NativeClassPtr, 100675847);
			Triangle.NativeMethodInfoPtr_SetAttributeIndex_Public_Void_Int32_Int32_0 = IL2CPP.GetIl2CppMethodByToken(Il2CppClassPointerStore<Triangle>.NativeClassPtr, 100675848);
			Triangle.NativeMethodInfoPtr_GetErrors_Public_Void_Il2CppStructArray_1_Double_0 = IL2CPP.GetIl2CppMethodByToken(Il2CppClassPointerStore<Triangle>.NativeClassPtr, 100675849);
			Triangle.NativeMethodInfoPtr_GetHashCode_Public_Virtual_Int32_0 = IL2CPP.GetIl2CppMethodByToken(Il2CppClassPointerStore<Triangle>.NativeClassPtr, 100675850);
			Triangle.NativeMethodInfoPtr_Equals_Public_Virtual_Boolean_Object_0 = IL2CPP.GetIl2CppMethodByToken(Il2CppClassPointerStore<Triangle>.NativeClassPtr, 100675851);
			Triangle.NativeMethodInfoPtr_Equals_Public_Virtual_Final_New_Boolean_Triangle_0 = IL2CPP.GetIl2CppMethodByToken(Il2CppClassPointerStore<Triangle>.NativeClassPtr, 100675852);
		}

		// Token: 0x0600A1C5 RID: 41413 RVA: 0x00298FB8 File Offset: 0x002971B8
		public Object BoxIl2CppObject()
		{
			return new Object(IL2CPP.il2cpp_value_box(Il2CppClassPointerStore<Triangle>.NativeClassPtr, ref this));
		}

		// Token: 0x04006C9C RID: 27804
		private static readonly IntPtr NativeFieldInfoPtr_index;

		// Token: 0x04006C9D RID: 27805
		private static readonly IntPtr NativeFieldInfoPtr_v0;

		// Token: 0x04006C9E RID: 27806
		private static readonly IntPtr NativeFieldInfoPtr_v1;

		// Token: 0x04006C9F RID: 27807
		private static readonly IntPtr NativeFieldInfoPtr_v2;

		// Token: 0x04006CA0 RID: 27808
		private static readonly IntPtr NativeFieldInfoPtr_subMeshIndex;

		// Token: 0x04006CA1 RID: 27809
		private static readonly IntPtr NativeFieldInfoPtr_va0;

		// Token: 0x04006CA2 RID: 27810
		private static readonly IntPtr NativeFieldInfoPtr_va1;

		// Token: 0x04006CA3 RID: 27811
		private static readonly IntPtr NativeFieldInfoPtr_va2;

		// Token: 0x04006CA4 RID: 27812
		private static readonly IntPtr NativeFieldInfoPtr_err0;

		// Token: 0x04006CA5 RID: 27813
		private static readonly IntPtr NativeFieldInfoPtr_err1;

		// Token: 0x04006CA6 RID: 27814
		private static readonly IntPtr NativeFieldInfoPtr_err2;

		// Token: 0x04006CA7 RID: 27815
		private static readonly IntPtr NativeFieldInfoPtr_err3;

		// Token: 0x04006CA8 RID: 27816
		private static readonly IntPtr NativeFieldInfoPtr_deleted;

		// Token: 0x04006CA9 RID: 27817
		private static readonly IntPtr NativeFieldInfoPtr_dirty;

		// Token: 0x04006CAA RID: 27818
		private static readonly IntPtr NativeFieldInfoPtr_n;

		// Token: 0x04006CAB RID: 27819
		private static readonly IntPtr NativeMethodInfoPtr_get_Item_Public_get_Int32_Int32_0;

		// Token: 0x04006CAC RID: 27820
		private static readonly IntPtr NativeMethodInfoPtr_set_Item_Public_set_Void_Int32_Int32_0;

		// Token: 0x04006CAD RID: 27821
		private static readonly IntPtr NativeMethodInfoPtr__ctor_Public_Void_Int32_Int32_Int32_Int32_Int32_0;

		// Token: 0x04006CAE RID: 27822
		private static readonly IntPtr NativeMethodInfoPtr_GetAttributeIndices_Public_Void_Il2CppStructArray_1_Int32_0;

		// Token: 0x04006CAF RID: 27823
		private static readonly IntPtr NativeMethodInfoPtr_SetAttributeIndex_Public_Void_Int32_Int32_0;

		// Token: 0x04006CB0 RID: 27824
		private static readonly IntPtr NativeMethodInfoPtr_GetErrors_Public_Void_Il2CppStructArray_1_Double_0;

		// Token: 0x04006CB1 RID: 27825
		private static readonly IntPtr NativeMethodInfoPtr_GetHashCode_Public_Virtual_Int32_0;

		// Token: 0x04006CB2 RID: 27826
		private static readonly IntPtr NativeMethodInfoPtr_Equals_Public_Virtual_Boolean_Object_0;

		// Token: 0x04006CB3 RID: 27827
		private static readonly IntPtr NativeMethodInfoPtr_Equals_Public_Virtual_Final_New_Boolean_Triangle_0;

		// Token: 0x04006CB4 RID: 27828
		[FieldOffset(0)]
		public int index;

		// Token: 0x04006CB5 RID: 27829
		[FieldOffset(4)]
		public int v0;

		// Token: 0x04006CB6 RID: 27830
		[FieldOffset(8)]
		public int v1;

		// Token: 0x04006CB7 RID: 27831
		[FieldOffset(12)]
		public int v2;

		// Token: 0x04006CB8 RID: 27832
		[FieldOffset(16)]
		public int subMeshIndex;

		// Token: 0x04006CB9 RID: 27833
		[FieldOffset(20)]
		public int va0;

		// Token: 0x04006CBA RID: 27834
		[FieldOffset(24)]
		public int va1;

		// Token: 0x04006CBB RID: 27835
		[FieldOffset(28)]
		public int va2;

		// Token: 0x04006CBC RID: 27836
		[FieldOffset(32)]
		public double err0;

		// Token: 0x04006CBD RID: 27837
		[FieldOffset(40)]
		public double err1;

		// Token: 0x04006CBE RID: 27838
		[FieldOffset(48)]
		public double err2;

		// Token: 0x04006CBF RID: 27839
		[FieldOffset(56)]
		public double err3;

		// Token: 0x04006CC0 RID: 27840
		[FieldOffset(64)]
		[MarshalAs(UnmanagedType.U1)]
		public bool deleted;

		// Token: 0x04006CC1 RID: 27841
		[FieldOffset(65)]
		[MarshalAs(UnmanagedType.U1)]
		public bool dirty;

		// Token: 0x04006CC2 RID: 27842
		[FieldOffset(72)]
		public Vector3d n;
	}
}
