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

namespace UnityStandardAssets.ImageEffects
{
	// Token: 0x02000632 RID: 1586
	public class Quads : Il2CppSystem.Object
	{
		// Token: 0x0600A520 RID: 42272 RVA: 0x002A5A38 File Offset: 0x002A3C38
		[CallerCount(0)]
		[CachedScanResults(RefRangeStart = 0, RefRangeEnd = 0, XrefRangeStart = 653778, XrefRangeEnd = 653789, MetadataInitTokenRva = 0L, MetadataInitFlagRva = 0L)]
		public unsafe static bool HasMeshes()
		{
			IntPtr* ptr = null;
			IntPtr intPtr2;
			IntPtr intPtr = IL2CPP.il2cpp_runtime_invoke(Quads.NativeMethodInfoPtr_HasMeshes_Private_Static_Boolean_0, 0, (void**)ptr, ref intPtr2);
			Il2CppException.RaiseExceptionIfNecessary(intPtr2);
			return *IL2CPP.il2cpp_object_unbox(intPtr);
		}

		// Token: 0x0600A521 RID: 42273 RVA: 0x002A5A7C File Offset: 0x002A3C7C
		[CallerCount(1)]
		[CachedScanResults(RefRangeStart = 653814, RefRangeEnd = 653815, XrefRangeStart = 653789, XrefRangeEnd = 653814, MetadataInitTokenRva = 0L, MetadataInitFlagRva = 0L)]
		public unsafe static void Cleanup()
		{
			IntPtr* ptr = null;
			IntPtr intPtr2;
			IntPtr intPtr = IL2CPP.il2cpp_runtime_invoke(Quads.NativeMethodInfoPtr_Cleanup_Public_Static_Void_0, 0, (void**)ptr, ref intPtr2);
			Il2CppException.RaiseExceptionIfNecessary(intPtr2);
		}

