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

namespace MTAssets.UltimateLODSystem.MeshSimplifier.Internal
{
	// Token: 0x0200062D RID: 1581
	public class BlendShapeContainer : Il2CppSystem.Object
	{
		// Token: 0x0600A195 RID: 41365 RVA: 0x00297F6C File Offset: 0x0029616C
		[CallerCount(2)]
		[CachedScanResults(RefRangeStart = 626298, RefRangeEnd = 626300, XrefRangeStart = 626268, XrefRangeEnd = 626298, 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: 0x0600A196 RID: 41366 RVA: 0x00297FD4 File Offset: 0x002961D4
		[CallerCount(1)]
		[CachedScanResults(RefRangeStart = 626303, RefRangeEnd = 626304, XrefRangeStart = 626300, XrefRangeEnd = 626303, 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: 0x0600A197 RID: 41367 RVA: 0x0029803C File Offset: 0x0029623C
		[CallerCount(0)]
		[CachedScanResults(RefRangeStart = 0, RefRangeEnd = 0, XrefRangeStart = 626304, XrefRangeEnd = 626306, 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: 0x0600A198 RID: 41368 RVA: 0x002980E0 File Offset: 0x002962E0
		[CallerCount(1)]
		[CachedScanResults(RefRangeStart = 626314, RefRangeEnd = 626315, XrefRangeStart = 626306, XrefRangeEnd = 626314, 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: 0x0600A199 RID: 41369 RVA: 0x00298148 File Offset: 0x00296348
		[CallerCount(3)]
		[CachedScanResults(RefRangeStart = 626332, RefRangeEnd = 626335, XrefRangeStart = 626315, XrefRangeEnd = 626332, 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: 0x0600A19A RID: 41370 RVA: 0x00298194 File Offset: 0x00296394
		// 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, 100675829);
			BlendShapeContainer.NativeMethodInfoPtr_MoveVertexElement_Public_Void_Int32_Int32_0 = IL2CPP.GetIl2CppMethodByToken(Il2CppClassPointerStore<BlendShapeContainer>.NativeClassPtr, 100675830);
			BlendShapeContainer.NativeMethodInfoPtr_InterpolateVertexAttributes_Public_Void_Int32_Int32_Int32_Int32_byref_Vector3_0 = IL2CPP.GetIl2CppMethodByToken(Il2CppClassPointerStore<BlendShapeContainer>.NativeClassPtr, 100675831);
			BlendShapeContainer.NativeMethodInfoPtr_Resize_Public_Void_Int32_Boolean_0 = IL2CPP.GetIl2CppMethodByToken(Il2CppClassPointerStore<BlendShapeContainer>.NativeClassPtr, 100675832);
			BlendShapeContainer.NativeMethodInfoPtr_ToBlendShape_Public_BlendShape_0 = IL2CPP.GetIl2CppMethodByToken(Il2CppClassPointerStore<BlendShapeContainer>.NativeClassPtr, 100675833);
		}

		// Token: 0x0600A19B RID: 41371 RVA: 0x0000A688 File Offset: 0x00008888
		public BlendShapeContainer(IntPtr pointer)
			: base(pointer)
		{
		}

		// Token: 0x170036BB RID: 14011
		// (get) Token: 0x0600A19C RID: 41372 RVA: 0x00298250 File Offset: 0x00296450
		// (set) Token: 0x0600A19D RID: 41373 RVA: 0x00298279 File Offset: 0x00296479
		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: 0x170036BC RID: 14012
		// (get) Token: 0x0600A19E RID: 41374 RVA: 0x002982A0 File Offset: 0x002964A0
		// (set) Token: 0x0600A19F RID: 41375 RVA: 0x002982D4 File Offset: 0x002964D4
		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: 0x04006C7F RID: 27775
		private static readonly IntPtr NativeFieldInfoPtr_shapeName;

		// Token: 0x04006C80 RID: 27776
		private static readonly IntPtr NativeFieldInfoPtr_frames;

		// Token: 0x04006C81 RID: 27777
		private static readonly IntPtr NativeMethodInfoPtr__ctor_Public_Void_BlendShape_0;

		// Token: 0x04006C82 RID: 27778
		private static readonly IntPtr NativeMethodInfoPtr_MoveVertexElement_Public_Void_Int32_Int32_0;

		// Token: 0x04006C83 RID: 27779
		private static readonly IntPtr NativeMethodInfoPtr_InterpolateVertexAttributes_Public_Void_Int32_Int32_Int32_Int32_byref_Vector3_0;

		// Token: 0x04006C84 RID: 27780
		private static readonly IntPtr NativeMethodInfoPtr_Resize_Public_Void_Int32_Boolean_0;

		// Token: 0x04006C85 RID: 27781
		private static readonly IntPtr NativeMethodInfoPtr_ToBlendShape_Public_BlendShape_0;
	}
}
