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

namespace MTAssets.UltimateLODSystem.MeshSimplifier.Internal
{
	// Token: 0x02000633 RID: 1587
	public class UVChannels<TVec> : Object
	{
		// Token: 0x170036C6 RID: 14022
		// (get) Token: 0x0600A1C6 RID: 41414 RVA: 0x00298FCC File Offset: 0x002971CC
		public unsafe Il2CppReferenceArray<Il2CppArrayBase<TVec>> Data
		{
			[CallerCount(3)]
			[CachedScanResults(RefRangeStart = 626394, RefRangeEnd = 626397, XrefRangeStart = 626384, XrefRangeEnd = 626394, MetadataInitTokenRva = 0L, MetadataInitFlagRva = 0L)]
			get
			{
				IL2CPP.Il2CppObjectBaseToPtrNotNull(this);
				IntPtr* ptr = null;
				IntPtr intPtr2;
				IntPtr intPtr = IL2CPP.il2cpp_runtime_invoke(UVChannels<TVec>.NativeMethodInfoPtr_get_Data_Public_get_Il2CppReferenceArray_1_Il2CppArrayBase_1_TVec_0, IL2CPP.Il2CppObjectBaseToPtrNotNull(this), (void**)ptr, ref intPtr2);
				Il2CppException.RaiseExceptionIfNecessary(intPtr2);
				return Il2CppReferenceArray<Il2CppArrayBase<TVec>>.WrapNativeGenericArrayPointer(intPtr);
			}
		}

