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

namespace MTAssets.UltimateLODSystem.MeshSimplifier.Internal
{
	// Token: 0x0200068B RID: 1675
	public class UVChannels<TVec> : Object
	{
		// Token: 0x17003961 RID: 14689
		// (get) Token: 0x0600AA19 RID: 43545 RVA: 0x002BBD08 File Offset: 0x002B9F08
		public unsafe Il2CppReferenceArray<Il2CppArrayBase<TVec>> Data
		{
			[CallerCount(3)]
			[CachedScanResults(RefRangeStart = 658695, RefRangeEnd = 658698, XrefRangeStart = 658685, XrefRangeEnd = 658695, 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: 0x17003962 RID: 14690
		public unsafe ResizableArray<TVec> this[int index]
		{
			[CallerCount(4)]
			[CachedScanResults(RefRangeStart = 48578, RefRangeEnd = 48582, XrefRangeStart = 48578, XrefRangeEnd = 48582, 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 = 658698, XrefRangeEnd = 658705, 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: 0x0600AA1C RID: 43548 RVA: 0x002BBE28 File Offset: 0x002BA028
		[CallerCount(3)]
		[CachedScanResults(RefRangeStart = 658719, RefRangeEnd = 658722, XrefRangeStart = 658705, XrefRangeEnd = 658719, 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: 0x0600AA1D RID: 43549 RVA: 0x002BBE74 File Offset: 0x002BA074
		[CallerCount(3)]
		[CachedScanResults(RefRangeStart = 658728, RefRangeEnd = 658731, XrefRangeStart = 658722, XrefRangeEnd = 658728, 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: 0x0600AA1E RID: 43550 RVA: 0x002BBEDC File Offset: 0x002BA0DC
		// 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, 100676566);
			UVChannels<TVec>.NativeMethodInfoPtr_get_Item_Public_get_ResizableArray_1_TVec_Int32_0 = IL2CPP.GetIl2CppMethodByToken(Il2CppClassPointerStore<UVChannels<TVec>>.NativeClassPtr, 100676567);
			UVChannels<TVec>.NativeMethodInfoPtr_set_Item_Public_set_Void_Int32_ResizableArray_1_TVec_0 = IL2CPP.GetIl2CppMethodByToken(Il2CppClassPointerStore<UVChannels<TVec>>.NativeClassPtr, 100676568);
			UVChannels<TVec>.NativeMethodInfoPtr__ctor_Public_Void_0 = IL2CPP.GetIl2CppMethodByToken(Il2CppClassPointerStore<UVChannels<TVec>>.NativeClassPtr, 100676569);
			UVChannels<TVec>.NativeMethodInfoPtr_Resize_Public_Void_Int32_Boolean_0 = IL2CPP.GetIl2CppMethodByToken(Il2CppClassPointerStore<UVChannels<TVec>>.NativeClassPtr, 100676570);
		}

		// Token: 0x0600AA1F RID: 43551 RVA: 0x0000A74C File Offset: 0x0000894C
		public UVChannels(IntPtr pointer)
			: base(pointer)
		{
		}

		// Token: 0x1700395E RID: 14686
		// (get) Token: 0x0600AA20 RID: 43552 RVA: 0x002BBFE8 File Offset: 0x002BA1E8
		// (set) Token: 0x0600AA21 RID: 43553 RVA: 0x002BC006 File Offset: 0x002BA206
		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: 0x1700395F RID: 14687
		// (get) Token: 0x0600AA22 RID: 43554 RVA: 0x002BC018 File Offset: 0x002BA218
		// (set) Token: 0x0600AA23 RID: 43555 RVA: 0x002BC04C File Offset: 0x002BA24C
		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: 0x17003960 RID: 14688
		// (get) Token: 0x0600AA24 RID: 43556 RVA: 0x002BC074 File Offset: 0x002BA274
		// (set) Token: 0x0600AA25 RID: 43557 RVA: 0x002BC09D File Offset: 0x002BA29D
		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: 0x0400726C RID: 29292
		private static readonly IntPtr NativeFieldInfoPtr_UVChannelCount;

		// Token: 0x0400726D RID: 29293
		private static readonly IntPtr NativeFieldInfoPtr_channels;

		// Token: 0x0400726E RID: 29294
		private static readonly IntPtr NativeFieldInfoPtr_channelsData;

		// Token: 0x0400726F RID: 29295
		private static readonly IntPtr NativeMethodInfoPtr_get_Data_Public_get_Il2CppReferenceArray_1_Il2CppArrayBase_1_TVec_0;

		// Token: 0x04007270 RID: 29296
		private static readonly IntPtr NativeMethodInfoPtr_get_Item_Public_get_ResizableArray_1_TVec_Int32_0;

		// Token: 0x04007271 RID: 29297
		private static readonly IntPtr NativeMethodInfoPtr_set_Item_Public_set_Void_Int32_ResizableArray_1_TVec_0;

		// Token: 0x04007272 RID: 29298
		private static readonly IntPtr NativeMethodInfoPtr__ctor_Public_Void_0;

		// Token: 0x04007273 RID: 29299
		private static readonly IntPtr NativeMethodInfoPtr_Resize_Public_Void_Int32_Boolean_0;
	}
}
