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

namespace UnityStandardAssets.ImageEffects
{
	// Token: 0x02000642 RID: 1602
	public class Triangles : Il2CppSystem.Object
	{
		// Token: 0x0600A5CA RID: 42442 RVA: 0x002A81BC File Offset: 0x002A63BC
		[CallerCount(0)]
		[CachedScanResults(RefRangeStart = 0, RefRangeEnd = 0, XrefRangeStart = 654393, XrefRangeEnd = 654407, MetadataInitTokenRva = 0L, MetadataInitFlagRva = 0L)]
		public unsafe static bool HasMeshes()
		{
			IntPtr* ptr = null;
			IntPtr intPtr2;
			IntPtr intPtr = IL2CPP.il2cpp_runtime_invoke(Triangles.NativeMethodInfoPtr_HasMeshes_Private_Static_Boolean_0, 0, (void**)ptr, ref intPtr2);
			Il2CppException.RaiseExceptionIfNecessary(intPtr2);
			return *IL2CPP.il2cpp_object_unbox(intPtr);
		}

		// Token: 0x0600A5CB RID: 42443 RVA: 0x002A8200 File Offset: 0x002A6400
		[CallerCount(0)]
		[CachedScanResults(RefRangeStart = 0, RefRangeEnd = 0, XrefRangeStart = 654407, XrefRangeEnd = 654432, MetadataInitTokenRva = 0L, MetadataInitFlagRva = 0L)]
		public unsafe static void Cleanup()
		{
			IntPtr* ptr = null;
			IntPtr intPtr2;
			IntPtr intPtr = IL2CPP.il2cpp_runtime_invoke(Triangles.NativeMethodInfoPtr_Cleanup_Private_Static_Void_0, 0, (void**)ptr, ref intPtr2);
			Il2CppException.RaiseExceptionIfNecessary(intPtr2);
		}

		// Token: 0x0600A5CC RID: 42444 RVA: 0x002A8234 File Offset: 0x002A6434
		[CallerCount(0)]
		[CachedScanResults(RefRangeStart = 0, RefRangeEnd = 0, XrefRangeStart = 654432, XrefRangeEnd = 654474, MetadataInitTokenRva = 0L, MetadataInitFlagRva = 0L)]
		public unsafe static Il2CppReferenceArray<Mesh> GetMeshes(int totalWidth, int totalHeight)
		{
			IntPtr* ptr;
			checked
			{
				ptr = stackalloc IntPtr[unchecked((UIntPtr)2) * (UIntPtr)sizeof(IntPtr)];
				*ptr = ref totalWidth;
			}
			ptr[checked(unchecked((UIntPtr)1) * (UIntPtr)sizeof(IntPtr)) / (UIntPtr)sizeof(IntPtr)] = ref totalHeight;
			IntPtr intPtr2;
			IntPtr intPtr = IL2CPP.il2cpp_runtime_invoke(Triangles.NativeMethodInfoPtr_GetMeshes_Private_Static_Il2CppReferenceArray_1_Mesh_Int32_Int32_0, 0, (void**)ptr, ref intPtr2);
			Il2CppException.RaiseExceptionIfNecessary(intPtr2);
			IntPtr intPtr3 = intPtr;
			return (intPtr3 != 0) ? new Il2CppReferenceArray<Mesh>(intPtr3) : null;
		}

		// Token: 0x0600A5CD RID: 42445 RVA: 0x002A82A0 File Offset: 0x002A64A0
		[CallerCount(1)]
		[CachedScanResults(RefRangeStart = 654496, RefRangeEnd = 654497, XrefRangeStart = 654474, XrefRangeEnd = 654496, MetadataInitTokenRva = 0L, MetadataInitFlagRva = 0L)]
		public unsafe static Mesh GetMesh(int triCount, int triOffset, int totalWidth, int totalHeight)
		{
			IntPtr* ptr;
			checked
			{
				ptr = stackalloc IntPtr[unchecked((UIntPtr)4) * (UIntPtr)sizeof(IntPtr)];
				*ptr = ref triCount;
			}
			ptr[checked(unchecked((UIntPtr)1) * (UIntPtr)sizeof(IntPtr)) / (UIntPtr)sizeof(IntPtr)] = ref triOffset;
			ptr[checked(unchecked((UIntPtr)2) * (UIntPtr)sizeof(IntPtr)) / (UIntPtr)sizeof(IntPtr)] = ref totalWidth;
			ptr[checked(unchecked((UIntPtr)3) * (UIntPtr)sizeof(IntPtr)) / (UIntPtr)sizeof(IntPtr)] = ref totalHeight;
			IntPtr intPtr2;
			IntPtr intPtr = IL2CPP.il2cpp_runtime_invoke(Triangles.NativeMethodInfoPtr_GetMesh_Private_Static_Mesh_Int32_Int32_Int32_Int32_0, 0, (void**)ptr, ref intPtr2);
			Il2CppException.RaiseExceptionIfNecessary(intPtr2);
			IntPtr intPtr3 = intPtr;
			return (intPtr3 != 0) ? new Mesh(intPtr3) : null;
		}

		// Token: 0x0600A5CE RID: 42446 RVA: 0x002A8334 File Offset: 0x002A6534
		[CallerCount(1664)]
		[CachedScanResults(RefRangeStart = 7711, RefRangeEnd = 9375, XrefRangeStart = 7711, XrefRangeEnd = 9375, MetadataInitTokenRva = 0L, MetadataInitFlagRva = 0L)]
		public unsafe Triangles()
			: this(IL2CPP.il2cpp_object_new(Il2CppClassPointerStore<Triangles>.NativeClassPtr))
		{
			IntPtr* ptr = null;
			IntPtr intPtr2;
			IntPtr intPtr = IL2CPP.il2cpp_runtime_invoke(Triangles.NativeMethodInfoPtr__ctor_Public_Void_0, IL2CPP.Il2CppObjectBaseToPtrNotNull(this), (void**)ptr, ref intPtr2);
			Il2CppException.RaiseExceptionIfNecessary(intPtr2);
		}

