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

namespace UnityStandardAssets.ImageEffects
{
	// Token: 0x020005EA RID: 1514
	public class Triangles : Il2CppSystem.Object
	{
		// Token: 0x06009D77 RID: 40311 RVA: 0x00285480 File Offset: 0x00283680
		[CallerCount(0)]
		[CachedScanResults(RefRangeStart = 0, RefRangeEnd = 0, XrefRangeStart = 622091, XrefRangeEnd = 622105, 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: 0x06009D78 RID: 40312 RVA: 0x002854C4 File Offset: 0x002836C4
		[CallerCount(0)]
		[CachedScanResults(RefRangeStart = 0, RefRangeEnd = 0, XrefRangeStart = 622105, XrefRangeEnd = 622130, 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: 0x06009D79 RID: 40313 RVA: 0x002854F8 File Offset: 0x002836F8
		[CallerCount(0)]
		[CachedScanResults(RefRangeStart = 0, RefRangeEnd = 0, XrefRangeStart = 622130, XrefRangeEnd = 622172, 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: 0x06009D7A RID: 40314 RVA: 0x00285564 File Offset: 0x00283764
		[CallerCount(1)]
		[CachedScanResults(RefRangeStart = 622194, RefRangeEnd = 622195, XrefRangeStart = 622172, XrefRangeEnd = 622194, 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: 0x06009D7B RID: 40315 RVA: 0x002855F8 File Offset: 0x002837F8
		[CallerCount(1642)]
		[CachedScanResults(RefRangeStart = 7417, RefRangeEnd = 9059, XrefRangeStart = 7417, XrefRangeEnd = 9059, 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: 0x06009D7C RID: 40316 RVA: 0x00285644 File Offset: 0x00283844
		// 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, 100675426);
			Triangles.NativeMethodInfoPtr_Cleanup_Private_Static_Void_0 = IL2CPP.GetIl2CppMethodByToken(Il2CppClassPointerStore<Triangles>.NativeClassPtr, 100675427);
			Triangles.NativeMethodInfoPtr_GetMeshes_Private_Static_Il2CppReferenceArray_1_Mesh_Int32_Int32_0 = IL2CPP.GetIl2CppMethodByToken(Il2CppClassPointerStore<Triangles>.NativeClassPtr, 100675428);
			Triangles.NativeMethodInfoPtr_GetMesh_Private_Static_Mesh_Int32_Int32_Int32_Int32_0 = IL2CPP.GetIl2CppMethodByToken(Il2CppClassPointerStore<Triangles>.NativeClassPtr, 100675429);
			Triangles.NativeMethodInfoPtr__ctor_Public_Void_0 = IL2CPP.GetIl2CppMethodByToken(Il2CppClassPointerStore<Triangles>.NativeClassPtr, 100675430);
		}

		// Token: 0x06009D7D RID: 40317 RVA: 0x0000A688 File Offset: 0x00008888
		public Triangles(IntPtr pointer)
			: base(pointer)
		{
		}

		// Token: 0x17003577 RID: 13687
		// (get) Token: 0x06009D7E RID: 40318 RVA: 0x00285700 File Offset: 0x00283900
		// (set) Token: 0x06009D7F RID: 40319 RVA: 0x0028572B File Offset: 0x0028392B
		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: 0x17003578 RID: 13688
		// (get) Token: 0x06009D80 RID: 40320 RVA: 0x00285740 File Offset: 0x00283940
		// (set) Token: 0x06009D81 RID: 40321 RVA: 0x0028575E File Offset: 0x0028395E
		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: 0x04006998 RID: 27032
		private static readonly IntPtr NativeFieldInfoPtr_meshes;

		// Token: 0x04006999 RID: 27033
		private static readonly IntPtr NativeFieldInfoPtr_currentTris;

		// Token: 0x0400699A RID: 27034
		private static readonly IntPtr NativeMethodInfoPtr_HasMeshes_Private_Static_Boolean_0;

		// Token: 0x0400699B RID: 27035
		private static readonly IntPtr NativeMethodInfoPtr_Cleanup_Private_Static_Void_0;

		// Token: 0x0400699C RID: 27036
		private static readonly IntPtr NativeMethodInfoPtr_GetMeshes_Private_Static_Il2CppReferenceArray_1_Mesh_Int32_Int32_0;

		// Token: 0x0400699D RID: 27037
		private static readonly IntPtr NativeMethodInfoPtr_GetMesh_Private_Static_Mesh_Int32_Int32_Int32_Int32_0;

		// Token: 0x0400699E RID: 27038
		private static readonly IntPtr NativeMethodInfoPtr__ctor_Public_Void_0;
	}
}
