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

namespace ch.sycoforge.Decal.Demo
{
	// Token: 0x020005F9 RID: 1529
	public static class BezierUtil : Il2CppSystem.Object
	{
		// Token: 0x06009E8F RID: 40591 RVA: 0x002895B8 File Offset: 0x002877B8
		[CallerCount(1)]
		[CachedScanResults(RefRangeStart = 622661, RefRangeEnd = 622662, XrefRangeStart = 622656, XrefRangeEnd = 622661, MetadataInitTokenRva = 0L, MetadataInitFlagRva = 0L)]
		public unsafe static List<Vector3> InterpolatePath(List<Vector3> path, int segments, float radius, float angleThreshold)
		{
			IntPtr* ptr;
			checked
			{
				ptr = stackalloc IntPtr[unchecked((UIntPtr)4) * (UIntPtr)sizeof(IntPtr)];
				*ptr = IL2CPP.Il2CppObjectBaseToPtr(path);
			}
			ptr[checked(unchecked((UIntPtr)1) * (UIntPtr)sizeof(IntPtr)) / (UIntPtr)sizeof(IntPtr)] = ref segments;
			ptr[checked(unchecked((UIntPtr)2) * (UIntPtr)sizeof(IntPtr)) / (UIntPtr)sizeof(IntPtr)] = ref radius;
			ptr[checked(unchecked((UIntPtr)3) * (UIntPtr)sizeof(IntPtr)) / (UIntPtr)sizeof(IntPtr)] = ref angleThreshold;
			IntPtr intPtr2;
			IntPtr intPtr = IL2CPP.il2cpp_runtime_invoke(BezierUtil.NativeMethodInfoPtr_InterpolatePath_Public_Static_List_1_Vector3_List_1_Vector3_Int32_Single_Single_0, 0, (void**)ptr, ref intPtr2);
			Il2CppException.RaiseExceptionIfNecessary(intPtr2);
			IntPtr intPtr3 = intPtr;
			return (intPtr3 != 0) ? new List<Vector3>(intPtr3) : null;
		}

		// Token: 0x06009E90 RID: 40592 RVA: 0x00289650 File Offset: 0x00287850
		[CallerCount(0)]
		[CachedScanResults(RefRangeStart = 0, RefRangeEnd = 0, XrefRangeStart = 622662, XrefRangeEnd = 622666, MetadataInitTokenRva = 0L, MetadataInitFlagRva = 0L)]
		public unsafe static Il2CppStructArray<Vector3> GetBezierApproximation(Il2CppStructArray<Vector3> controlPoints, int outputSegmentCount)
		{
			IntPtr* ptr;
			checked
			{
				ptr = stackalloc IntPtr[unchecked((UIntPtr)2) * (UIntPtr)sizeof(IntPtr)];
				*ptr = IL2CPP.Il2CppObjectBaseToPtr(controlPoints);
			}
			ptr[checked(unchecked((UIntPtr)1) * (UIntPtr)sizeof(IntPtr)) / (UIntPtr)sizeof(IntPtr)] = ref outputSegmentCount;
			IntPtr intPtr2;
			IntPtr intPtr = IL2CPP.il2cpp_runtime_invoke(BezierUtil.NativeMethodInfoPtr_GetBezierApproximation_Public_Static_Il2CppStructArray_1_Vector3_Il2CppStructArray_1_Vector3_Int32_0, 0, (void**)ptr, ref intPtr2);
			Il2CppException.RaiseExceptionIfNecessary(intPtr2);
			IntPtr intPtr3 = intPtr;
			return (intPtr3 != 0) ? new Il2CppStructArray<Vector3>(intPtr3) : null;
		}

		// Token: 0x06009E91 RID: 40593 RVA: 0x002896C4 File Offset: 0x002878C4
		[CallerCount(4)]
		[CachedScanResults(RefRangeStart = 622669, RefRangeEnd = 622673, XrefRangeStart = 622666, XrefRangeEnd = 622669, MetadataInitTokenRva = 0L, MetadataInitFlagRva = 0L)]
		public unsafe static Vector3 GetBezierPoint(float t, Il2CppStructArray<Vector3> controlPoints, int index, int count)
		{
			IntPtr* ptr;
			checked
			{
				ptr = stackalloc IntPtr[unchecked((UIntPtr)4) * (UIntPtr)sizeof(IntPtr)];
				*ptr = ref t;
			}
			ptr[checked(unchecked((UIntPtr)1) * (UIntPtr)sizeof(IntPtr)) / (UIntPtr)sizeof(IntPtr)] = IL2CPP.Il2CppObjectBaseToPtr(controlPoints);
			ptr[checked(unchecked((UIntPtr)2) * (UIntPtr)sizeof(IntPtr)) / (UIntPtr)sizeof(IntPtr)] = ref index;
			ptr[checked(unchecked((UIntPtr)3) * (UIntPtr)sizeof(IntPtr)) / (UIntPtr)sizeof(IntPtr)] = ref count;
			IntPtr intPtr2;
			IntPtr intPtr = IL2CPP.il2cpp_runtime_invoke(BezierUtil.NativeMethodInfoPtr_GetBezierPoint_Public_Static_Vector3_Single_Il2CppStructArray_1_Vector3_Int32_Int32_0, 0, (void**)ptr, ref intPtr2);
			Il2CppException.RaiseExceptionIfNecessary(intPtr2);
			return *IL2CPP.il2cpp_object_unbox(intPtr);
		}

		// Token: 0x06009E92 RID: 40594 RVA: 0x00289758 File Offset: 0x00287958
		// Note: this type is marked as 'beforefieldinit'.
		static BezierUtil()
		{
			Il2CppClassPointerStore<BezierUtil>.NativeClassPtr = IL2CPP.GetIl2CppClass("Assembly-CSharp.dll", "ch.sycoforge.Decal.Demo", "BezierUtil");
			IL2CPP.il2cpp_runtime_class_init(Il2CppClassPointerStore<BezierUtil>.NativeClassPtr);
			BezierUtil.NativeMethodInfoPtr_InterpolatePath_Public_Static_List_1_Vector3_List_1_Vector3_Int32_Single_Single_0 = IL2CPP.GetIl2CppMethodByToken(Il2CppClassPointerStore<BezierUtil>.NativeClassPtr, 100675491);
			BezierUtil.NativeMethodInfoPtr_GetBezierApproximation_Public_Static_Il2CppStructArray_1_Vector3_Il2CppStructArray_1_Vector3_Int32_0 = IL2CPP.GetIl2CppMethodByToken(Il2CppClassPointerStore<BezierUtil>.NativeClassPtr, 100675492);
			BezierUtil.NativeMethodInfoPtr_GetBezierPoint_Public_Static_Vector3_Single_Il2CppStructArray_1_Vector3_Int32_Int32_0 = IL2CPP.GetIl2CppMethodByToken(Il2CppClassPointerStore<BezierUtil>.NativeClassPtr, 100675493);
		}

		// Token: 0x06009E93 RID: 40595 RVA: 0x0000A688 File Offset: 0x00008888
		public BezierUtil(IntPtr pointer)
			: base(pointer)
		{
		}

		// Token: 0x04006A39 RID: 27193
		private static readonly IntPtr NativeMethodInfoPtr_InterpolatePath_Public_Static_List_1_Vector3_List_1_Vector3_Int32_Single_Single_0;

		// Token: 0x04006A3A RID: 27194
		private static readonly IntPtr NativeMethodInfoPtr_GetBezierApproximation_Public_Static_Il2CppStructArray_1_Vector3_Il2CppStructArray_1_Vector3_Int32_0;

		// Token: 0x04006A3B RID: 27195
		private static readonly IntPtr NativeMethodInfoPtr_GetBezierPoint_Public_Static_Vector3_Single_Il2CppStructArray_1_Vector3_Int32_Int32_0;
	}
}