		// Token: 0x170036C7 RID: 14023
		public unsafe ResizableArray<TVec> this[int index]
		{
			[CallerCount(4)]
			[CachedScanResults(RefRangeStart = 48577, RefRangeEnd = 48581, XrefRangeStart = 48577, XrefRangeEnd = 48581, MetadataInitTokenRva = 0L, MetadataInitFlagRva = 0L)]
			get
			{
				IL2CPP.Il2CppObjectBaseToPtrNotNull(this);
				checked
				{
					IntPtr* ptr = stackalloc IntPtr[unchecked((UIntPtr)1) * (UIntPtr)sizeof(IntPtr)];
					*ptr = ref index;
					IntPtr intPtr2;
					IntPtr intPtr = IL2CPP.il2cpp_runtime_invoke(UVChannels<TVec>.NativeMethodInfoPtr_get_Item_Public_get_ResizableArray_1_TVec_Int32_0, IL2CPP.Il2CppObjectBaseToPtrNotNull(this), (void**)ptr, ref intPtr2);
					Il2CppException.RaiseExceptionIfNecessary(intPtr2);
					IntPtr intPtr3 = intPtr;
					return (intPtr3 != 0) ? new ResizableArray<TVec>(intPtr3) : null;
				}
			}
			[CallerCount(0)]
			[CachedScanResults(RefRangeStart = 0, RefRangeEnd = 0, XrefRangeStart = 626397, XrefRangeEnd = 626404, MetadataInitTokenRva = 0L, MetadataInitFlagRva = 0L)]
			set
			{
				IL2CPP.Il2CppObjectBaseToPtrNotNull(this);
				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)] = IL2CPP.Il2CppObjectBaseToPtr(value);
				IntPtr intPtr2;
				IntPtr intPtr = IL2CPP.il2cpp_runtime_invoke(UVChannels<TVec>.NativeMethodInfoPtr_set_Item_Public_set_Void_Int32_ResizableArray_1_TVec_0, IL2CPP.Il2CppObjectBaseToPtrNotNull(this), (void**)ptr, ref intPtr2);
				Il2CppException.RaiseExceptionIfNecessary(intPtr2);
			}
		}

		// Token: 0x0600A1C9 RID: 41417 RVA: 0x002990EC File Offset: 0x002972EC
		[CallerCount(3)]
		[CachedScanResults(RefRangeStart = 626418, RefRangeEnd = 626421, XrefRangeStart = 626404, XrefRangeEnd = 626418, MetadataInitTokenRva = 0L, MetadataInitFlagRva = 0L)]
		public unsafe UVChannels()
			: this(IL2CPP.il2cpp_object_new(Il2CppClassPointerStore<UVChannels<TVec>>.NativeClassPtr))
		{
			IntPtr* ptr = null;
			IntPtr intPtr2;
			IntPtr intPtr = IL2CPP.il2cpp_runtime_invoke(UVChannels<TVec>.NativeMethodInfoPtr__ctor_Public_Void_0, IL2CPP.Il2CppObjectBaseToPtrNotNull(this), (void**)ptr, ref intPtr2);
			Il2CppException.RaiseExceptionIfNecessary(intPtr2);
		}

		// Token: 0x0600A1CA RID: 41418 RVA: 0x00299138 File Offset: 0x00297338
		[CallerCount(3)]
		[CachedScanResults(RefRangeStart = 626427, RefRangeEnd = 626430, XrefRangeStart = 626421, XrefRangeEnd = 626427, MetadataInitTokenRva = 0L, MetadataInitFlagRva = 0L)]
		public unsafe void Resize(int capacity, bool trimExess = false)
		{
			IL2CPP.Il2CppObjectBaseToPtrNotNull(this);
			IntPtr* ptr;
			checked
			{
				ptr = stackalloc IntPtr[unchecked((UIntPtr)2) * (UIntPtr)sizeof(IntPtr)];
				*ptr = ref capacity;
			}
			ptr[checked(unchecked((UIntPtr)1) * (UIntPtr)sizeof(IntPtr)) / (UIntPtr)sizeof(IntPtr)] = ref trimExess;
			IntPtr intPtr2;
			IntPtr intPtr = IL2CPP.il2cpp_runtime_invoke(UVChannels<TVec>.NativeMethodInfoPtr_Resize_Public_Void_Int32_Boolean_0, IL2CPP.Il2CppObjectBaseToPtrNotNull(this), (void**)ptr, ref intPtr2);
			Il2CppException.RaiseExceptionIfNecessary(intPtr2);
		}

		// Token: 0x0600A1CB RID: 41419 RVA: 0x002991A0 File Offset: 0x002973A0
		// Note: this type is marked as 'beforefieldinit'.
		static UVChannels()
		{
			Il2CppClassPointerStore<UVChannels<TVec>>.NativeClassPtr = IL2CPP.il2cpp_class_from_type(Type.internal_from_handle(IL2CPP.il2cpp_class_get_type(IL2CPP.GetIl2CppClass("Assembly-CSharp.dll", "MTAssets.UltimateLODSystem.MeshSimplifier.Internal", "UVChannels`1"))).MakeGenericType(new Il2CppReferenceArray<Type>(new Type[] { Type.internal_from_handle(IL2CPP.il2cpp_class_get_type(Il2CppClassPointerStore<TVec>.NativeClassPtr)) })).TypeHandle.value);
			IL2CPP.il2cpp_runtime_class_init(Il2CppClassPointerStore<UVChannels<TVec>>.NativeClassPtr);
			UVChannels<TVec>.NativeFieldInfoPtr_UVChannelCount = IL2CPP.GetIl2CppField(Il2CppClassPointerStore<UVChannels<TVec>>.NativeClassPtr, "UVChannelCount");
			UVChannels<TVec>.NativeFieldInfoPtr_channels = IL2CPP.GetIl2CppField(Il2CppClassPointerStore<UVChannels<TVec>>.NativeClassPtr, "channels");
			UVChannels<TVec>.NativeFieldInfoPtr_channelsData = IL2CPP.GetIl2CppField(Il2CppClassPointerStore<UVChannels<TVec>>.NativeClassPtr, "channelsData");
			UVChannels<TVec>.NativeMethodInfoPtr_get_Data_Public_get_Il2CppReferenceArray_1_Il2CppArrayBase_1_TVec_0 = IL2CPP.GetIl2CppMethodByToken(Il2CppClassPointerStore<UVChannels<TVec>>.NativeClassPtr, 100675853);
			UVChannels<TVec>.NativeMethodInfoPtr_get_Item_Public_get_ResizableArray_1_TVec_Int32_0 = IL2CPP.GetIl2CppMethodByToken(Il2CppClassPointerStore<UVChannels<TVec>>.NativeClassPtr, 100675854);
			UVChannels<TVec>.NativeMethodInfoPtr_set_Item_Public_set_Void_Int32_ResizableArray_1_TVec_0 = IL2CPP.GetIl2CppMethodByToken(Il2CppClassPointerStore<UVChannels<TVec>>.NativeClassPtr, 100675855);
			UVChannels<TVec>.NativeMethodInfoPtr__ctor_Public_Void_0 = IL2CPP.GetIl2CppMethodByToken(Il2CppClassPointerStore<UVChannels<TVec>>.NativeClassPtr, 100675856);
			UVChannels<TVec>.NativeMethodInfoPtr_Resize_Public_Void_Int32_Boolean_0 = IL2CPP.GetIl2CppMethodByToken(Il2CppClassPointerStore<UVChannels<TVec>>.NativeClassPtr, 100675857);
		}

		// Token: 0x0600A1CC RID: 41420 RVA: 0x0000A688 File Offset: 0x00008888
		public UVChannels(IntPtr pointer)
			: base(pointer)
		{
		}

		// Token: 0x170036C3 RID: 14019
		// (get) Token: 0x0600A1CD RID: 41421 RVA: 0x002992AC File Offset: 0x002974AC
		// (set) Token: 0x0600A1CE RID: 41422 RVA: 0x002992CA File Offset: 0x002974CA
		public unsafe static int UVChannelCount
		{
			get
			{
				int num;
				IL2CPP.il2cpp_field_static_get_value(UVChannels<TVec>.NativeFieldInfoPtr_UVChannelCount, (void*)(&num));
				return num;
			}
			set
			{
				IL2CPP.il2cpp_field_static_set_value(UVChannels<TVec>.NativeFieldInfoPtr_UVChannelCount, (void*)(&value));
			}
		}

		// Token: 0x170036C4 RID: 14020
		// (get) Token: 0x0600A1CF RID: 41423 RVA: 0x002992DC File Offset: 0x002974DC
		// (set) Token: 0x0600A1D0 RID: 41424 RVA: 0x00299310 File Offset: 0x00297510
		public unsafe Il2CppReferenceArray<ResizableArray<TVec>> channels
		{
			get
			{
				IntPtr intPtr = IL2CPP.Il2CppObjectBaseToPtrNotNull(this) + (IntPtr)IL2CPP.il2cpp_field_get_offset(UVChannels<TVec>.NativeFieldInfoPtr_channels);
				IntPtr intPtr2 = *intPtr;
				return (intPtr2 != 0) ? new Il2CppReferenceArray<ResizableArray<TVec>>(intPtr2) : null;
			}
			set
			{
				IntPtr intPtr = IL2CPP.Il2CppObjectBaseToPtrNotNull(this);
				IL2CPP.il2cpp_gc_wbarrier_set_field(intPtr, intPtr + (IntPtr)IL2CPP.il2cpp_field_get_offset(UVChannels<TVec>.NativeFieldInfoPtr_channels), IL2CPP.Il2CppObjectBaseToPtr(value));
			}
		}

		// Token: 0x170036C5 RID: 14021
		// (get) Token: 0x0600A1D1 RID: 41425 RVA: 0x00299338 File Offset: 0x00297538
		// (set) Token: 0x0600A1D2 RID: 41426 RVA: 0x00299361 File Offset: 0x00297561
		public unsafe Il2CppReferenceArray<Il2CppArrayBase<TVec>> channelsData
		{
			get
			{
				IntPtr intPtr = IL2CPP.Il2CppObjectBaseToPtrNotNull(this) + (IntPtr)IL2CPP.il2cpp_field_get_offset(UVChannels<TVec>.NativeFieldInfoPtr_channelsData);
				return Il2CppReferenceArray<Il2CppArrayBase<TVec>>.WrapNativeGenericArrayPointer(*intPtr);
			}
			set
			{
				IntPtr intPtr = IL2CPP.Il2CppObjectBaseToPtrNotNull(this);
				IL2CPP.il2cpp_gc_wbarrier_set_field(intPtr, intPtr + (IntPtr)IL2CPP.il2cpp_field_get_offset(UVChannels<TVec>.NativeFieldInfoPtr_channelsData), IL2CPP.Il2CppObjectBaseToPtr(value));
			}
		}

		// Token: 0x04006CC3 RID: 27843
		private static readonly IntPtr NativeFieldInfoPtr_UVChannelCount;

		// Token: 0x04006CC4 RID: 27844
		private static readonly IntPtr NativeFieldInfoPtr_channels;

		// Token: 0x04006CC5 RID: 27845
		private static readonly IntPtr NativeFieldInfoPtr_channelsData;

		// Token: 0x04006CC6 RID: 27846
		private static readonly IntPtr NativeMethodInfoPtr_get_Data_Public_get_Il2CppReferenceArray_1_Il2CppArrayBase_1_TVec_0;

		// Token: 0x04006CC7 RID: 27847
		private static readonly IntPtr NativeMethodInfoPtr_get_Item_Public_get_ResizableArray_1_TVec_Int32_0;

		// Token: 0x04006CC8 RID: 27848
		private static readonly IntPtr NativeMethodInfoPtr_set_Item_Public_set_Void_Int32_ResizableArray_1_TVec_0;

		// Token: 0x04006CC9 RID: 27849
		private static readonly IntPtr NativeMethodInfoPtr__ctor_Public_Void_0;

		// Token: 0x04006CCA RID: 27850
		private static readonly IntPtr NativeMethodInfoPtr_Resize_Public_Void_Int32_Boolean_0;
	}
}
