101 lines
5.4 KiB
C#
101 lines
5.4 KiB
C#
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: 0x02000651 RID: 1617
|
|
public static class BezierUtil : Il2CppSystem.Object
|
|
{
|
|
// Token: 0x0600A6E2 RID: 42722 RVA: 0x002AC2F4 File Offset: 0x002AA4F4
|
|
[CallerCount(1)]
|
|
[CachedScanResults(RefRangeStart = 654963, RefRangeEnd = 654964, XrefRangeStart = 654958, XrefRangeEnd = 654963, 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: 0x0600A6E3 RID: 42723 RVA: 0x002AC38C File Offset: 0x002AA58C
|
|
[CallerCount(0)]
|
|
[CachedScanResults(RefRangeStart = 0, RefRangeEnd = 0, XrefRangeStart = 654964, XrefRangeEnd = 654968, 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: 0x0600A6E4 RID: 42724 RVA: 0x002AC400 File Offset: 0x002AA600
|
|
[CallerCount(4)]
|
|
[CachedScanResults(RefRangeStart = 654971, RefRangeEnd = 654975, XrefRangeStart = 654968, XrefRangeEnd = 654971, 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: 0x0600A6E5 RID: 42725 RVA: 0x002AC494 File Offset: 0x002AA694
|
|
// 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, 100676204);
|
|
BezierUtil.NativeMethodInfoPtr_GetBezierApproximation_Public_Static_Il2CppStructArray_1_Vector3_Il2CppStructArray_1_Vector3_Int32_0 = IL2CPP.GetIl2CppMethodByToken(Il2CppClassPointerStore<BezierUtil>.NativeClassPtr, 100676205);
|
|
BezierUtil.NativeMethodInfoPtr_GetBezierPoint_Public_Static_Vector3_Single_Il2CppStructArray_1_Vector3_Int32_Int32_0 = IL2CPP.GetIl2CppMethodByToken(Il2CppClassPointerStore<BezierUtil>.NativeClassPtr, 100676206);
|
|
}
|
|
|
|
// Token: 0x0600A6E6 RID: 42726 RVA: 0x0000A74C File Offset: 0x0000894C
|
|
public BezierUtil(IntPtr pointer)
|
|
: base(pointer)
|
|
{
|
|
}
|
|
|
|
// Token: 0x04006FE2 RID: 28642
|
|
private static readonly IntPtr NativeMethodInfoPtr_InterpolatePath_Public_Static_List_1_Vector3_List_1_Vector3_Int32_Single_Single_0;
|
|
|
|
// Token: 0x04006FE3 RID: 28643
|
|
private static readonly IntPtr NativeMethodInfoPtr_GetBezierApproximation_Public_Static_Il2CppStructArray_1_Vector3_Il2CppStructArray_1_Vector3_Int32_0;
|
|
|
|
// Token: 0x04006FE4 RID: 28644
|
|
private static readonly IntPtr NativeMethodInfoPtr_GetBezierPoint_Public_Static_Vector3_Single_Il2CppStructArray_1_Vector3_Int32_Int32_0;
|
|
}
|
|
}
|