		// Token: 0x0600A522 RID: 42274 RVA: 0x002A5AB0 File Offset: 0x002A3CB0
		[CallerCount(1)]
		[CachedScanResults(RefRangeStart = 653850, RefRangeEnd = 653851, XrefRangeStart = 653815, XrefRangeEnd = 653850, 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(Quads.NativeMethodInfoPtr_GetMeshes_Public_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: 0x0600A523 RID: 42275 RVA: 0x002A5B1C File Offset: 0x002A3D1C
		[CallerCount(1)]
		[CachedScanResults(RefRangeStart = 653873, RefRangeEnd = 653874, XrefRangeStart = 653851, XrefRangeEnd = 653873, 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(Quads.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: 0x0600A524 RID: 42276 RVA: 0x002A5BB0 File Offset: 0x002A3DB0
		[CallerCount(1664)]
		[CachedScanResults(RefRangeStart = 7711, RefRangeEnd = 9375, XrefRangeStart = 7711, XrefRangeEnd = 9375, MetadataInitTokenRva = 0L, MetadataInitFlagRva = 0L)]
		public unsafe Quads()
			: this(IL2CPP.il2cpp_object_new(Il2CppClassPointerStore<Quads>.NativeClassPtr))
		{
			IntPtr* ptr = null;
			IntPtr intPtr2;
			IntPtr intPtr = IL2CPP.il2cpp_runtime_invoke(Quads.NativeMethodInfoPtr__ctor_Public_Void_0, IL2CPP.Il2CppObjectBaseToPtrNotNull(this), (void**)ptr, ref intPtr2);
			Il2CppException.RaiseExceptionIfNecessary(intPtr2);
		}

		// Token: 0x0600A525 RID: 42277 RVA: 0x002A5BFC File Offset: 0x002A3DFC
		// Note: this type is marked as 'beforefieldinit'.
		static Quads()
		{
			Il2CppClassPointerStore<Quads>.NativeClassPtr = IL2CPP.GetIl2CppClass("Assembly-CSharp.dll", "UnityStandardAssets.ImageEffects", "Quads");
			IL2CPP.il2cpp_runtime_class_init(Il2CppClassPointerStore<Quads>.NativeClassPtr);
			Quads.NativeFieldInfoPtr_meshes = IL2CPP.GetIl2CppField(Il2CppClassPointerStore<Quads>.NativeClassPtr, "meshes");
			Quads.NativeFieldInfoPtr_currentQuads = IL2CPP.GetIl2CppField(Il2CppClassPointerStore<Quads>.NativeClassPtr, "currentQuads");
			Quads.NativeMethodInfoPtr_HasMeshes_Private_Static_Boolean_0 = IL2CPP.GetIl2CppMethodByToken(Il2CppClassPointerStore<Quads>.NativeClassPtr, 100676104);
			Quads.NativeMethodInfoPtr_Cleanup_Public_Static_Void_0 = IL2CPP.GetIl2CppMethodByToken(Il2CppClassPointerStore<Quads>.NativeClassPtr, 100676105);
			Quads.NativeMethodInfoPtr_GetMeshes_Public_Static_Il2CppReferenceArray_1_Mesh_Int32_Int32_0 = IL2CPP.GetIl2CppMethodByToken(Il2CppClassPointerStore<Quads>.NativeClassPtr, 100676106);
			Quads.NativeMethodInfoPtr_GetMesh_Private_Static_Mesh_Int32_Int32_Int32_Int32_0 = IL2CPP.GetIl2CppMethodByToken(Il2CppClassPointerStore<Quads>.NativeClassPtr, 100676107);
			Quads.NativeMethodInfoPtr__ctor_Public_Void_0 = IL2CPP.GetIl2CppMethodByToken(Il2CppClassPointerStore<Quads>.NativeClassPtr, 100676108);
		}

		// Token: 0x0600A526 RID: 42278 RVA: 0x0000A74C File Offset: 0x0000894C
		public Quads(IntPtr pointer)
			: base(pointer)
		{
		}

		// Token: 0x170037D6 RID: 14294
		// (get) Token: 0x0600A527 RID: 42279 RVA: 0x002A5CB8 File Offset: 0x002A3EB8
		// (set) Token: 0x0600A528 RID: 42280 RVA: 0x002A5CE3 File Offset: 0x002A3EE3
		public unsafe static Il2CppReferenceArray<Mesh> meshes
		{
			get
			{
				IntPtr intPtr;
				IL2CPP.il2cpp_field_static_get_value(Quads.NativeFieldInfoPtr_meshes, (void*)(&intPtr));
				IntPtr intPtr2 = intPtr;
				return (intPtr2 != 0) ? new Il2CppReferenceArray<Mesh>(intPtr2) : null;
			}
			set
			{
				IL2CPP.il2cpp_field_static_set_value(Quads.NativeFieldInfoPtr_meshes, IL2CPP.Il2CppObjectBaseToPtr(value));
			}
		}

		// Token: 0x170037D7 RID: 14295
		// (get) Token: 0x0600A529 RID: 42281 RVA: 0x002A5CF8 File Offset: 0x002A3EF8
		// (set) Token: 0x0600A52A RID: 42282 RVA: 0x002A5D16 File Offset: 0x002A3F16
		public unsafe static int currentQuads
		{
			get
			{
				int num;
				IL2CPP.il2cpp_field_static_get_value(Quads.NativeFieldInfoPtr_currentQuads, (void*)(&num));
				return num;
			}
			set
			{
				IL2CPP.il2cpp_field_static_set_value(Quads.NativeFieldInfoPtr_currentQuads, (void*)(&value));
			}
		}

		// Token: 0x04006EBA RID: 28346
		private static readonly IntPtr NativeFieldInfoPtr_meshes;

		// Token: 0x04006EBB RID: 28347
		private static readonly IntPtr NativeFieldInfoPtr_currentQuads;

		// Token: 0x04006EBC RID: 28348
		private static readonly IntPtr NativeMethodInfoPtr_HasMeshes_Private_Static_Boolean_0;

		// Token: 0x04006EBD RID: 28349
		private static readonly IntPtr NativeMethodInfoPtr_Cleanup_Public_Static_Void_0;

		// Token: 0x04006EBE RID: 28350
		private static readonly IntPtr NativeMethodInfoPtr_GetMeshes_Public_Static_Il2CppReferenceArray_1_Mesh_Int32_Int32_0;

		// Token: 0x04006EBF RID: 28351
		private static readonly IntPtr NativeMethodInfoPtr_GetMesh_Private_Static_Mesh_Int32_Int32_Int32_Int32_0;

		// Token: 0x04006EC0 RID: 28352
		private static readonly IntPtr NativeMethodInfoPtr__ctor_Public_Void_0;
	}
}
