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

namespace MTAssets.UltimateLODSystem.MeshSimplifier.Internal
{
	// Token: 0x02000685 RID: 1669
	public class BlendShapeContainer : Il2CppSystem.Object
	{
		// Token: 0x0600A9E8 RID: 43496 RVA: 0x002BACA8 File Offset: 0x002B8EA8
		[CallerCount(2)]
		[CachedScanResults(RefRangeStart = 658599, RefRangeEnd = 658601, XrefRangeStart = 658569, XrefRangeEnd = 658599, MetadataInitTokenRva = 0L, MetadataInitFlagRva = 0L)]
		public unsafe BlendShapeContainer(BlendShape blendShape)
			: this(IL2CPP.il2cpp_object_new(Il2CppClassPointerStore<BlendShapeContainer>.NativeClassPtr))
		{
			checked
			{
				IntPtr* ptr = stackalloc IntPtr[unchecked((UIntPtr)1) * (UIntPtr)sizeof(IntPtr)];
				*ptr = IL2CPP.il2cpp_object_unbox(IL2CPP.Il2CppObjectBaseToPtrNotNull(blendShape));
				IntPtr intPtr2;
				IntPtr intPtr = IL2CPP.il2cpp_runtime_invoke(BlendShapeContainer.NativeMethodInfoPtr__ctor_Public_Void_BlendShape_0, IL2CPP.Il2CppObjectBaseToPtrNotNull(this), (void**)ptr, ref intPtr2);
				Il2CppException.RaiseExceptionIfNecessary(intPtr2);
			}
		}

		// Token: 0x0600A9E9 RID: 43497 RVA: 0x002BAD10 File Offset: 0x002B8F10
		[CallerCount(1)]
		[CachedScanResults(RefRangeStart = 658604, RefRangeEnd = 658605, XrefRangeStart = 658601, XrefRangeEnd = 658604, MetadataInitTokenRva = 0L, MetadataInitFlagRva = 0L)]
		public unsafe void MoveVertexElement(int dst, int src)
		{
			IL2CPP.Il2CppObjectBaseToPtrNotNull(this);
			IntPtr* ptr;
			checked
			{
				ptr = stackalloc IntPtr[unchecked((UIntPtr)2) * (UIntPtr)sizeof(IntPtr)];
				*ptr = ref dst;
			}
			ptr[checked(unchecked((UIntPtr)1) * (UIntPtr)sizeof(IntPtr)) / (UIntPtr)sizeof(IntPtr)] = ref src;
			IntPtr intPtr2;
			IntPtr intPtr = IL2CPP.il2cpp_runtime_invoke(BlendShapeContainer.NativeMethodInfoPtr_MoveVertexElement_Public_Void_Int32_Int32_0, IL2CPP.Il2CppObjectBaseToPtrNotNull(this), (void**)ptr, ref intPtr2);
			Il2CppException.RaiseExceptionIfNecessary(intPtr2);
		}

		// Token: 0x0600A9EA RID: 43498 RVA: 0x002BAD78 File Offset: 0x002B8F78
		[CallerCount(0)]
		[CachedScanResults(RefRangeStart = 0, RefRangeEnd = 0, XrefRangeStart = 658605, XrefRangeEnd = 658607, MetadataInitTokenRva = 0L, MetadataInitFlagRva = 0L)]
		public unsafe void InterpolateVertexAttributes(int dst, int i0, int i1, int i2, ref Vector3 barycentricCoord)
		{
			IL2CPP.Il2CppObjectBaseToPtrNotNull(this);
			IntPtr* ptr;
			checked
			{
				ptr = stackalloc IntPtr[unchecked((UIntPtr)5) * (UIntPtr)sizeof(IntPtr)];
				*ptr = ref dst;
			}
			ptr[checked(unchecked((UIntPtr)1) * (UIntPtr)sizeof(IntPtr)) / (UIntPtr)sizeof(IntPtr)] = ref i0;
			ptr[checked(unchecked((UIntPtr)2) * (UIntPtr)sizeof(IntPtr)) / (UIntPtr)sizeof(IntPtr)] = ref i1;
			ptr[checked(unchecked((UIntPtr)3) * (UIntPtr)sizeof(IntPtr)) / (UIntPtr)sizeof(IntPtr)] = ref i2;
			ptr[checked(unchecked((UIntPtr)4) * (UIntPtr)sizeof(IntPtr)) / (UIntPtr)sizeof(IntPtr)] = &barycentricCoord;
			IntPtr intPtr2;
			IntPtr intPtr = IL2CPP.il2cpp_runtime_invoke(BlendShapeContainer.NativeMethodInfoPtr_InterpolateVertexAttributes_Public_Void_Int32_Int32_Int32_Int32_byref_Vector3_0, IL2CPP.Il2CppObjectBaseToPtrNotNull(this), (void**)ptr, ref intPtr2);
			Il2CppException.RaiseExceptionIfNecessary(intPtr2);
		}

