From 95315da6846245b916072aa2b79de9498455710a Mon Sep 17 00:00:00 2001 From: cosmonaut Date: Fri, 24 Jun 2022 12:02:07 -0700 Subject: [PATCH] API update --- Silkworm2CS.cs | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/Silkworm2CS.cs b/Silkworm2CS.cs index b36af4e..d77ea71 100644 --- a/Silkworm2CS.cs +++ b/Silkworm2CS.cs @@ -69,6 +69,14 @@ namespace Silkworm2CS public float BottomUV; }; + public struct Rectangle + { + public float X; + public float Y; + public float W; + public float H; + } + [StructLayout(LayoutKind.Sequential)] public struct Vertex { @@ -142,6 +150,9 @@ namespace Silkworm2CS [DllImport(nativeLibName, CallingConvention = CallingConvention.Cdecl)] public unsafe static extern void Silkworm_DestroyNodesInRadius(float x, float y, float radius); + [DllImport(nativeLibName, CallingConvention = CallingConvention.Cdecl)] + public unsafe static extern void Silkworm_DestroyNodesInRectangle(in Rectangle rectangle); + [DllImport(nativeLibName, CallingConvention = CallingConvention.Cdecl)] public unsafe static extern IntPtr Silkworm_FindClothInRadius(float x, float y, float radius);