		// Token: 0x0600A5CF RID: 42447 RVA: 0x002A8380 File Offset: 0x002A6580
		// Note: this type is marked as 'beforefieldinit'.
		static Triangles()
		{
			Il2CppClassPointerStore<Triangles>.NativeClassPtr = IL2CPP.GetIl2CppClass("Assembly-CSharp.dll", "UnityStandardAssets.ImageEffects", "Triangles");
			IL2CPP.il2cpp_runtime_class_init(Il2CppClassPointerStore<Triangles>.NativeClassPtr);
			Triangles.NativeFieldInfoPtr_meshes = IL2CPP.GetIl2CppField(Il2CppClassPointerStore<Triangles>.NativeClassPtr, "meshes");
			Triangles.NativeFieldInfoPtr_currentTris = IL2CPP.GetIl2CppField(Il2CppClassPointerStore<Triangles>.NativeClassPtr, "currentTris");
			Triangles.NativeMethodInfoPtr_HasMeshes_Private_Static_Boolean_0 = IL2CPP.GetIl2CppMethodByToken(Il2CppClassPointerStore<Triangles>.NativeClassPtr, 100676139);
			Triangles.NativeMethodInfoPtr_Cleanup_Private_Static_Void_0 = IL2CPP.GetIl2CppMethodByToken(Il2CppClassPointerStore<Triangles>.NativeClassPtr, 100676140);
			Triangles.NativeMethodInfoPtr_GetMeshes_Private_Static_Il2CppReferenceArray_1_Mesh_Int32_Int32_0 = IL2CPP.GetIl2CppMethodByToken(Il2CppClassPointerStore<Triangles>.NativeClassPtr, 100676141);
			Triangles.NativeMethodInfoPtr_GetMesh_Private_Static_Mesh_Int32_Int32_Int32_Int32_0 = IL2CPP.GetIl2CppMethodByToken(Il2CppClassPointerStore<Triangles>.NativeClassPtr, 100676142);
			Triangles.NativeMethodInfoPtr__ctor_Public_Void_0 = IL2CPP.GetIl2CppMethodByToken(Il2CppClassPointerStore<Triangles>.NativeClassPtr, 100676143);
		}

		// Token: 0x0600A5D0 RID: 42448 RVA: 0x0000A74C File Offset: 0x0000894C
		public Triangles(IntPtr pointer)
			: base(pointer)
		{
		}

		// Token: 0x17003812 RID: 14354
		// (get) Token: 0x0600A5D1 RID: 42449 RVA: 0x002A843C File Offset: 0x002A663C
		// (set) Token: 0x0600A5D2 RID: 42450 RVA: 0x002A8467 File Offset: 0x002A6667
		public unsafe static Il2CppReferenceArray<Mesh> meshes
		{
			get
			{
				IntPtr intPtr;
				IL2CPP.il2cpp_field_static_get_value(Triangles.NativeFieldInfoPtr_meshes, (void*)(&intPtr));
				IntPtr intPtr2 = intPtr;
				return (intPtr2 != 0) ? new Il2CppReferenceArray<Mesh>(intPtr2) : null;
			}
			set
			{
				IL2CPP.il2cpp_field_static_set_value(Triangles.NativeFieldInfoPtr_meshes, IL2CPP.Il2CppObjectBaseToPtr(value));
			}
		}

		// Token: 0x17003813 RID: 14355
		// (get) Token: 0x0600A5D3 RID: 42451 RVA: 0x002A847C File Offset: 0x002A667C
		// (set) Token: 0x0600A5D4 RID: 42452 RVA: 0x002A849A File Offset: 0x002A669A
		public unsafe static int currentTris
		{
			get
			{
				int num;
				IL2CPP.il2cpp_field_static_get_value(Triangles.NativeFieldInfoPtr_currentTris, (void*)(&num));
				return num;
			}
			set
			{
				IL2CPP.il2cpp_field_static_set_value(Triangles.NativeFieldInfoPtr_currentTris, (void*)(&value));
			}
		}

		// Token: 0x04006F41 RID: 28481
		private static readonly IntPtr NativeFieldInfoPtr_meshes;

		// Token: 0x04006F42 RID: 28482
		private static readonly IntPtr NativeFieldInfoPtr_currentTris;

		// Token: 0x04006F43 RID: 28483
		private static readonly IntPtr NativeMethodInfoPtr_HasMeshes_Private_Static_Boolean_0;

		// Token: 0x04006F44 RID: 28484
		private static readonly IntPtr NativeMethodInfoPtr_Cleanup_Private_Static_Void_0;

		// Token: 0x04006F45 RID: 28485
		private static readonly IntPtr NativeMethodInfoPtr_GetMeshes_Private_Static_Il2CppReferenceArray_1_Mesh_Int32_Int32_0;

		// Token: 0x04006F46 RID: 28486
		private static readonly IntPtr NativeMethodInfoPtr_GetMesh_Private_Static_Mesh_Int32_Int32_Int32_Int32_0;

		// Token: 0x04006F47 RID: 28487
		private static readonly IntPtr NativeMethodInfoPtr__ctor_Public_Void_0;
	}
}