		// Token: 0x0600A9EB RID: 43499 RVA: 0x002BAE1C File Offset: 0x002B901C
		[CallerCount(1)]
		[CachedScanResults(RefRangeStart = 658615, RefRangeEnd = 658616, XrefRangeStart = 658607, XrefRangeEnd = 658615, MetadataInitTokenRva = 0L, MetadataInitFlagRva = 0L)]
		public unsafe void Resize(int length, bool trimExess = false)
		{
			IL2CPP.Il2CppObjectBaseToPtrNotNull(this);
			IntPtr* ptr;
			checked
			{
				ptr = stackalloc IntPtr[unchecked((UIntPtr)2) * (UIntPtr)sizeof(IntPtr)];
				*ptr = ref length;
			}
			ptr[checked(unchecked((UIntPtr)1) * (UIntPtr)sizeof(IntPtr)) / (UIntPtr)sizeof(IntPtr)] = ref trimExess;
			IntPtr intPtr2;
			IntPtr intPtr = IL2CPP.il2cpp_runtime_invoke(BlendShapeContainer.NativeMethodInfoPtr_Resize_Public_Void_Int32_Boolean_0, IL2CPP.Il2CppObjectBaseToPtrNotNull(this), (void**)ptr, ref intPtr2);
			Il2CppException.RaiseExceptionIfNecessary(intPtr2);
		}

		// Token: 0x0600A9EC RID: 43500 RVA: 0x002BAE84 File Offset: 0x002B9084
		[CallerCount(3)]
		[CachedScanResults(RefRangeStart = 658633, RefRangeEnd = 658636, XrefRangeStart = 658616, XrefRangeEnd = 658633, MetadataInitTokenRva = 0L, MetadataInitFlagRva = 0L)]
		public unsafe BlendShape ToBlendShape()
		{
			IL2CPP.Il2CppObjectBaseToPtrNotNull(this);
			IntPtr* ptr = null;
			IntPtr intPtr2;
			IntPtr intPtr = IL2CPP.il2cpp_runtime_invoke(BlendShapeContainer.NativeMethodInfoPtr_ToBlendShape_Public_BlendShape_0, IL2CPP.Il2CppObjectBaseToPtrNotNull(this), (void**)ptr, ref intPtr2);
			Il2CppException.RaiseExceptionIfNecessary(intPtr2);
			return new BlendShape(intPtr);
		}

		// Token: 0x0600A9ED RID: 43501 RVA: 0x002BAED0 File Offset: 0x002B90D0
		// Note: this type is marked as 'beforefieldinit'.
		static BlendShapeContainer()
		{
			Il2CppClassPointerStore<BlendShapeContainer>.NativeClassPtr = IL2CPP.GetIl2CppClass("Assembly-CSharp.dll", "MTAssets.UltimateLODSystem.MeshSimplifier.Internal", "BlendShapeContainer");
			IL2CPP.il2cpp_runtime_class_init(Il2CppClassPointerStore<BlendShapeContainer>.NativeClassPtr);
			BlendShapeContainer.NativeFieldInfoPtr_shapeName = IL2CPP.GetIl2CppField(Il2CppClassPointerStore<BlendShapeContainer>.NativeClassPtr, "shapeName");
			BlendShapeContainer.NativeFieldInfoPtr_frames = IL2CPP.GetIl2CppField(Il2CppClassPointerStore<BlendShapeContainer>.NativeClassPtr, "frames");
			BlendShapeContainer.NativeMethodInfoPtr__ctor_Public_Void_BlendShape_0 = IL2CPP.GetIl2CppMethodByToken(Il2CppClassPointerStore<BlendShapeContainer>.NativeClassPtr, 100676542);
			BlendShapeContainer.NativeMethodInfoPtr_MoveVertexElement_Public_Void_Int32_Int32_0 = IL2CPP.GetIl2CppMethodByToken(Il2CppClassPointerStore<BlendShapeContainer>.NativeClassPtr, 100676543);
			BlendShapeContainer.NativeMethodInfoPtr_InterpolateVertexAttributes_Public_Void_Int32_Int32_Int32_Int32_byref_Vector3_0 = IL2CPP.GetIl2CppMethodByToken(Il2CppClassPointerStore<BlendShapeContainer>.NativeClassPtr, 100676544);
			BlendShapeContainer.NativeMethodInfoPtr_Resize_Public_Void_Int32_Boolean_0 = IL2CPP.GetIl2CppMethodByToken(Il2CppClassPointerStore<BlendShapeContainer>.NativeClassPtr, 100676545);
			BlendShapeContainer.NativeMethodInfoPtr_ToBlendShape_Public_BlendShape_0 = IL2CPP.GetIl2CppMethodByToken(Il2CppClassPointerStore<BlendShapeContainer>.NativeClassPtr, 100676546);
		}

		// Token: 0x0600A9EE RID: 43502 RVA: 0x0000A74C File Offset: 0x0000894C
		public BlendShapeContainer(IntPtr pointer)
			: base(pointer)
		{
		}

		// Token: 0x17003956 RID: 14678
		// (get) Token: 0x0600A9EF RID: 43503 RVA: 0x002BAF8C File Offset: 0x002B918C
		// (set) Token: 0x0600A9F0 RID: 43504 RVA: 0x002BAFB5 File Offset: 0x002B91B5
		public unsafe string shapeName
		{
			get
			{
				IntPtr intPtr = IL2CPP.Il2CppObjectBaseToPtrNotNull(this) + (IntPtr)IL2CPP.il2cpp_field_get_offset(BlendShapeContainer.NativeFieldInfoPtr_shapeName);
				return IL2CPP.Il2CppStringToManaged(*intPtr);
			}
			set
			{
				IntPtr intPtr = IL2CPP.Il2CppObjectBaseToPtrNotNull(this);
				IL2CPP.il2cpp_gc_wbarrier_set_field(intPtr, intPtr + (IntPtr)IL2CPP.il2cpp_field_get_offset(BlendShapeContainer.NativeFieldInfoPtr_shapeName), IL2CPP.ManagedStringToIl2Cpp(value));
			}
		}

		// Token: 0x17003957 RID: 14679
		// (get) Token: 0x0600A9F1 RID: 43505 RVA: 0x002BAFDC File Offset: 0x002B91DC
		// (set) Token: 0x0600A9F2 RID: 43506 RVA: 0x002BB010 File Offset: 0x002B9210
		public unsafe Il2CppReferenceArray<BlendShapeFrameContainer> frames
		{
			get
			{
				IntPtr intPtr = IL2CPP.Il2CppObjectBaseToPtrNotNull(this) + (IntPtr)IL2CPP.il2cpp_field_get_offset(BlendShapeContainer.NativeFieldInfoPtr_frames);
				IntPtr intPtr2 = *intPtr;
				return (intPtr2 != 0) ? new Il2CppReferenceArray<BlendShapeFrameContainer>(intPtr2) : null;
			}
			set
			{
				IntPtr intPtr = IL2CPP.Il2CppObjectBaseToPtrNotNull(this);
				IL2CPP.il2cpp_gc_wbarrier_set_field(intPtr, intPtr + (IntPtr)IL2CPP.il2cpp_field_get_offset(BlendShapeContainer.NativeFieldInfoPtr_frames), IL2CPP.Il2CppObjectBaseToPtr(value));
			}
		}

		// Token: 0x04007228 RID: 29224
		private static readonly IntPtr NativeFieldInfoPtr_shapeName;

		// Token: 0x04007229 RID: 29225
		private static readonly IntPtr NativeFieldInfoPtr_frames;

		// Token: 0x0400722A RID: 29226
		private static readonly IntPtr NativeMethodInfoPtr__ctor_Public_Void_BlendShape_0;

		// Token: 0x0400722B RID: 29227
		private static readonly IntPtr NativeMethodInfoPtr_MoveVertexElement_Public_Void_Int32_Int32_0;

		// Token: 0x0400722C RID: 29228
		private static readonly IntPtr NativeMethodInfoPtr_InterpolateVertexAttributes_Public_Void_Int32_Int32_Int32_Int32_byref_Vector3_0;

		// Token: 0x0400722D RID: 29229
		private static readonly IntPtr NativeMethodInfoPtr_Resize_Public_Void_Int32_Boolean_0;

		// Token: 0x0400722E RID: 29230
		private static readonly IntPtr NativeMethodInfoPtr_ToBlendShape_Public_BlendShape_0;
	}
}
