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: 0x0200068A RID: 1674
	[StructLayout(2)]
	public struct Triangle
	{
		// Token: 0x1700395D RID: 14685
		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 = 658678, RefRangeEnd = 658679, XrefRangeStart = 658678, XrefRangeEnd = 658678, 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: 0x0600AA10 RID: 43536 RVA: 0x002BB870 File Offset: 0x002B9A70
		[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: 0x0600AA11 RID: 43537 RVA: 0x002BB904 File Offset: 0x002B9B04
		[CallerCount(1)]
		[CachedScanResults(RefRangeStart = 658679, RefRangeEnd = 658680, XrefRangeStart = 658679, XrefRangeEnd = 658679, 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: 0x0600AA12 RID: 43538 RVA: 0x002BB950 File Offset: 0x002B9B50
		[CallerCount(1)]
		[CachedScanResults(RefRangeStart = 658680, RefRangeEnd = 658681, XrefRangeStart = 658680, XrefRangeEnd = 658680, 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: 0x0600AA13 RID: 43539 RVA: 0x002BB9A8 File Offset: 0x002B9BA8
		[CallerCount(1)]
		[CachedScanResults(RefRangeStart = 658681, RefRangeEnd = 658682, XrefRangeStart = 658681, XrefRangeEnd = 658681, 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: 0x0600AA14 RID: 43540 RVA: 0x002BB9F4 File Offset: 0x002B9BF4
		[CallerCount(55)]
		[CachedScanResults(RefRangeStart = 22219, RefRangeEnd = 22274, XrefRangeStart = 22219, XrefRangeEnd = 22274, 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: 0x0600AA15 RID: 43541 RVA: 0x002BBA38 File Offset: 0x002B9C38
		[CallerCount(0)]
		[CachedScanResults(RefRangeStart = 0, RefRangeEnd = 0, XrefRangeStart = 658682, XrefRangeEnd = 658685, 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: 0x0600AA16 RID: 43542 RVA: 0x002BBA90 File Offset: 0x002B9C90
		[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: 0x0600AA17 RID: 43543 RVA: 0x002BBAE4 File Offset: 0x002B9CE4
		// 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, 100676557);
			Triangle.NativeMethodInfoPtr_set_Item_Public_set_Void_Int32_Int32_0 = IL2CPP.GetIl2CppMethodByToken(Il2CppClassPointerStore<Triangle>.NativeClassPtr, 100676558);
			Triangle.NativeMethodInfoPtr__ctor_Public_Void_Int32_Int32_Int32_Int32_Int32_0 = IL2CPP.GetIl2CppMethodByToken(Il2CppClassPointerStore<Triangle>.NativeClassPtr, 100676559);
			Triangle.NativeMethodInfoPtr_GetAttributeIndices_Public_Void_Il2CppStructArray_1_Int32_0 = IL2CPP.GetIl2CppMethodByToken(Il2CppClassPointerStore<Triangle>.NativeClassPtr, 100676560);
			Triangle.NativeMethodInfoPtr_SetAttributeIndex_Public_Void_Int32_Int32_0 = IL2CPP.GetIl2CppMethodByToken(Il2CppClassPointerStore<Triangle>.NativeClassPtr, 100676561);
			Triangle.NativeMethodInfoPtr_GetErrors_Public_Void_Il2CppStructArray_1_Double_0 = IL2CPP.GetIl2CppMethodByToken(Il2CppClassPointerStore<Triangle>.NativeClassPtr, 100676562);
			Triangle.NativeMethodInfoPtr_GetHashCode_Public_Virtual_Int32_0 = IL2CPP.GetIl2CppMethodByToken(Il2CppClassPointerStore<Triangle>.NativeClassPtr, 100676563);
			Triangle.NativeMethodInfoPtr_Equals_Public_Virtual_Boolean_Object_0 = IL2CPP.GetIl2CppMethodByToken(Il2CppClassPointerStore<Triangle>.NativeClassPtr, 100676564);
			Triangle.NativeMethodInfoPtr_Equals_Public_Virtual_Final_New_Boolean_Triangle_0 = IL2CPP.GetIl2CppMethodByToken(Il2CppClassPointerStore<Triangle>.NativeClassPtr, 100676565);
		}

		// Token: 0x0600AA18 RID: 43544 RVA: 0x002BBCF4 File Offset: 0x002B9EF4
		public Object BoxIl2CppObject()
		{
			return new Object(IL2CPP.il2cpp_value_box(Il2CppClassPointerStore<Triangle>.NativeClassPtr, ref this));
		}

		// Token: 0x04007245 RID: 29253
		private static readonly IntPtr NativeFieldInfoPtr_index;

		// Token: 0x04007246 RID: 29254
		private static readonly IntPtr NativeFieldInfoPtr_v0;

		// Token: 0x04007247 RID: 29255
		private static readonly IntPtr NativeFieldInfoPtr_v1;

		// Token: 0x04007248 RID: 29256
		private static readonly IntPtr NativeFieldInfoPtr_v2;

		// Token: 0x04007249 RID: 29257
		private static readonly IntPtr NativeFieldInfoPtr_subMeshIndex;

		// Token: 0x0400724A RID: 29258
		private static readonly IntPtr NativeFieldInfoPtr_va0;

		// Token: 0x0400724B RID: 29259
		private static readonly IntPtr NativeFieldInfoPtr_va1;

		// Token: 0x0400724C RID: 29260
		private static readonly IntPtr NativeFieldInfoPtr_va2;

		// Token: 0x0400724D RID: 29261
		private static readonly IntPtr NativeFieldInfoPtr_err0;

		// Token: 0x0400724E RID: 29262
		private static readonly IntPtr NativeFieldInfoPtr_err1;

		// Token: 0x0400724F RID: 29263
		private static readonly IntPtr NativeFieldInfoPtr_err2;

		// Token: 0x04007250 RID: 29264
		private static readonly IntPtr NativeFieldInfoPtr_err3;

		// Token: 0x04007251 RID: 29265
		private static readonly IntPtr NativeFieldInfoPtr_deleted;

		// Token: 0x04007252 RID: 29266
		private static readonly IntPtr NativeFieldInfoPtr_dirty;

		// Token: 0x04007253 RID: 29267
		private static readonly IntPtr NativeFieldInfoPtr_n;

		// Token: 0x04007254 RID: 29268
		private static readonly IntPtr NativeMethodInfoPtr_get_Item_Public_get_Int32_Int32_0;

		// Token: 0x04007255 RID: 29269
		private static readonly IntPtr NativeMethodInfoPtr_set_Item_Public_set_Void_Int32_Int32_0;

		// Token: 0x04007256 RID: 29270
		private static readonly IntPtr NativeMethodInfoPtr__ctor_Public_Void_Int32_Int32_Int32_Int32_Int32_0;

		// Token: 0x04007257 RID: 29271
		private static readonly IntPtr NativeMethodInfoPtr_GetAttributeIndices_Public_Void_Il2CppStructArray_1_Int32_0;

		// Token: 0x04007258 RID: 29272
		private static readonly IntPtr NativeMethodInfoPtr_SetAttributeIndex_Public_Void_Int32_Int32_0;

		// Token: 0x04007259 RID: 29273
		private static readonly IntPtr NativeMethodInfoPtr_GetErrors_Public_Void_Il2CppStructArray_1_Double_0;

		// Token: 0x0400725A RID: 29274
		private static readonly IntPtr NativeMethodInfoPtr_GetHashCode_Public_Virtual_Int32_0;

		// Token: 0x0400725B RID: 29275
		private static readonly IntPtr NativeMethodInfoPtr_Equals_Public_Virtual_Boolean_Object_0;

		// Token: 0x0400725C RID: 29276
		private static readonly IntPtr NativeMethodInfoPtr_Equals_Public_Virtual_Final_New_Boolean_Triangle_0;

		// Token: 0x0400725D RID: 29277
		[FieldOffset(0)]
		public int index;

		// Token: 0x0400725E RID: 29278
		[FieldOffset(4)]
		public int v0;

		// Token: 0x0400725F RID: 29279
		[FieldOffset(8)]
		public int v1;

		// Token: 0x04007260 RID: 29280
		[FieldOffset(12)]
		public int v2;

		// Token: 0x04007261 RID: 29281
		[FieldOffset(16)]
		public int subMeshIndex;

		// Token: 0x04007262 RID: 29282
		[FieldOffset(20)]
		public int va0;

		// Token: 0x04007263 RID: 29283
		[FieldOffset(24)]
		public int va1;

		// Token: 0x04007264 RID: 29284
		[FieldOffset(28)]
		public int va2;

		// Token: 0x04007265 RID: 29285
		[FieldOffset(32)]
		public double err0;

		// Token: 0x04007266 RID: 29286
		[FieldOffset(40)]
		public double err1;

		// Token: 0x04007267 RID: 29287
		[FieldOffset(48)]
		public double err2;

		// Token: 0x04007268 RID: 29288
		[FieldOffset(56)]
		public double err3;

		// Token: 0x04007269 RID: 29289
		[FieldOffset(64)]
		[MarshalAs(4)]
		public bool deleted;

		// Token: 0x0400726A RID: 29290
		[FieldOffset(65)]
		[MarshalAs(4)]
		public bool dirty;

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