Wes xx mediapipe integration

This commit is contained in:
Jelle De Geest
2023-03-12 20:34:16 +00:00
parent 8349b5f149
commit b11eeb465c
975 changed files with 192230 additions and 0 deletions

View File

@@ -0,0 +1,24 @@
// Copyright (c) 2021 homuler
//
// Use of this source code is governed by an MIT-style
// license that can be found in the LICENSE file or at
// https://opensource.org/licenses/MIT.
using System.Runtime.InteropServices;
namespace Mediapipe
{
[StructLayout(LayoutKind.Sequential)]
public struct Anchor3d
{
public float x;
public float y;
public float z;
public int stickerId;
public override string ToString()
{
return $"({x}, {y}, {z}), #{stickerId}";
}
}
}

View File

@@ -0,0 +1,11 @@
fileFormatVersion: 2
guid: dcbd63ef2a5963ee698de211fffbd1e8
MonoImporter:
externalObjects: {}
serializedVersion: 2
defaultReferences: []
executionOrder: 0
icon: {instanceID: 0}
userData:
assetBundleName:
assetBundleVariant:

View File

@@ -0,0 +1,41 @@
// Copyright (c) 2021 homuler
//
// Use of this source code is governed by an MIT-style
// license that can be found in the LICENSE file or at
// https://opensource.org/licenses/MIT.
using System;
using System.Collections.Generic;
using System.Runtime.InteropServices;
namespace Mediapipe
{
[StructLayout(LayoutKind.Sequential)]
internal struct Anchor3dVector
{
public IntPtr data;
public int size;
public void Dispose()
{
UnsafeNativeMethods.mp_Anchor3dArray__delete(data);
}
public List<Anchor3d> ToList()
{
var anchors = new List<Anchor3d>(size);
unsafe
{
var anchorPtr = (Anchor3d*)data;
for (var i = 0; i < size; i++)
{
anchors.Add(Marshal.PtrToStructure<Anchor3d>((IntPtr)anchorPtr++));
}
}
return anchors;
}
}
}

View File

@@ -0,0 +1,11 @@
fileFormatVersion: 2
guid: 245fdb6c2b3fc7c938665fbf58cd4789
MonoImporter:
externalObjects: {}
serializedVersion: 2
defaultReferences: []
executionOrder: 0
icon: {instanceID: 0}
userData:
assetBundleName:
assetBundleVariant: