feat(bindings): update C# wrappers for meshopt, nvtt, ufbx

Refactor and regenerate native C# bindings for Ghost.MeshOptimizer, Ghost.Nvtt, and Ghost.Ufbx to match updated native APIs and improve usability.
- Replace meshoptimizer.dll with newer version.
- Move meshoptimizer functions to static methods in partial class; add new meshlet, simplification, quantization features.
- Remove enum wrappers in favor of constants; delete meshopt_Allocator.cs.
- Regenerate native wrappers with PascalCase naming, XML doc comments, and aggressive inlining.
- Implement IDisposable for resource structs; update configs for naming, documentation, and method mapping.
- Update user code to use new wrapper classes and method names.
- Improve documentation and comments for clarity.

BREAKING CHANGE: API surface changes, wrapper class and method names updated, enum wrappers removed, custom allocator deleted.
This commit is contained in:
2026-03-17 00:19:54 +09:00
parent 9bae3e647e
commit e831b71a79
62 changed files with 3820 additions and 1285 deletions

View File

@@ -156,7 +156,7 @@ internal static unsafe class TextureProcessor
mipmapCount = (int)settings.Advanced.MipmapLevelCount; mipmapCount = (int)settings.Advanced.MipmapLevelCount;
} }
pCtx.Get()->SetCudaAcceleration(Api.nvttIsCudaSupported()); pCtx.Get()->SetCudaAcceleration(NvttApi.IsCudaSupported());
pCtx.Get()->OutputHeader(pSurface.Get(), mipmapCount, pCompOpts.Get(), pOutOpts.Get()); pCtx.Get()->OutputHeader(pSurface.Get(), mipmapCount, pCompOpts.Get(), pOutOpts.Get());

View File

@@ -41,19 +41,19 @@ internal sealed unsafe class NvttBindingTest : ITest
{ {
// ---- Test 1: Version --------------------------------------------------- // ---- Test 1: Version ---------------------------------------------------
Console.Write("[Test 1] nvttVersion ... "); Console.Write("[Test 1] nvttVersion ... ");
var version = Api.nvttVersion(); var version = NvttApi.Version();
Assert(version > 0, $"Expected version > 0, got {version}"); Assert(version > 0, $"Expected version > 0, got {version}");
Console.WriteLine($"OK (version = {version >> 16}.{(version >> 8) & 0xFF}.{version & 0xFF})"); Console.WriteLine($"OK (version = {version >> 16}.{(version >> 8) & 0xFFu}.{version & 0xFFu})");
// ---- Test 2: CUDA support query (must not crash) ---------------------- // ---- Test 2: CUDA support query (must not crash) ----------------------
Console.Write("[Test 2] IsCudaSupported ... "); Console.Write("[Test 2] IsCudaSupported ... ");
var cuda = Api.nvttIsCudaSupported(); var cuda = NvttApi.IsCudaSupported();
Console.WriteLine($"OK (cuda = {cuda})"); Console.WriteLine($"OK (cuda = {cuda})");
// ---- Test 3: Global message callback ---------------------------------- // ---- Test 3: Global message callback ----------------------------------
Console.Write("[Test 3] SetMessageCallback ... "); Console.Write("[Test 3] SetMessageCallback ... ");
var callbackFired = 0; var callbackFired = 0;
var token = Api.nvttSetMessageCallback(&CallBack, &callbackFired); var token = NvttApi.SetMessageCallback(&CallBack, &callbackFired);
Console.WriteLine($"OK (no crash, callback fired {callbackFired} times during install)"); Console.WriteLine($"OK (no crash, callback fired {callbackFired} times during install)");

View File

@@ -14,7 +14,7 @@ internal unsafe class UfbxBindingTest : ITest
var load_Opts = new ufbx_load_opts(); var load_Opts = new ufbx_load_opts();
var error = new ufbx_error(); var error = new ufbx_error();
var pScene = ufbx_scene.load_file_len("F:/c/Third Parties/ufbx/data/blender_340_z_up_7400_binary.fbx"u8, &load_Opts, &error); var pScene = ufbx_scene.LoadFileLen("F:/c/Third Parties/ufbx/data/blender_340_z_up_7400_binary.fbx"u8, &load_Opts, &error);
if (pScene == null) if (pScene == null)
{ {
@@ -46,7 +46,7 @@ internal unsafe class UfbxBindingTest : ITest
} }
} }
pScene->free(); pScene->Dispose();
Console.WriteLine("Done."); Console.WriteLine("Done.");
} }

View File

@@ -0,0 +1,9 @@
using System;
using System.Collections.Generic;
using System.Text;
namespace Ghost.MeshOptimizer;
internal class ClusterLod
{
}

View File

@@ -1,283 +1,303 @@
using System.Runtime.InteropServices; using System.Runtime.InteropServices;
namespace Ghost.MeshOptimizer; namespace Ghost.MeshOptimizer
{
public static unsafe partial class Api public static unsafe partial class Api
{ {
private const string _DLL_NAME = "meshoptimizer"; [DllImport("meshoptimizer", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
[DllImport(_DLL_NAME, CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
[return: NativeTypeName("size_t")] [return: NativeTypeName("size_t")]
public static extern nuint meshopt_generateVertexRemap([NativeTypeName("unsigned int *")] uint* destination, [NativeTypeName("const unsigned int *")] uint* indices, [NativeTypeName("size_t")] nuint index_count, [NativeTypeName("const void *")] void* vertices, [NativeTypeName("size_t")] nuint vertex_count, [NativeTypeName("size_t")] nuint vertex_size); public static extern nuint meshopt_generateVertexRemap([NativeTypeName("unsigned int *")] uint* destination, [NativeTypeName("const unsigned int *")] uint* indices, [NativeTypeName("size_t")] nuint index_count, [NativeTypeName("const void *")] void* vertices, [NativeTypeName("size_t")] nuint vertex_count, [NativeTypeName("size_t")] nuint vertex_size);
[DllImport(_DLL_NAME, CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)] [DllImport("meshoptimizer", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
[return: NativeTypeName("size_t")] [return: NativeTypeName("size_t")]
public static extern nuint meshopt_generateVertexRemapMulti([NativeTypeName("unsigned int *")] uint* destination, [NativeTypeName("const unsigned int *")] uint* indices, [NativeTypeName("size_t")] nuint index_count, [NativeTypeName("size_t")] nuint vertex_count, [NativeTypeName("const struct meshopt_Stream *")] meshopt_Stream* streams, [NativeTypeName("size_t")] nuint stream_count); public static extern nuint meshopt_generateVertexRemapMulti([NativeTypeName("unsigned int *")] uint* destination, [NativeTypeName("const unsigned int *")] uint* indices, [NativeTypeName("size_t")] nuint index_count, [NativeTypeName("size_t")] nuint vertex_count, [NativeTypeName("const struct meshopt_Stream *")] meshopt_Stream* streams, [NativeTypeName("size_t")] nuint stream_count);
[DllImport(_DLL_NAME, CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)] [DllImport("meshoptimizer", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
[return: NativeTypeName("size_t")] [return: NativeTypeName("size_t")]
public static extern nuint meshopt_generateVertexRemapCustom([NativeTypeName("unsigned int *")] uint* destination, [NativeTypeName("const unsigned int *")] uint* indices, [NativeTypeName("size_t")] nuint index_count, [NativeTypeName("const float *")] float* vertex_positions, [NativeTypeName("size_t")] nuint vertex_count, [NativeTypeName("size_t")] nuint vertex_positions_stride, [NativeTypeName("int (*)(void *, unsigned int, unsigned int)")] delegate* unmanaged[Cdecl]<void*, uint, uint, int> callback, void* context); public static extern nuint meshopt_generateVertexRemapCustom([NativeTypeName("unsigned int *")] uint* destination, [NativeTypeName("const unsigned int *")] uint* indices, [NativeTypeName("size_t")] nuint index_count, [NativeTypeName("const float *")] float* vertex_positions, [NativeTypeName("size_t")] nuint vertex_count, [NativeTypeName("size_t")] nuint vertex_positions_stride, [NativeTypeName("int (*)(void *, unsigned int, unsigned int)")] delegate* unmanaged[Cdecl]<void*, uint, uint, int> callback, void* context);
[DllImport(_DLL_NAME, CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)] [DllImport("meshoptimizer", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
public static extern void meshopt_remapVertexBuffer(void* destination, [NativeTypeName("const void *")] void* vertices, [NativeTypeName("size_t")] nuint vertex_count, [NativeTypeName("size_t")] nuint vertex_size, [NativeTypeName("const unsigned int *")] uint* remap); public static extern void meshopt_remapVertexBuffer(void* destination, [NativeTypeName("const void *")] void* vertices, [NativeTypeName("size_t")] nuint vertex_count, [NativeTypeName("size_t")] nuint vertex_size, [NativeTypeName("const unsigned int *")] uint* remap);
[DllImport(_DLL_NAME, CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)] [DllImport("meshoptimizer", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
public static extern void meshopt_remapIndexBuffer([NativeTypeName("unsigned int *")] uint* destination, [NativeTypeName("const unsigned int *")] uint* indices, [NativeTypeName("size_t")] nuint index_count, [NativeTypeName("const unsigned int *")] uint* remap); public static extern void meshopt_remapIndexBuffer([NativeTypeName("unsigned int *")] uint* destination, [NativeTypeName("const unsigned int *")] uint* indices, [NativeTypeName("size_t")] nuint index_count, [NativeTypeName("const unsigned int *")] uint* remap);
[DllImport(_DLL_NAME, CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)] [DllImport("meshoptimizer", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
public static extern void meshopt_generateShadowIndexBuffer([NativeTypeName("unsigned int *")] uint* destination, [NativeTypeName("const unsigned int *")] uint* indices, [NativeTypeName("size_t")] nuint index_count, [NativeTypeName("const void *")] void* vertices, [NativeTypeName("size_t")] nuint vertex_count, [NativeTypeName("size_t")] nuint vertex_size, [NativeTypeName("size_t")] nuint vertex_stride); public static extern void meshopt_generateShadowIndexBuffer([NativeTypeName("unsigned int *")] uint* destination, [NativeTypeName("const unsigned int *")] uint* indices, [NativeTypeName("size_t")] nuint index_count, [NativeTypeName("const void *")] void* vertices, [NativeTypeName("size_t")] nuint vertex_count, [NativeTypeName("size_t")] nuint vertex_size, [NativeTypeName("size_t")] nuint vertex_stride);
[DllImport(_DLL_NAME, CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)] [DllImport("meshoptimizer", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
public static extern void meshopt_generateShadowIndexBufferMulti([NativeTypeName("unsigned int *")] uint* destination, [NativeTypeName("const unsigned int *")] uint* indices, [NativeTypeName("size_t")] nuint index_count, [NativeTypeName("size_t")] nuint vertex_count, [NativeTypeName("const struct meshopt_Stream *")] meshopt_Stream* streams, [NativeTypeName("size_t")] nuint stream_count); public static extern void meshopt_generateShadowIndexBufferMulti([NativeTypeName("unsigned int *")] uint* destination, [NativeTypeName("const unsigned int *")] uint* indices, [NativeTypeName("size_t")] nuint index_count, [NativeTypeName("size_t")] nuint vertex_count, [NativeTypeName("const struct meshopt_Stream *")] meshopt_Stream* streams, [NativeTypeName("size_t")] nuint stream_count);
[DllImport(_DLL_NAME, CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)] [DllImport("meshoptimizer", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
public static extern void meshopt_generatePositionRemap([NativeTypeName("unsigned int *")] uint* destination, [NativeTypeName("const float *")] float* vertex_positions, [NativeTypeName("size_t")] nuint vertex_count, [NativeTypeName("size_t")] nuint vertex_positions_stride); public static extern void meshopt_generatePositionRemap([NativeTypeName("unsigned int *")] uint* destination, [NativeTypeName("const float *")] float* vertex_positions, [NativeTypeName("size_t")] nuint vertex_count, [NativeTypeName("size_t")] nuint vertex_positions_stride);
[DllImport(_DLL_NAME, CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)] [DllImport("meshoptimizer", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
public static extern void meshopt_generateAdjacencyIndexBuffer([NativeTypeName("unsigned int *")] uint* destination, [NativeTypeName("const unsigned int *")] uint* indices, [NativeTypeName("size_t")] nuint index_count, [NativeTypeName("const float *")] float* vertex_positions, [NativeTypeName("size_t")] nuint vertex_count, [NativeTypeName("size_t")] nuint vertex_positions_stride); public static extern void meshopt_generateAdjacencyIndexBuffer([NativeTypeName("unsigned int *")] uint* destination, [NativeTypeName("const unsigned int *")] uint* indices, [NativeTypeName("size_t")] nuint index_count, [NativeTypeName("const float *")] float* vertex_positions, [NativeTypeName("size_t")] nuint vertex_count, [NativeTypeName("size_t")] nuint vertex_positions_stride);
[DllImport(_DLL_NAME, CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)] [DllImport("meshoptimizer", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
public static extern void meshopt_generateTessellationIndexBuffer([NativeTypeName("unsigned int *")] uint* destination, [NativeTypeName("const unsigned int *")] uint* indices, [NativeTypeName("size_t")] nuint index_count, [NativeTypeName("const float *")] float* vertex_positions, [NativeTypeName("size_t")] nuint vertex_count, [NativeTypeName("size_t")] nuint vertex_positions_stride); public static extern void meshopt_generateTessellationIndexBuffer([NativeTypeName("unsigned int *")] uint* destination, [NativeTypeName("const unsigned int *")] uint* indices, [NativeTypeName("size_t")] nuint index_count, [NativeTypeName("const float *")] float* vertex_positions, [NativeTypeName("size_t")] nuint vertex_count, [NativeTypeName("size_t")] nuint vertex_positions_stride);
[DllImport(_DLL_NAME, CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)] [DllImport("meshoptimizer", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
[return: NativeTypeName("size_t")] [return: NativeTypeName("size_t")]
public static extern nuint meshopt_generateProvokingIndexBuffer([NativeTypeName("unsigned int *")] uint* destination, [NativeTypeName("unsigned int *")] uint* reorder, [NativeTypeName("const unsigned int *")] uint* indices, [NativeTypeName("size_t")] nuint index_count, [NativeTypeName("size_t")] nuint vertex_count); public static extern nuint meshopt_generateProvokingIndexBuffer([NativeTypeName("unsigned int *")] uint* destination, [NativeTypeName("unsigned int *")] uint* reorder, [NativeTypeName("const unsigned int *")] uint* indices, [NativeTypeName("size_t")] nuint index_count, [NativeTypeName("size_t")] nuint vertex_count);
[DllImport(_DLL_NAME, CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)] [DllImport("meshoptimizer", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
public static extern void meshopt_optimizeVertexCache([NativeTypeName("unsigned int *")] uint* destination, [NativeTypeName("const unsigned int *")] uint* indices, [NativeTypeName("size_t")] nuint index_count, [NativeTypeName("size_t")] nuint vertex_count); public static extern void meshopt_optimizeVertexCache([NativeTypeName("unsigned int *")] uint* destination, [NativeTypeName("const unsigned int *")] uint* indices, [NativeTypeName("size_t")] nuint index_count, [NativeTypeName("size_t")] nuint vertex_count);
[DllImport(_DLL_NAME, CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)] [DllImport("meshoptimizer", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
public static extern void meshopt_optimizeVertexCacheStrip([NativeTypeName("unsigned int *")] uint* destination, [NativeTypeName("const unsigned int *")] uint* indices, [NativeTypeName("size_t")] nuint index_count, [NativeTypeName("size_t")] nuint vertex_count); public static extern void meshopt_optimizeVertexCacheStrip([NativeTypeName("unsigned int *")] uint* destination, [NativeTypeName("const unsigned int *")] uint* indices, [NativeTypeName("size_t")] nuint index_count, [NativeTypeName("size_t")] nuint vertex_count);
[DllImport(_DLL_NAME, CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)] [DllImport("meshoptimizer", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
public static extern void meshopt_optimizeVertexCacheFifo([NativeTypeName("unsigned int *")] uint* destination, [NativeTypeName("const unsigned int *")] uint* indices, [NativeTypeName("size_t")] nuint index_count, [NativeTypeName("size_t")] nuint vertex_count, [NativeTypeName("unsigned int")] uint cache_size); public static extern void meshopt_optimizeVertexCacheFifo([NativeTypeName("unsigned int *")] uint* destination, [NativeTypeName("const unsigned int *")] uint* indices, [NativeTypeName("size_t")] nuint index_count, [NativeTypeName("size_t")] nuint vertex_count, [NativeTypeName("unsigned int")] uint cache_size);
[DllImport(_DLL_NAME, CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)] [DllImport("meshoptimizer", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
public static extern void meshopt_optimizeOverdraw([NativeTypeName("unsigned int *")] uint* destination, [NativeTypeName("const unsigned int *")] uint* indices, [NativeTypeName("size_t")] nuint index_count, [NativeTypeName("const float *")] float* vertex_positions, [NativeTypeName("size_t")] nuint vertex_count, [NativeTypeName("size_t")] nuint vertex_positions_stride, float threshold); public static extern void meshopt_optimizeOverdraw([NativeTypeName("unsigned int *")] uint* destination, [NativeTypeName("const unsigned int *")] uint* indices, [NativeTypeName("size_t")] nuint index_count, [NativeTypeName("const float *")] float* vertex_positions, [NativeTypeName("size_t")] nuint vertex_count, [NativeTypeName("size_t")] nuint vertex_positions_stride, float threshold);
[DllImport(_DLL_NAME, CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)] [DllImport("meshoptimizer", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
[return: NativeTypeName("size_t")] [return: NativeTypeName("size_t")]
public static extern nuint meshopt_optimizeVertexFetch(void* destination, [NativeTypeName("unsigned int *")] uint* indices, [NativeTypeName("size_t")] nuint index_count, [NativeTypeName("const void *")] void* vertices, [NativeTypeName("size_t")] nuint vertex_count, [NativeTypeName("size_t")] nuint vertex_size); public static extern nuint meshopt_optimizeVertexFetch(void* destination, [NativeTypeName("unsigned int *")] uint* indices, [NativeTypeName("size_t")] nuint index_count, [NativeTypeName("const void *")] void* vertices, [NativeTypeName("size_t")] nuint vertex_count, [NativeTypeName("size_t")] nuint vertex_size);
[DllImport(_DLL_NAME, CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)] [DllImport("meshoptimizer", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
[return: NativeTypeName("size_t")] [return: NativeTypeName("size_t")]
public static extern nuint meshopt_optimizeVertexFetchRemap([NativeTypeName("unsigned int *")] uint* destination, [NativeTypeName("const unsigned int *")] uint* indices, [NativeTypeName("size_t")] nuint index_count, [NativeTypeName("size_t")] nuint vertex_count); public static extern nuint meshopt_optimizeVertexFetchRemap([NativeTypeName("unsigned int *")] uint* destination, [NativeTypeName("const unsigned int *")] uint* indices, [NativeTypeName("size_t")] nuint index_count, [NativeTypeName("size_t")] nuint vertex_count);
[DllImport(_DLL_NAME, CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)] [DllImport("meshoptimizer", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
[return: NativeTypeName("size_t")] [return: NativeTypeName("size_t")]
public static extern nuint meshopt_encodeIndexBuffer([NativeTypeName("unsigned char *")] byte* buffer, [NativeTypeName("size_t")] nuint buffer_size, [NativeTypeName("const unsigned int *")] uint* indices, [NativeTypeName("size_t")] nuint index_count); public static extern nuint meshopt_encodeIndexBuffer([NativeTypeName("unsigned char *")] byte* buffer, [NativeTypeName("size_t")] nuint buffer_size, [NativeTypeName("const unsigned int *")] uint* indices, [NativeTypeName("size_t")] nuint index_count);
[DllImport(_DLL_NAME, CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)] [DllImport("meshoptimizer", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
[return: NativeTypeName("size_t")] [return: NativeTypeName("size_t")]
public static extern nuint meshopt_encodeIndexBufferBound([NativeTypeName("size_t")] nuint index_count, [NativeTypeName("size_t")] nuint vertex_count); public static extern nuint meshopt_encodeIndexBufferBound([NativeTypeName("size_t")] nuint index_count, [NativeTypeName("size_t")] nuint vertex_count);
[DllImport(_DLL_NAME, CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)] [DllImport("meshoptimizer", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
public static extern void meshopt_encodeIndexVersion(int version); public static extern void meshopt_encodeIndexVersion(int version);
[DllImport(_DLL_NAME, CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)] [DllImport("meshoptimizer", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
public static extern int meshopt_decodeIndexBuffer(void* destination, [NativeTypeName("size_t")] nuint index_count, [NativeTypeName("size_t")] nuint index_size, [NativeTypeName("const unsigned char *")] byte* buffer, [NativeTypeName("size_t")] nuint buffer_size); public static extern int meshopt_decodeIndexBuffer(void* destination, [NativeTypeName("size_t")] nuint index_count, [NativeTypeName("size_t")] nuint index_size, [NativeTypeName("const unsigned char *")] byte* buffer, [NativeTypeName("size_t")] nuint buffer_size);
[DllImport(_DLL_NAME, CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)] [DllImport("meshoptimizer", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
public static extern int meshopt_decodeIndexVersion([NativeTypeName("const unsigned char *")] byte* buffer, [NativeTypeName("size_t")] nuint buffer_size); public static extern int meshopt_decodeIndexVersion([NativeTypeName("const unsigned char *")] byte* buffer, [NativeTypeName("size_t")] nuint buffer_size);
[DllImport(_DLL_NAME, CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)] [DllImport("meshoptimizer", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
[return: NativeTypeName("size_t")] [return: NativeTypeName("size_t")]
public static extern nuint meshopt_encodeIndexSequence([NativeTypeName("unsigned char *")] byte* buffer, [NativeTypeName("size_t")] nuint buffer_size, [NativeTypeName("const unsigned int *")] uint* indices, [NativeTypeName("size_t")] nuint index_count); public static extern nuint meshopt_encodeIndexSequence([NativeTypeName("unsigned char *")] byte* buffer, [NativeTypeName("size_t")] nuint buffer_size, [NativeTypeName("const unsigned int *")] uint* indices, [NativeTypeName("size_t")] nuint index_count);
[DllImport(_DLL_NAME, CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)] [DllImport("meshoptimizer", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
[return: NativeTypeName("size_t")] [return: NativeTypeName("size_t")]
public static extern nuint meshopt_encodeIndexSequenceBound([NativeTypeName("size_t")] nuint index_count, [NativeTypeName("size_t")] nuint vertex_count); public static extern nuint meshopt_encodeIndexSequenceBound([NativeTypeName("size_t")] nuint index_count, [NativeTypeName("size_t")] nuint vertex_count);
[DllImport(_DLL_NAME, CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)] [DllImport("meshoptimizer", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
public static extern int meshopt_decodeIndexSequence(void* destination, [NativeTypeName("size_t")] nuint index_count, [NativeTypeName("size_t")] nuint index_size, [NativeTypeName("const unsigned char *")] byte* buffer, [NativeTypeName("size_t")] nuint buffer_size); public static extern int meshopt_decodeIndexSequence(void* destination, [NativeTypeName("size_t")] nuint index_count, [NativeTypeName("size_t")] nuint index_size, [NativeTypeName("const unsigned char *")] byte* buffer, [NativeTypeName("size_t")] nuint buffer_size);
[DllImport(_DLL_NAME, CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)] [DllImport("meshoptimizer", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
[return: NativeTypeName("size_t")]
public static extern nuint meshopt_encodeMeshlet([NativeTypeName("unsigned char *")] byte* buffer, [NativeTypeName("size_t")] nuint buffer_size, [NativeTypeName("const unsigned int *")] uint* vertices, [NativeTypeName("size_t")] nuint vertex_count, [NativeTypeName("const unsigned char *")] byte* triangles, [NativeTypeName("size_t")] nuint triangle_count);
[DllImport("meshoptimizer", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
[return: NativeTypeName("size_t")]
public static extern nuint meshopt_encodeMeshletBound([NativeTypeName("size_t")] nuint max_vertices, [NativeTypeName("size_t")] nuint max_triangles);
[DllImport("meshoptimizer", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
public static extern int meshopt_decodeMeshlet(void* vertices, [NativeTypeName("size_t")] nuint vertex_count, [NativeTypeName("size_t")] nuint vertex_size, void* triangles, [NativeTypeName("size_t")] nuint triangle_count, [NativeTypeName("size_t")] nuint triangle_size, [NativeTypeName("const unsigned char *")] byte* buffer, [NativeTypeName("size_t")] nuint buffer_size);
[DllImport("meshoptimizer", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
public static extern int meshopt_decodeMeshletRaw([NativeTypeName("unsigned int *")] uint* vertices, [NativeTypeName("size_t")] nuint vertex_count, [NativeTypeName("unsigned int *")] uint* triangles, [NativeTypeName("size_t")] nuint triangle_count, [NativeTypeName("const unsigned char *")] byte* buffer, [NativeTypeName("size_t")] nuint buffer_size);
[DllImport("meshoptimizer", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
[return: NativeTypeName("size_t")] [return: NativeTypeName("size_t")]
public static extern nuint meshopt_encodeVertexBuffer([NativeTypeName("unsigned char *")] byte* buffer, [NativeTypeName("size_t")] nuint buffer_size, [NativeTypeName("const void *")] void* vertices, [NativeTypeName("size_t")] nuint vertex_count, [NativeTypeName("size_t")] nuint vertex_size); public static extern nuint meshopt_encodeVertexBuffer([NativeTypeName("unsigned char *")] byte* buffer, [NativeTypeName("size_t")] nuint buffer_size, [NativeTypeName("const void *")] void* vertices, [NativeTypeName("size_t")] nuint vertex_count, [NativeTypeName("size_t")] nuint vertex_size);
[DllImport(_DLL_NAME, CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)] [DllImport("meshoptimizer", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
[return: NativeTypeName("size_t")] [return: NativeTypeName("size_t")]
public static extern nuint meshopt_encodeVertexBufferBound([NativeTypeName("size_t")] nuint vertex_count, [NativeTypeName("size_t")] nuint vertex_size); public static extern nuint meshopt_encodeVertexBufferBound([NativeTypeName("size_t")] nuint vertex_count, [NativeTypeName("size_t")] nuint vertex_size);
[DllImport(_DLL_NAME, CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)] [DllImport("meshoptimizer", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
[return: NativeTypeName("size_t")] [return: NativeTypeName("size_t")]
public static extern nuint meshopt_encodeVertexBufferLevel([NativeTypeName("unsigned char *")] byte* buffer, [NativeTypeName("size_t")] nuint buffer_size, [NativeTypeName("const void *")] void* vertices, [NativeTypeName("size_t")] nuint vertex_count, [NativeTypeName("size_t")] nuint vertex_size, int level, int version); public static extern nuint meshopt_encodeVertexBufferLevel([NativeTypeName("unsigned char *")] byte* buffer, [NativeTypeName("size_t")] nuint buffer_size, [NativeTypeName("const void *")] void* vertices, [NativeTypeName("size_t")] nuint vertex_count, [NativeTypeName("size_t")] nuint vertex_size, int level, int version);
[DllImport(_DLL_NAME, CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)] [DllImport("meshoptimizer", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
public static extern void meshopt_encodeVertexVersion(int version); public static extern void meshopt_encodeVertexVersion(int version);
[DllImport(_DLL_NAME, CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)] [DllImport("meshoptimizer", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
public static extern int meshopt_decodeVertexBuffer(void* destination, [NativeTypeName("size_t")] nuint vertex_count, [NativeTypeName("size_t")] nuint vertex_size, [NativeTypeName("const unsigned char *")] byte* buffer, [NativeTypeName("size_t")] nuint buffer_size); public static extern int meshopt_decodeVertexBuffer(void* destination, [NativeTypeName("size_t")] nuint vertex_count, [NativeTypeName("size_t")] nuint vertex_size, [NativeTypeName("const unsigned char *")] byte* buffer, [NativeTypeName("size_t")] nuint buffer_size);
[DllImport(_DLL_NAME, CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)] [DllImport("meshoptimizer", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
public static extern int meshopt_decodeVertexVersion([NativeTypeName("const unsigned char *")] byte* buffer, [NativeTypeName("size_t")] nuint buffer_size); public static extern int meshopt_decodeVertexVersion([NativeTypeName("const unsigned char *")] byte* buffer, [NativeTypeName("size_t")] nuint buffer_size);
[DllImport(_DLL_NAME, CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)] [DllImport("meshoptimizer", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
public static extern void meshopt_decodeFilterOct(void* buffer, [NativeTypeName("size_t")] nuint count, [NativeTypeName("size_t")] nuint stride); public static extern void meshopt_decodeFilterOct(void* buffer, [NativeTypeName("size_t")] nuint count, [NativeTypeName("size_t")] nuint stride);
[DllImport(_DLL_NAME, CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)] [DllImport("meshoptimizer", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
public static extern void meshopt_decodeFilterQuat(void* buffer, [NativeTypeName("size_t")] nuint count, [NativeTypeName("size_t")] nuint stride); public static extern void meshopt_decodeFilterQuat(void* buffer, [NativeTypeName("size_t")] nuint count, [NativeTypeName("size_t")] nuint stride);
[DllImport(_DLL_NAME, CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)] [DllImport("meshoptimizer", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
public static extern void meshopt_decodeFilterExp(void* buffer, [NativeTypeName("size_t")] nuint count, [NativeTypeName("size_t")] nuint stride); public static extern void meshopt_decodeFilterExp(void* buffer, [NativeTypeName("size_t")] nuint count, [NativeTypeName("size_t")] nuint stride);
[DllImport(_DLL_NAME, CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)] [DllImport("meshoptimizer", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
public static extern void meshopt_decodeFilterColor(void* buffer, [NativeTypeName("size_t")] nuint count, [NativeTypeName("size_t")] nuint stride); public static extern void meshopt_decodeFilterColor(void* buffer, [NativeTypeName("size_t")] nuint count, [NativeTypeName("size_t")] nuint stride);
[DllImport(_DLL_NAME, CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)] [DllImport("meshoptimizer", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
public static extern void meshopt_encodeFilterOct(void* destination, [NativeTypeName("size_t")] nuint count, [NativeTypeName("size_t")] nuint stride, int bits, [NativeTypeName("const float *")] float* data); public static extern void meshopt_encodeFilterOct(void* destination, [NativeTypeName("size_t")] nuint count, [NativeTypeName("size_t")] nuint stride, int bits, [NativeTypeName("const float *")] float* data);
[DllImport(_DLL_NAME, CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)] [DllImport("meshoptimizer", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
public static extern void meshopt_encodeFilterQuat(void* destination, [NativeTypeName("size_t")] nuint count, [NativeTypeName("size_t")] nuint stride, int bits, [NativeTypeName("const float *")] float* data); public static extern void meshopt_encodeFilterQuat(void* destination, [NativeTypeName("size_t")] nuint count, [NativeTypeName("size_t")] nuint stride, int bits, [NativeTypeName("const float *")] float* data);
[DllImport(_DLL_NAME, CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)] [DllImport("meshoptimizer", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
public static extern void meshopt_encodeFilterExp(void* destination, [NativeTypeName("size_t")] nuint count, [NativeTypeName("size_t")] nuint stride, int bits, [NativeTypeName("const float *")] float* data, [NativeTypeName("enum meshopt_EncodeExpMode")] meshopt_EncodeExpMode mode); public static extern void meshopt_encodeFilterExp(void* destination, [NativeTypeName("size_t")] nuint count, [NativeTypeName("size_t")] nuint stride, int bits, [NativeTypeName("const float *")] float* data, [NativeTypeName("enum meshopt_EncodeExpMode")] meshopt_EncodeExpMode mode);
[DllImport(_DLL_NAME, CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)] [DllImport("meshoptimizer", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
public static extern void meshopt_encodeFilterColor(void* destination, [NativeTypeName("size_t")] nuint count, [NativeTypeName("size_t")] nuint stride, int bits, [NativeTypeName("const float *")] float* data); public static extern void meshopt_encodeFilterColor(void* destination, [NativeTypeName("size_t")] nuint count, [NativeTypeName("size_t")] nuint stride, int bits, [NativeTypeName("const float *")] float* data);
[DllImport(_DLL_NAME, CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)] public const int meshopt_SimplifyLockBorder = 1 << 0;
public const int meshopt_SimplifySparse = 1 << 1;
public const int meshopt_SimplifyErrorAbsolute = 1 << 2;
public const int meshopt_SimplifyPrune = 1 << 3;
public const int meshopt_SimplifyRegularize = 1 << 4;
public const int meshopt_SimplifyPermissive = 1 << 5;
public const int meshopt_SimplifyVertex_Lock = 1 << 0;
public const int meshopt_SimplifyVertex_Protect = 1 << 1;
[DllImport("meshoptimizer", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
[return: NativeTypeName("size_t")] [return: NativeTypeName("size_t")]
public static extern nuint meshopt_simplify([NativeTypeName("unsigned int *")] uint* destination, [NativeTypeName("const unsigned int *")] uint* indices, [NativeTypeName("size_t")] nuint index_count, [NativeTypeName("const float *")] float* vertex_positions, [NativeTypeName("size_t")] nuint vertex_count, [NativeTypeName("size_t")] nuint vertex_positions_stride, [NativeTypeName("size_t")] nuint target_index_count, float target_error, [NativeTypeName("unsigned int")] uint options, float* result_error); public static extern nuint meshopt_simplify([NativeTypeName("unsigned int *")] uint* destination, [NativeTypeName("const unsigned int *")] uint* indices, [NativeTypeName("size_t")] nuint index_count, [NativeTypeName("const float *")] float* vertex_positions, [NativeTypeName("size_t")] nuint vertex_count, [NativeTypeName("size_t")] nuint vertex_positions_stride, [NativeTypeName("size_t")] nuint target_index_count, float target_error, [NativeTypeName("unsigned int")] uint options, float* result_error);
[DllImport(_DLL_NAME, CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)] [DllImport("meshoptimizer", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
[return: NativeTypeName("size_t")] [return: NativeTypeName("size_t")]
public static extern nuint meshopt_simplifyWithAttributes([NativeTypeName("unsigned int *")] uint* destination, [NativeTypeName("const unsigned int *")] uint* indices, [NativeTypeName("size_t")] nuint index_count, [NativeTypeName("const float *")] float* vertex_positions, [NativeTypeName("size_t")] nuint vertex_count, [NativeTypeName("size_t")] nuint vertex_positions_stride, [NativeTypeName("const float *")] float* vertex_attributes, [NativeTypeName("size_t")] nuint vertex_attributes_stride, [NativeTypeName("const float *")] float* attribute_weights, [NativeTypeName("size_t")] nuint attribute_count, [NativeTypeName("const unsigned char *")] byte* vertex_lock, [NativeTypeName("size_t")] nuint target_index_count, float target_error, [NativeTypeName("unsigned int")] uint options, float* result_error); public static extern nuint meshopt_simplifyWithAttributes([NativeTypeName("unsigned int *")] uint* destination, [NativeTypeName("const unsigned int *")] uint* indices, [NativeTypeName("size_t")] nuint index_count, [NativeTypeName("const float *")] float* vertex_positions, [NativeTypeName("size_t")] nuint vertex_count, [NativeTypeName("size_t")] nuint vertex_positions_stride, [NativeTypeName("const float *")] float* vertex_attributes, [NativeTypeName("size_t")] nuint vertex_attributes_stride, [NativeTypeName("const float *")] float* attribute_weights, [NativeTypeName("size_t")] nuint attribute_count, [NativeTypeName("const unsigned char *")] byte* vertex_lock, [NativeTypeName("size_t")] nuint target_index_count, float target_error, [NativeTypeName("unsigned int")] uint options, float* result_error);
[DllImport(_DLL_NAME, CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)] [DllImport("meshoptimizer", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
[return: NativeTypeName("size_t")] [return: NativeTypeName("size_t")]
public static extern nuint meshopt_simplifyWithUpdate([NativeTypeName("unsigned int *")] uint* indices, [NativeTypeName("size_t")] nuint index_count, float* vertex_positions, [NativeTypeName("size_t")] nuint vertex_count, [NativeTypeName("size_t")] nuint vertex_positions_stride, float* vertex_attributes, [NativeTypeName("size_t")] nuint vertex_attributes_stride, [NativeTypeName("const float *")] float* attribute_weights, [NativeTypeName("size_t")] nuint attribute_count, [NativeTypeName("const unsigned char *")] byte* vertex_lock, [NativeTypeName("size_t")] nuint target_index_count, float target_error, [NativeTypeName("unsigned int")] uint options, float* result_error); public static extern nuint meshopt_simplifyWithUpdate([NativeTypeName("unsigned int *")] uint* indices, [NativeTypeName("size_t")] nuint index_count, float* vertex_positions, [NativeTypeName("size_t")] nuint vertex_count, [NativeTypeName("size_t")] nuint vertex_positions_stride, float* vertex_attributes, [NativeTypeName("size_t")] nuint vertex_attributes_stride, [NativeTypeName("const float *")] float* attribute_weights, [NativeTypeName("size_t")] nuint attribute_count, [NativeTypeName("const unsigned char *")] byte* vertex_lock, [NativeTypeName("size_t")] nuint target_index_count, float target_error, [NativeTypeName("unsigned int")] uint options, float* result_error);
[DllImport(_DLL_NAME, CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)] [DllImport("meshoptimizer", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
[return: NativeTypeName("size_t")] [return: NativeTypeName("size_t")]
public static extern nuint meshopt_simplifySloppy([NativeTypeName("unsigned int *")] uint* destination, [NativeTypeName("const unsigned int *")] uint* indices, [NativeTypeName("size_t")] nuint index_count, [NativeTypeName("const float *")] float* vertex_positions, [NativeTypeName("size_t")] nuint vertex_count, [NativeTypeName("size_t")] nuint vertex_positions_stride, [NativeTypeName("const unsigned char *")] byte* vertex_lock, [NativeTypeName("size_t")] nuint target_index_count, float target_error, float* result_error); public static extern nuint meshopt_simplifySloppy([NativeTypeName("unsigned int *")] uint* destination, [NativeTypeName("const unsigned int *")] uint* indices, [NativeTypeName("size_t")] nuint index_count, [NativeTypeName("const float *")] float* vertex_positions, [NativeTypeName("size_t")] nuint vertex_count, [NativeTypeName("size_t")] nuint vertex_positions_stride, [NativeTypeName("const unsigned char *")] byte* vertex_lock, [NativeTypeName("size_t")] nuint target_index_count, float target_error, float* result_error);
[DllImport(_DLL_NAME, CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)] [DllImport("meshoptimizer", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
[return: NativeTypeName("size_t")] [return: NativeTypeName("size_t")]
public static extern nuint meshopt_simplifyPrune([NativeTypeName("unsigned int *")] uint* destination, [NativeTypeName("const unsigned int *")] uint* indices, [NativeTypeName("size_t")] nuint index_count, [NativeTypeName("const float *")] float* vertex_positions, [NativeTypeName("size_t")] nuint vertex_count, [NativeTypeName("size_t")] nuint vertex_positions_stride, float target_error); public static extern nuint meshopt_simplifyPrune([NativeTypeName("unsigned int *")] uint* destination, [NativeTypeName("const unsigned int *")] uint* indices, [NativeTypeName("size_t")] nuint index_count, [NativeTypeName("const float *")] float* vertex_positions, [NativeTypeName("size_t")] nuint vertex_count, [NativeTypeName("size_t")] nuint vertex_positions_stride, float target_error);
[DllImport(_DLL_NAME, CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)] [DllImport("meshoptimizer", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
[return: NativeTypeName("size_t")] [return: NativeTypeName("size_t")]
public static extern nuint meshopt_simplifyPoints([NativeTypeName("unsigned int *")] uint* destination, [NativeTypeName("const float *")] float* vertex_positions, [NativeTypeName("size_t")] nuint vertex_count, [NativeTypeName("size_t")] nuint vertex_positions_stride, [NativeTypeName("const float *")] float* vertex_colors, [NativeTypeName("size_t")] nuint vertex_colors_stride, float color_weight, [NativeTypeName("size_t")] nuint target_vertex_count); public static extern nuint meshopt_simplifyPoints([NativeTypeName("unsigned int *")] uint* destination, [NativeTypeName("const float *")] float* vertex_positions, [NativeTypeName("size_t")] nuint vertex_count, [NativeTypeName("size_t")] nuint vertex_positions_stride, [NativeTypeName("const float *")] float* vertex_colors, [NativeTypeName("size_t")] nuint vertex_colors_stride, float color_weight, [NativeTypeName("size_t")] nuint target_vertex_count);
[DllImport(_DLL_NAME, CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)] [DllImport("meshoptimizer", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
public static extern float meshopt_simplifyScale([NativeTypeName("const float *")] float* vertex_positions, [NativeTypeName("size_t")] nuint vertex_count, [NativeTypeName("size_t")] nuint vertex_positions_stride); public static extern float meshopt_simplifyScale([NativeTypeName("const float *")] float* vertex_positions, [NativeTypeName("size_t")] nuint vertex_count, [NativeTypeName("size_t")] nuint vertex_positions_stride);
[DllImport(_DLL_NAME, CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)] [DllImport("meshoptimizer", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
[return: NativeTypeName("size_t")] [return: NativeTypeName("size_t")]
public static extern nuint meshopt_stripify([NativeTypeName("unsigned int *")] uint* destination, [NativeTypeName("const unsigned int *")] uint* indices, [NativeTypeName("size_t")] nuint index_count, [NativeTypeName("size_t")] nuint vertex_count, [NativeTypeName("unsigned int")] uint restart_index); public static extern nuint meshopt_stripify([NativeTypeName("unsigned int *")] uint* destination, [NativeTypeName("const unsigned int *")] uint* indices, [NativeTypeName("size_t")] nuint index_count, [NativeTypeName("size_t")] nuint vertex_count, [NativeTypeName("unsigned int")] uint restart_index);
[DllImport(_DLL_NAME, CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)] [DllImport("meshoptimizer", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
[return: NativeTypeName("size_t")] [return: NativeTypeName("size_t")]
public static extern nuint meshopt_stripifyBound([NativeTypeName("size_t")] nuint index_count); public static extern nuint meshopt_stripifyBound([NativeTypeName("size_t")] nuint index_count);
[DllImport(_DLL_NAME, CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)] [DllImport("meshoptimizer", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
[return: NativeTypeName("size_t")] [return: NativeTypeName("size_t")]
public static extern nuint meshopt_unstripify([NativeTypeName("unsigned int *")] uint* destination, [NativeTypeName("const unsigned int *")] uint* indices, [NativeTypeName("size_t")] nuint index_count, [NativeTypeName("unsigned int")] uint restart_index); public static extern nuint meshopt_unstripify([NativeTypeName("unsigned int *")] uint* destination, [NativeTypeName("const unsigned int *")] uint* indices, [NativeTypeName("size_t")] nuint index_count, [NativeTypeName("unsigned int")] uint restart_index);
[DllImport(_DLL_NAME, CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)] [DllImport("meshoptimizer", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
[return: NativeTypeName("size_t")] [return: NativeTypeName("size_t")]
public static extern nuint meshopt_unstripifyBound([NativeTypeName("size_t")] nuint index_count); public static extern nuint meshopt_unstripifyBound([NativeTypeName("size_t")] nuint index_count);
[DllImport(_DLL_NAME, CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)] [DllImport("meshoptimizer", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
[return: NativeTypeName("struct meshopt_VertexCacheStatistics")] [return: NativeTypeName("struct meshopt_VertexCacheStatistics")]
public static extern meshopt_VertexCacheStatistics meshopt_analyzeVertexCache([NativeTypeName("const unsigned int *")] uint* indices, [NativeTypeName("size_t")] nuint index_count, [NativeTypeName("size_t")] nuint vertex_count, [NativeTypeName("unsigned int")] uint cache_size, [NativeTypeName("unsigned int")] uint warp_size, [NativeTypeName("unsigned int")] uint primgroup_size); public static extern meshopt_VertexCacheStatistics meshopt_analyzeVertexCache([NativeTypeName("const unsigned int *")] uint* indices, [NativeTypeName("size_t")] nuint index_count, [NativeTypeName("size_t")] nuint vertex_count, [NativeTypeName("unsigned int")] uint cache_size, [NativeTypeName("unsigned int")] uint warp_size, [NativeTypeName("unsigned int")] uint primgroup_size);
[DllImport(_DLL_NAME, CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)] [DllImport("meshoptimizer", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
[return: NativeTypeName("struct meshopt_VertexFetchStatistics")] [return: NativeTypeName("struct meshopt_VertexFetchStatistics")]
public static extern meshopt_VertexFetchStatistics meshopt_analyzeVertexFetch([NativeTypeName("const unsigned int *")] uint* indices, [NativeTypeName("size_t")] nuint index_count, [NativeTypeName("size_t")] nuint vertex_count, [NativeTypeName("size_t")] nuint vertex_size); public static extern meshopt_VertexFetchStatistics meshopt_analyzeVertexFetch([NativeTypeName("const unsigned int *")] uint* indices, [NativeTypeName("size_t")] nuint index_count, [NativeTypeName("size_t")] nuint vertex_count, [NativeTypeName("size_t")] nuint vertex_size);
[DllImport(_DLL_NAME, CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)] [DllImport("meshoptimizer", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
[return: NativeTypeName("struct meshopt_OverdrawStatistics")] [return: NativeTypeName("struct meshopt_OverdrawStatistics")]
public static extern meshopt_OverdrawStatistics meshopt_analyzeOverdraw([NativeTypeName("const unsigned int *")] uint* indices, [NativeTypeName("size_t")] nuint index_count, [NativeTypeName("const float *")] float* vertex_positions, [NativeTypeName("size_t")] nuint vertex_count, [NativeTypeName("size_t")] nuint vertex_positions_stride); public static extern meshopt_OverdrawStatistics meshopt_analyzeOverdraw([NativeTypeName("const unsigned int *")] uint* indices, [NativeTypeName("size_t")] nuint index_count, [NativeTypeName("const float *")] float* vertex_positions, [NativeTypeName("size_t")] nuint vertex_count, [NativeTypeName("size_t")] nuint vertex_positions_stride);
[DllImport(_DLL_NAME, CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)] [DllImport("meshoptimizer", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
[return: NativeTypeName("struct meshopt_CoverageStatistics")] [return: NativeTypeName("struct meshopt_CoverageStatistics")]
public static extern meshopt_CoverageStatistics meshopt_analyzeCoverage([NativeTypeName("const unsigned int *")] uint* indices, [NativeTypeName("size_t")] nuint index_count, [NativeTypeName("const float *")] float* vertex_positions, [NativeTypeName("size_t")] nuint vertex_count, [NativeTypeName("size_t")] nuint vertex_positions_stride); public static extern meshopt_CoverageStatistics meshopt_analyzeCoverage([NativeTypeName("const unsigned int *")] uint* indices, [NativeTypeName("size_t")] nuint index_count, [NativeTypeName("const float *")] float* vertex_positions, [NativeTypeName("size_t")] nuint vertex_count, [NativeTypeName("size_t")] nuint vertex_positions_stride);
[DllImport(_DLL_NAME, CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)] [DllImport("meshoptimizer", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
[return: NativeTypeName("size_t")] [return: NativeTypeName("size_t")]
public static extern nuint meshopt_buildMeshlets([NativeTypeName("struct meshopt_Meshlet *")] meshopt_Meshlet* meshlets, [NativeTypeName("unsigned int *")] uint* meshlet_vertices, [NativeTypeName("unsigned char *")] byte* meshlet_triangles, [NativeTypeName("const unsigned int *")] uint* indices, [NativeTypeName("size_t")] nuint index_count, [NativeTypeName("const float *")] float* vertex_positions, [NativeTypeName("size_t")] nuint vertex_count, [NativeTypeName("size_t")] nuint vertex_positions_stride, [NativeTypeName("size_t")] nuint max_vertices, [NativeTypeName("size_t")] nuint max_triangles, float cone_weight); public static extern nuint meshopt_buildMeshlets([NativeTypeName("struct meshopt_Meshlet *")] meshopt_Meshlet* meshlets, [NativeTypeName("unsigned int *")] uint* meshlet_vertices, [NativeTypeName("unsigned char *")] byte* meshlet_triangles, [NativeTypeName("const unsigned int *")] uint* indices, [NativeTypeName("size_t")] nuint index_count, [NativeTypeName("const float *")] float* vertex_positions, [NativeTypeName("size_t")] nuint vertex_count, [NativeTypeName("size_t")] nuint vertex_positions_stride, [NativeTypeName("size_t")] nuint max_vertices, [NativeTypeName("size_t")] nuint max_triangles, float cone_weight);
[DllImport(_DLL_NAME, CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)] [DllImport("meshoptimizer", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
[return: NativeTypeName("size_t")] [return: NativeTypeName("size_t")]
public static extern nuint meshopt_buildMeshletsScan([NativeTypeName("struct meshopt_Meshlet *")] meshopt_Meshlet* meshlets, [NativeTypeName("unsigned int *")] uint* meshlet_vertices, [NativeTypeName("unsigned char *")] byte* meshlet_triangles, [NativeTypeName("const unsigned int *")] uint* indices, [NativeTypeName("size_t")] nuint index_count, [NativeTypeName("size_t")] nuint vertex_count, [NativeTypeName("size_t")] nuint max_vertices, [NativeTypeName("size_t")] nuint max_triangles); public static extern nuint meshopt_buildMeshletsScan([NativeTypeName("struct meshopt_Meshlet *")] meshopt_Meshlet* meshlets, [NativeTypeName("unsigned int *")] uint* meshlet_vertices, [NativeTypeName("unsigned char *")] byte* meshlet_triangles, [NativeTypeName("const unsigned int *")] uint* indices, [NativeTypeName("size_t")] nuint index_count, [NativeTypeName("size_t")] nuint vertex_count, [NativeTypeName("size_t")] nuint max_vertices, [NativeTypeName("size_t")] nuint max_triangles);
[DllImport(_DLL_NAME, CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)] [DllImport("meshoptimizer", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
[return: NativeTypeName("size_t")] [return: NativeTypeName("size_t")]
public static extern nuint meshopt_buildMeshletsBound([NativeTypeName("size_t")] nuint index_count, [NativeTypeName("size_t")] nuint max_vertices, [NativeTypeName("size_t")] nuint max_triangles); public static extern nuint meshopt_buildMeshletsBound([NativeTypeName("size_t")] nuint index_count, [NativeTypeName("size_t")] nuint max_vertices, [NativeTypeName("size_t")] nuint max_triangles);
[DllImport(_DLL_NAME, CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)] [DllImport("meshoptimizer", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
[return: NativeTypeName("size_t")] [return: NativeTypeName("size_t")]
public static extern nuint meshopt_buildMeshletsFlex([NativeTypeName("struct meshopt_Meshlet *")] meshopt_Meshlet* meshlets, [NativeTypeName("unsigned int *")] uint* meshlet_vertices, [NativeTypeName("unsigned char *")] byte* meshlet_triangles, [NativeTypeName("const unsigned int *")] uint* indices, [NativeTypeName("size_t")] nuint index_count, [NativeTypeName("const float *")] float* vertex_positions, [NativeTypeName("size_t")] nuint vertex_count, [NativeTypeName("size_t")] nuint vertex_positions_stride, [NativeTypeName("size_t")] nuint max_vertices, [NativeTypeName("size_t")] nuint min_triangles, [NativeTypeName("size_t")] nuint max_triangles, float cone_weight, float split_factor); public static extern nuint meshopt_buildMeshletsFlex([NativeTypeName("struct meshopt_Meshlet *")] meshopt_Meshlet* meshlets, [NativeTypeName("unsigned int *")] uint* meshlet_vertices, [NativeTypeName("unsigned char *")] byte* meshlet_triangles, [NativeTypeName("const unsigned int *")] uint* indices, [NativeTypeName("size_t")] nuint index_count, [NativeTypeName("const float *")] float* vertex_positions, [NativeTypeName("size_t")] nuint vertex_count, [NativeTypeName("size_t")] nuint vertex_positions_stride, [NativeTypeName("size_t")] nuint max_vertices, [NativeTypeName("size_t")] nuint min_triangles, [NativeTypeName("size_t")] nuint max_triangles, float cone_weight, float split_factor);
[DllImport(_DLL_NAME, CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)] [DllImport("meshoptimizer", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
[return: NativeTypeName("size_t")] [return: NativeTypeName("size_t")]
public static extern nuint meshopt_buildMeshletsSpatial([NativeTypeName("struct meshopt_Meshlet *")] meshopt_Meshlet* meshlets, [NativeTypeName("unsigned int *")] uint* meshlet_vertices, [NativeTypeName("unsigned char *")] byte* meshlet_triangles, [NativeTypeName("const unsigned int *")] uint* indices, [NativeTypeName("size_t")] nuint index_count, [NativeTypeName("const float *")] float* vertex_positions, [NativeTypeName("size_t")] nuint vertex_count, [NativeTypeName("size_t")] nuint vertex_positions_stride, [NativeTypeName("size_t")] nuint max_vertices, [NativeTypeName("size_t")] nuint min_triangles, [NativeTypeName("size_t")] nuint max_triangles, float fill_weight); public static extern nuint meshopt_buildMeshletsSpatial([NativeTypeName("struct meshopt_Meshlet *")] meshopt_Meshlet* meshlets, [NativeTypeName("unsigned int *")] uint* meshlet_vertices, [NativeTypeName("unsigned char *")] byte* meshlet_triangles, [NativeTypeName("const unsigned int *")] uint* indices, [NativeTypeName("size_t")] nuint index_count, [NativeTypeName("const float *")] float* vertex_positions, [NativeTypeName("size_t")] nuint vertex_count, [NativeTypeName("size_t")] nuint vertex_positions_stride, [NativeTypeName("size_t")] nuint max_vertices, [NativeTypeName("size_t")] nuint min_triangles, [NativeTypeName("size_t")] nuint max_triangles, float fill_weight);
[DllImport(_DLL_NAME, CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)] [DllImport("meshoptimizer", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
public static extern void meshopt_optimizeMeshlet([NativeTypeName("unsigned int *")] uint* meshlet_vertices, [NativeTypeName("unsigned char *")] byte* meshlet_triangles, [NativeTypeName("size_t")] nuint triangle_count, [NativeTypeName("size_t")] nuint vertex_count); public static extern void meshopt_optimizeMeshlet([NativeTypeName("unsigned int *")] uint* meshlet_vertices, [NativeTypeName("unsigned char *")] byte* meshlet_triangles, [NativeTypeName("size_t")] nuint triangle_count, [NativeTypeName("size_t")] nuint vertex_count);
[DllImport(_DLL_NAME, CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)] [DllImport("meshoptimizer", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
[return: NativeTypeName("struct meshopt_Bounds")] [return: NativeTypeName("struct meshopt_Bounds")]
public static extern meshopt_Bounds meshopt_computeClusterBounds([NativeTypeName("const unsigned int *")] uint* indices, [NativeTypeName("size_t")] nuint index_count, [NativeTypeName("const float *")] float* vertex_positions, [NativeTypeName("size_t")] nuint vertex_count, [NativeTypeName("size_t")] nuint vertex_positions_stride); public static extern meshopt_Bounds meshopt_computeClusterBounds([NativeTypeName("const unsigned int *")] uint* indices, [NativeTypeName("size_t")] nuint index_count, [NativeTypeName("const float *")] float* vertex_positions, [NativeTypeName("size_t")] nuint vertex_count, [NativeTypeName("size_t")] nuint vertex_positions_stride);
[DllImport(_DLL_NAME, CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)] [DllImport("meshoptimizer", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
[return: NativeTypeName("struct meshopt_Bounds")] [return: NativeTypeName("struct meshopt_Bounds")]
public static extern meshopt_Bounds meshopt_computeMeshletBounds([NativeTypeName("const unsigned int *")] uint* meshlet_vertices, [NativeTypeName("const unsigned char *")] byte* meshlet_triangles, [NativeTypeName("size_t")] nuint triangle_count, [NativeTypeName("const float *")] float* vertex_positions, [NativeTypeName("size_t")] nuint vertex_count, [NativeTypeName("size_t")] nuint vertex_positions_stride); public static extern meshopt_Bounds meshopt_computeMeshletBounds([NativeTypeName("const unsigned int *")] uint* meshlet_vertices, [NativeTypeName("const unsigned char *")] byte* meshlet_triangles, [NativeTypeName("size_t")] nuint triangle_count, [NativeTypeName("const float *")] float* vertex_positions, [NativeTypeName("size_t")] nuint vertex_count, [NativeTypeName("size_t")] nuint vertex_positions_stride);
[DllImport(_DLL_NAME, CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)] [DllImport("meshoptimizer", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
[return: NativeTypeName("struct meshopt_Bounds")] [return: NativeTypeName("struct meshopt_Bounds")]
public static extern meshopt_Bounds meshopt_computeSphereBounds([NativeTypeName("const float *")] float* positions, [NativeTypeName("size_t")] nuint count, [NativeTypeName("size_t")] nuint positions_stride, [NativeTypeName("const float *")] float* radii, [NativeTypeName("size_t")] nuint radii_stride); public static extern meshopt_Bounds meshopt_computeSphereBounds([NativeTypeName("const float *")] float* positions, [NativeTypeName("size_t")] nuint count, [NativeTypeName("size_t")] nuint positions_stride, [NativeTypeName("const float *")] float* radii, [NativeTypeName("size_t")] nuint radii_stride);
[DllImport(_DLL_NAME, CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)] [DllImport("meshoptimizer", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
[return: NativeTypeName("size_t")]
public static extern nuint meshopt_extractMeshletIndices([NativeTypeName("unsigned int *")] uint* vertices, [NativeTypeName("unsigned char *")] byte* triangles, [NativeTypeName("const unsigned int *")] uint* indices, [NativeTypeName("size_t")] nuint index_count);
[DllImport("meshoptimizer", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
[return: NativeTypeName("size_t")] [return: NativeTypeName("size_t")]
public static extern nuint meshopt_partitionClusters([NativeTypeName("unsigned int *")] uint* destination, [NativeTypeName("const unsigned int *")] uint* cluster_indices, [NativeTypeName("size_t")] nuint total_index_count, [NativeTypeName("const unsigned int *")] uint* cluster_index_counts, [NativeTypeName("size_t")] nuint cluster_count, [NativeTypeName("const float *")] float* vertex_positions, [NativeTypeName("size_t")] nuint vertex_count, [NativeTypeName("size_t")] nuint vertex_positions_stride, [NativeTypeName("size_t")] nuint target_partition_size); public static extern nuint meshopt_partitionClusters([NativeTypeName("unsigned int *")] uint* destination, [NativeTypeName("const unsigned int *")] uint* cluster_indices, [NativeTypeName("size_t")] nuint total_index_count, [NativeTypeName("const unsigned int *")] uint* cluster_index_counts, [NativeTypeName("size_t")] nuint cluster_count, [NativeTypeName("const float *")] float* vertex_positions, [NativeTypeName("size_t")] nuint vertex_count, [NativeTypeName("size_t")] nuint vertex_positions_stride, [NativeTypeName("size_t")] nuint target_partition_size);
[DllImport(_DLL_NAME, CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)] [DllImport("meshoptimizer", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
public static extern void meshopt_spatialSortRemap([NativeTypeName("unsigned int *")] uint* destination, [NativeTypeName("const float *")] float* vertex_positions, [NativeTypeName("size_t")] nuint vertex_count, [NativeTypeName("size_t")] nuint vertex_positions_stride); public static extern void meshopt_spatialSortRemap([NativeTypeName("unsigned int *")] uint* destination, [NativeTypeName("const float *")] float* vertex_positions, [NativeTypeName("size_t")] nuint vertex_count, [NativeTypeName("size_t")] nuint vertex_positions_stride);
[DllImport(_DLL_NAME, CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)] [DllImport("meshoptimizer", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
public static extern void meshopt_spatialSortTriangles([NativeTypeName("unsigned int *")] uint* destination, [NativeTypeName("const unsigned int *")] uint* indices, [NativeTypeName("size_t")] nuint index_count, [NativeTypeName("const float *")] float* vertex_positions, [NativeTypeName("size_t")] nuint vertex_count, [NativeTypeName("size_t")] nuint vertex_positions_stride); public static extern void meshopt_spatialSortTriangles([NativeTypeName("unsigned int *")] uint* destination, [NativeTypeName("const unsigned int *")] uint* indices, [NativeTypeName("size_t")] nuint index_count, [NativeTypeName("const float *")] float* vertex_positions, [NativeTypeName("size_t")] nuint vertex_count, [NativeTypeName("size_t")] nuint vertex_positions_stride);
[DllImport(_DLL_NAME, CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)] [DllImport("meshoptimizer", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
public static extern void meshopt_spatialClusterPoints([NativeTypeName("unsigned int *")] uint* destination, [NativeTypeName("const float *")] float* vertex_positions, [NativeTypeName("size_t")] nuint vertex_count, [NativeTypeName("size_t")] nuint vertex_positions_stride, [NativeTypeName("size_t")] nuint cluster_size); public static extern void meshopt_spatialClusterPoints([NativeTypeName("unsigned int *")] uint* destination, [NativeTypeName("const float *")] float* vertex_positions, [NativeTypeName("size_t")] nuint vertex_count, [NativeTypeName("size_t")] nuint vertex_positions_stride, [NativeTypeName("size_t")] nuint cluster_size);
[DllImport(_DLL_NAME, CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)] [DllImport("meshoptimizer", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
[return: NativeTypeName("size_t")]
public static extern nuint meshopt_opacityMapMeasure([NativeTypeName("unsigned char *")] byte* levels, [NativeTypeName("unsigned int *")] uint* sources, int* omm_indices, [NativeTypeName("const unsigned int *")] uint* indices, [NativeTypeName("size_t")] nuint index_count, [NativeTypeName("const float *")] float* vertex_uvs, [NativeTypeName("size_t")] nuint vertex_count, [NativeTypeName("size_t")] nuint vertex_uvs_stride, [NativeTypeName("unsigned int")] uint texture_width, [NativeTypeName("unsigned int")] uint texture_height, int max_level, float target_edge);
[DllImport("meshoptimizer", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
public static extern void meshopt_opacityMapRasterize([NativeTypeName("unsigned char *")] byte* result, int level, int states, [NativeTypeName("const float *")] float* uv0, [NativeTypeName("const float *")] float* uv1, [NativeTypeName("const float *")] float* uv2, [NativeTypeName("const unsigned char *")] byte* texture_data, [NativeTypeName("size_t")] nuint texture_stride, [NativeTypeName("size_t")] nuint texture_pitch, [NativeTypeName("unsigned int")] uint texture_width, [NativeTypeName("unsigned int")] uint texture_height);
[DllImport("meshoptimizer", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
[return: NativeTypeName("size_t")]
public static extern nuint meshopt_opacityMapEntrySize(int level, int states);
[DllImport("meshoptimizer", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
[return: NativeTypeName("size_t")]
public static extern nuint meshopt_opacityMapCompact([NativeTypeName("unsigned char *")] byte* data, [NativeTypeName("size_t")] nuint data_size, [NativeTypeName("unsigned char *")] byte* levels, [NativeTypeName("unsigned int *")] uint* offsets, [NativeTypeName("size_t")] nuint omm_count, int* omm_indices, [NativeTypeName("size_t")] nuint triangle_count, int states);
[DllImport("meshoptimizer", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
[return: NativeTypeName("unsigned short")] [return: NativeTypeName("unsigned short")]
public static extern ushort meshopt_quantizeHalf(float v); public static extern ushort meshopt_quantizeHalf(float v);
[DllImport(_DLL_NAME, CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)] [DllImport("meshoptimizer", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
public static extern float meshopt_quantizeFloat(float v, int N); public static extern float meshopt_quantizeFloat(float v, int N);
[DllImport(_DLL_NAME, CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)] [DllImport("meshoptimizer", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
public static extern float meshopt_dequantizeHalf([NativeTypeName("unsigned short")] ushort h); public static extern float meshopt_dequantizeHalf([NativeTypeName("unsigned short")] ushort h);
[DllImport(_DLL_NAME, CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)] [DllImport("meshoptimizer", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
public static extern void meshopt_setAllocator([NativeTypeName("void *(*)(size_t) __attribute__((cdecl))")] delegate* unmanaged[Cdecl]<nuint, void*> allocate, [NativeTypeName("void (*)(void *) __attribute__((cdecl))")] delegate* unmanaged[Cdecl]<void*, void> deallocate); public static extern void meshopt_setAllocator([NativeTypeName("void *(*)(size_t) __attribute__((cdecl))")] delegate* unmanaged[Cdecl]<nuint, void*> allocate, [NativeTypeName("void (*)(void *) __attribute__((cdecl))")] delegate* unmanaged[Cdecl]<void*, void> deallocate);
public static int meshopt_quantizeUnorm(float v, int N) [NativeTypeName("#define MESHOPTIMIZER_VERSION 1000")]
{ public const int MESHOPTIMIZER_VERSION = 1000;
var scale = (float)((1 << N) - 1);
v = (v >= 0) ? v : 0;
v = (v <= 1) ? v : 1;
return (int)(v * scale + 0.5f);
}
public static int meshopt_quantizeSnorm(float v, int N)
{
var scale = (float)((1 << (N - 1)) - 1);
var round = (v >= 0 ? 0.5f : -0.5f);
v = (v >= -1) ? v : -1;
v = (v <= +1) ? v : +1;
return (int)(v * scale + round);
}
[return: NativeTypeName("size_t")]
public static nuint meshopt_encodeVertexBufferLevel([NativeTypeName("unsigned char *")] byte* buffer, [NativeTypeName("size_t")] nuint buffer_size, [NativeTypeName("const void *")] void* vertices, [NativeTypeName("size_t")] nuint vertex_count, [NativeTypeName("size_t")] nuint vertex_size, int level)
{
return meshopt_encodeVertexBufferLevel(buffer, buffer_size, vertices, vertex_count, vertex_size, level, unchecked(-1));
} }
} }

View File

@@ -1,119 +0,0 @@
using System.Diagnostics;
using System.Runtime.CompilerServices;
using System.Runtime.InteropServices;
namespace Ghost.MeshOptimizer
{
public unsafe partial struct meshopt_Allocator
{
private static readonly Storage s_storage;
[NativeTypeName("void *[24]")]
private _blocks_e__FixedBuffer _blocks;
[NativeTypeName("size_t")]
private nuint _count;
static meshopt_Allocator()
{
s_storage = new Storage
{
// Use .NET's unmanaged memory functions.
allocate = &NativeMemory_Alloc,
deallocate = &NativeMemory_Free,
};
}
public meshopt_Allocator()
{
_count = 0;
}
[UnmanagedCallersOnly(CallConvs = new[] { typeof(CallConvCdecl) })]
private static void* NativeMemory_Alloc(nuint size)
{
return NativeMemory.Alloc(size);
}
[UnmanagedCallersOnly(CallConvs = new[] { typeof(CallConvCdecl) })]
private static void NativeMemory_Free(void* ptr)
{
NativeMemory.Free(ptr);
}
public T* allocate<T>(nuint size) where T : unmanaged
{
Debug.Assert(_count < 24, "Allocator block limit reached");
// Calculate total bytes needed
var bytes = size * (nuint)sizeof(T);
var result = (T*)s_storage.allocate(bytes);
_blocks[_count++] = result;
return result;
}
public void deallocate(void* ptr)
{
Debug.Assert(_count > 0 && _blocks[_count - 1] == ptr, "Deallocation is not in LIFO order");
s_storage.deallocate(ptr);
_count--;
}
public unsafe partial struct Storage
{
[NativeTypeName("void *(*)(size_t) __attribute__((cdecl))")]
public delegate* unmanaged[Cdecl]<nuint, void*> allocate;
[NativeTypeName("void (*)(void *) __attribute__((cdecl))")]
public delegate* unmanaged[Cdecl]<void*, void> deallocate;
}
public void Dispose()
{
for (var i = _count; i > 0; --i)
{
s_storage.deallocate(_blocks[i - 1]);
}
}
private unsafe partial struct _blocks_e__FixedBuffer
{
private void* e0;
private void* e1;
private void* e2;
private void* e3;
private void* e4;
private void* e5;
private void* e6;
private void* e7;
private void* e8;
private void* e9;
private void* e10;
private void* e11;
private void* e12;
private void* e13;
private void* e14;
private void* e15;
private void* e16;
private void* e17;
private void* e18;
private void* e19;
private void* e20;
private void* e21;
private void* e22;
private void* e23;
public ref void* this[nuint index]
{
get
{
fixed (void** pThis = &e0)
{
return ref pThis[index];
}
}
}
}
}
}

View File

@@ -1,12 +0,0 @@
namespace Ghost.MeshOptimizer
{
public enum meshopt_SimplifyOptions
{
meshopt_SimplifyLockBorder = 1 << 0,
meshopt_SimplifySparse = 1 << 1,
meshopt_SimplifyErrorAbsolute = 1 << 2,
meshopt_SimplifyPrune = 1 << 3,
meshopt_SimplifyRegularize = 1 << 4,
meshopt_SimplifyPermissive = 1 << 5,
}
}

View File

@@ -1,8 +0,0 @@
namespace Ghost.MeshOptimizer
{
public enum meshopt_SimplifyVertexFlags
{
meshopt_SimplifyVertex_Lock = 1 << 0,
meshopt_SimplifyVertex_Protect = 1 << 1,
}
}

File diff suppressed because it is too large Load Diff

View File

@@ -0,0 +1,88 @@
// <auto-generated>
// This file is generated by Ghost.NativeWrapperGen. Do not edit manually.
// </auto-generated>
namespace Ghost.MeshOptimizer;
public unsafe partial struct meshopt_Meshlet
{
/// <summary>
/// From: <see cref="Api.meshopt_buildMeshlets(meshopt_Meshlet*, uint*, byte*, uint*, nuint, float*, nuint, nuint, nuint, nuint, float)" />
/// </summary>
[System.Runtime.CompilerServices.MethodImpl(System.Runtime.CompilerServices.MethodImplOptions.AggressiveInlining)]
public nuint Builds(uint* meshlet_vertices, byte* meshlet_triangles, uint* indices, nuint index_count, float* vertex_positions, nuint vertex_count, nuint vertex_positions_stride, nuint max_vertices, nuint max_triangles, float cone_weight)
{
return Api.meshopt_buildMeshlets(
(meshopt_Meshlet*)System.Runtime.CompilerServices.Unsafe.AsPointer(ref this),
meshlet_vertices,
meshlet_triangles,
indices,
index_count,
vertex_positions,
vertex_count,
vertex_positions_stride,
max_vertices,
max_triangles,
cone_weight);
}
/// <summary>
/// From: <see cref="Api.meshopt_buildMeshletsScan(meshopt_Meshlet*, uint*, byte*, uint*, nuint, nuint, nuint, nuint)" />
/// </summary>
[System.Runtime.CompilerServices.MethodImpl(System.Runtime.CompilerServices.MethodImplOptions.AggressiveInlining)]
public nuint BuildsScan(uint* meshlet_vertices, byte* meshlet_triangles, uint* indices, nuint index_count, nuint vertex_count, nuint max_vertices, nuint max_triangles)
{
return Api.meshopt_buildMeshletsScan(
(meshopt_Meshlet*)System.Runtime.CompilerServices.Unsafe.AsPointer(ref this),
meshlet_vertices,
meshlet_triangles,
indices,
index_count,
vertex_count,
max_vertices,
max_triangles);
}
/// <summary>
/// From: <see cref="Api.meshopt_buildMeshletsFlex(meshopt_Meshlet*, uint*, byte*, uint*, nuint, float*, nuint, nuint, nuint, nuint, nuint, float, float)" />
/// </summary>
[System.Runtime.CompilerServices.MethodImpl(System.Runtime.CompilerServices.MethodImplOptions.AggressiveInlining)]
public nuint BuildsFlex(uint* meshlet_vertices, byte* meshlet_triangles, uint* indices, nuint index_count, float* vertex_positions, nuint vertex_count, nuint vertex_positions_stride, nuint max_vertices, nuint min_triangles, nuint max_triangles, float cone_weight, float split_factor)
{
return Api.meshopt_buildMeshletsFlex(
(meshopt_Meshlet*)System.Runtime.CompilerServices.Unsafe.AsPointer(ref this),
meshlet_vertices,
meshlet_triangles,
indices,
index_count,
vertex_positions,
vertex_count,
vertex_positions_stride,
max_vertices,
min_triangles,
max_triangles,
cone_weight,
split_factor);
}
/// <summary>
/// From: <see cref="Api.meshopt_buildMeshletsSpatial(meshopt_Meshlet*, uint*, byte*, uint*, nuint, float*, nuint, nuint, nuint, nuint, nuint, float)" />
/// </summary>
[System.Runtime.CompilerServices.MethodImpl(System.Runtime.CompilerServices.MethodImplOptions.AggressiveInlining)]
public nuint BuildsSpatial(uint* meshlet_vertices, byte* meshlet_triangles, uint* indices, nuint index_count, float* vertex_positions, nuint vertex_count, nuint vertex_positions_stride, nuint max_vertices, nuint min_triangles, nuint max_triangles, float fill_weight)
{
return Api.meshopt_buildMeshletsSpatial(
(meshopt_Meshlet*)System.Runtime.CompilerServices.Unsafe.AsPointer(ref this),
meshlet_vertices,
meshlet_triangles,
indices,
index_count,
vertex_positions,
vertex_count,
vertex_positions_stride,
max_vertices,
min_triangles,
max_triangles,
fill_weight);
}
}

View File

@@ -6,8 +6,8 @@ namespace Ghost.Nvtt
// NVTT_True, // NVTT_True,
//} //}
// The native NVTT API uses an enum for boolean values, but we want to expose it as a struct that can be implicitly converted to/from C# bool for better ergonomics. // NOTE: The native NVTT API uses an enum for boolean values, but we want to expose it as a struct that can be implicitly converted to/from C# bool for better ergonomics.
// Since the binary layout of a struct with a single int field is the same as an enum, this should be safe for interop. // Since the memory layout of a struct with a single int field is the same as an enum, this should be safe for interop.
public readonly struct NvttBoolean : IEquatable<NvttBoolean> public readonly struct NvttBoolean : IEquatable<NvttBoolean>
{ {
public static NvttBoolean NVTT_False => new(0); public static NvttBoolean NVTT_False => new(0);

View File

@@ -1,212 +0,0 @@
# Ghost.Nvtt - Usage Guide
`Ghost.Nvtt` is a managed C# wrapper over the NVIDIA Texture Tools 3 (nvtt) native library.
All wrapper classes are in the `Ghost.Nvtt` namespace. Add a single `using Ghost.Nvtt;` and you have access to every wrapper class and every enum.
---
## Quick-start: compress a PNG to BC7 DDS
```csharp
using Ghost.Nvtt;
// 1. Load source image
using var surface = new NvttSurface();
surface.Load("albedo.png", out bool hasAlpha);
// 2. Convert to linear before compression
surface.ToLinearFromSrgb();
// 3. Build compression options
using var compOpts = new NvttCompressionOptions();
compOpts.SetFormat(NvttFormat.NVTT_Format_BC7);
compOpts.SetQuality(NvttQuality.NVTT_Quality_Production);
// 4. Build output options (write to file)
using var outOpts = new NvttOutputOptions();
outOpts.SetFileName("albedo.dds");
outOpts.SetOutputHeader(true);
// 5. Create context and compress the full mip chain
using var ctx = new NvttContext();
ctx.SetCudaAcceleration(NvttGlobal.IsCudaSupported);
int mipmaps = surface.CountMipmaps();
ctx.OutputHeader(surface, mipmaps, compOpts, outOpts);
using var mip = surface.Clone();
for (int m = 0; m < mipmaps; m++)
{
ctx.Compress(mip, 0, m, compOpts, outOpts);
if (!mip.BuildNextMipmap(NvttMipmapFilter.NVTT_MipmapFilter_Box))
break;
}
```
---
## Capturing compressed data in memory
Instead of writing to a file, provide output handlers to accumulate bytes:
```csharp
using var outOpts = new NvttOutputOptions();
var buffer = new List<byte>();
outOpts.SetOutputHandler(
beginImage: (size, w, h, d, face, mip) => { /* optional: per-mip notification */ },
outputData: (data, hasAlpha) => { buffer.AddRange(data); return true; },
error: err => Console.Error.WriteLine(NvttGlobal.ErrorString(err)));
outOpts.SetOutputHeader(true);
```
---
## Cube maps
```csharp
using var cube = new NvttCubeSurface();
cube.Load("skybox.dds");
// Generate specular mip chain (cosine-power filter)
using var filtered = cube.CosinePowerFilter(size: 128, cosinePower: 64f);
using var compOpts = new NvttCompressionOptions();
compOpts.SetFormat(NvttFormat.NVTT_Format_BC6H_UF16);
using var outOpts = new NvttOutputOptions();
outOpts.SetFileName("skybox_spec.dds");
outOpts.SetOutputHeader(true);
using var ctx = new NvttContext();
int mipmaps = filtered.MipmapCount;
ctx.OutputHeaderCube(filtered, mipmaps, compOpts, outOpts);
for (int m = 0; m < mipmaps; m++)
ctx.CompressCube(filtered, m, compOpts, outOpts);
```
---
## Loading an existing DDS (SurfaceSet)
`NvttSurfaceSet` reads DDS files that may contain multiple faces and mip levels
without decoding them one-by-one:
```csharp
using var set = new NvttSurfaceSet();
set.LoadDDS("texture_array.dds");
Console.WriteLine($"{set.FaceCount} faces, {set.MipmapCount} mips, " +
$"{set.Width}x{set.Height}");
// Access the raw pointer for face 0, mip 0 (borrowed - do not dispose)
var surfacePtr = set.GetSurfacePtr(faceId: 0, mipId: 0);
```
---
## Batch compression
Use `NvttBatchList` to compress many surfaces in a single driver call (better
GPU utilisation):
```csharp
using var batch = new NvttBatchList();
using var compOpts = new NvttCompressionOptions();
compOpts.SetFormat(NvttFormat.NVTT_Format_BC1);
// Build one NvttOutputOptions per destination
var surfaces = LoadAllSurfaces(); // user-supplied IEnumerable<NvttSurface>
var outOptsList = new List<NvttOutputOptions>();
foreach (var (surf, path) in surfaces.Zip(paths))
{
var oo = new NvttOutputOptions();
oo.SetFileName(path);
outOptsList.Add(oo);
batch.Append(surf, face: 0, mipmap: 0, oo);
}
using var ctx = new NvttContext();
ctx.CompressBatch(batch, compOpts);
foreach (var oo in outOptsList) oo.Dispose();
```
---
## Timing
```csharp
using var ctx = new NvttContext();
ctx.EnableTiming(true, detailLevel: 1);
// ... compress ...
using var tc = new NvttTimingContext(detailLevel: 1);
// OR use ctx.GetTimingContextPtr() to borrow the context's own timing data.
```
---
## Global message callback
```csharp
using var token = NvttGlobal.SetMessageCallback((severity, error, description) =>
{
if (severity == NvttSeverity.NVTT_Severity_Error)
throw new Exception($"nvtt error {error}: {description}");
Console.WriteLine($"[nvtt] {severity}: {description}");
});
// ... do work ...
token.Dispose(); // unregisters the callback
```
---
## Image comparison helpers
```csharp
using var reference = new NvttSurface();
reference.Load("original.png", out _);
using var compressed = new NvttSurface();
compressed.Load("compressed.png", out _);
float rms = NvttGlobal.RmsError(reference, compressed);
float cielab = NvttGlobal.RmsCIELabError(reference, compressed);
using var diff = NvttGlobal.Diff(reference, compressed, scale: 4f);
diff.Save("diff.png");
```
---
## Common enums (all available without qualification after `using Ghost.Nvtt`)
| Enum | Key values |
|------|-----------|
| `NvttFormat` | `NVTT_Format_BC1``NVTT_Format_BC7`, `NVTT_Format_BC6H_UF16`, `NVTT_Format_RGBA` |
| `NvttQuality` | `NVTT_Quality_Fastest`, `NVTT_Quality_Normal`, `NVTT_Quality_Production`, `NVTT_Quality_Highest` |
| `NvttMipmapFilter` | `NVTT_MipmapFilter_Box`, `NVTT_MipmapFilter_Triangle`, `NVTT_MipmapFilter_Kaiser` |
| `NvttResizeFilter` | `NVTT_ResizeFilter_Box`, `NVTT_ResizeFilter_Triangle`, `NVTT_ResizeFilter_Kaiser` |
| `NvttRoundMode` | `NVTT_RoundMode_None`, `NVTT_RoundMode_ToPreviousPowerOfTwo`, `NVTT_RoundMode_ToNextPowerOfTwo` |
| `NvttTextureType` | `NVTT_TextureType_2D`, `NVTT_TextureType_3D`, `NVTT_TextureType_Cube` |
| `NvttCubeLayout` | `NVTT_CubeLayout_VerticalCross`, `NVTT_CubeLayout_HorizontalCross`, `NVTT_CubeLayout_Column` |
| `EdgeFixup` | `NVTT_EdgeFixup_None`, `NVTT_EdgeFixup_Stretch`, `NVTT_EdgeFixup_Warp` |
---
## Ownership rules
| Returns | Ownership |
|---------|-----------|
| `new NvttSurface(...)` constructor overload accepting a raw pointer | **Takes** ownership - dispose when done |
| `NvttSurface.Clone()` | Caller owns result |
| `NvttSurface.CreateSubImage()`, `CreateToksvigMap()` | Caller owns result |
| `NvttCubeSurface.Unfold()`, `IrradianceFilter()`, `CosinePowerFilter()`, `FastResample()` | Caller owns result |
| `NvttGlobal.Diff()`, `Histogram()`, `HistogramRange()` | Caller owns result |
| `NvttCubeSurface.FacePtr()`, `NvttSurfaceSet.GetSurfacePtr()` | **Borrowed** - do NOT dispose |
| `NvttContext.GetTimingContextPtr()` | **Borrowed** - do NOT dispose |

View File

@@ -0,0 +1,84 @@
// <auto-generated>
// This file is generated by Ghost.NativeWrapperGen. Do not edit manually.
// </auto-generated>
namespace Ghost.Nvtt;
public unsafe partial struct NvttApi
{
/// <summary>
/// From: <see cref="Api.nvttIsCudaSupported()" />
/// </summary>
[System.Runtime.CompilerServices.MethodImpl(System.Runtime.CompilerServices.MethodImplOptions.AggressiveInlining)]
public static NvttBoolean IsCudaSupported()
{
return Api.nvttIsCudaSupported();
}
/// <summary>
/// From: <see cref="Api.nvttUseCurrentDevice()" />
/// </summary>
[System.Runtime.CompilerServices.MethodImpl(System.Runtime.CompilerServices.MethodImplOptions.AggressiveInlining)]
public static void UseCurrentDevice()
{
Api.nvttUseCurrentDevice();
}
/// <summary>
/// From: <see cref="Api.nvttErrorString(NvttError)" />
/// </summary>
[System.Runtime.CompilerServices.MethodImpl(System.Runtime.CompilerServices.MethodImplOptions.AggressiveInlining)]
public static sbyte* ErrorString(NvttError e)
{
return Api.nvttErrorString(e);
}
/// <summary>
/// From: <see cref="Api.nvttVersion()" />
/// </summary>
[System.Runtime.CompilerServices.MethodImpl(System.Runtime.CompilerServices.MethodImplOptions.AggressiveInlining)]
public static uint Version()
{
return Api.nvttVersion();
}
/// <summary>
/// From: <see cref="Api.nvttSetMessageCallback(delegate* unmanaged[Cdecl]<NvttSeverity, NvttError, sbyte*, void*, void>, void*)" />
/// </summary>
[System.Runtime.CompilerServices.MethodImpl(System.Runtime.CompilerServices.MethodImplOptions.AggressiveInlining)]
public static NvttBoolean SetMessageCallback(delegate* unmanaged[Cdecl]<NvttSeverity, NvttError, sbyte*, void*, void> callback, void* userData)
{
return Api.nvttSetMessageCallback(
callback,
userData);
}
/// <summary>
/// From: <see cref="Api.nvttGetTargetExtent(int*, int*, int*, int, NvttRoundMode, NvttTextureType, NvttTimingContext*)" />
/// </summary>
[System.Runtime.CompilerServices.MethodImpl(System.Runtime.CompilerServices.MethodImplOptions.AggressiveInlining)]
public static void GetTargetExtent(int* width, int* height, int* depth, int maxExtent, NvttRoundMode roundMode, NvttTextureType textureType, NvttTimingContext* tc)
{
Api.nvttGetTargetExtent(
width,
height,
depth,
maxExtent,
roundMode,
textureType,
tc);
}
/// <summary>
/// From: <see cref="Api.nvttCountMipmaps(int, int, int, NvttTimingContext*)" />
/// </summary>
[System.Runtime.CompilerServices.MethodImpl(System.Runtime.CompilerServices.MethodImplOptions.AggressiveInlining)]
public static int CountMipmaps(int w, int h, int d, NvttTimingContext* tc)
{
return Api.nvttCountMipmaps(
w,
h,
d,
tc);
}
}

View File

@@ -6,25 +6,37 @@ namespace Ghost.Nvtt;
public unsafe partial struct NvttBatchList : System.IDisposable public unsafe partial struct NvttBatchList : System.IDisposable
{ {
// From: nvttCreateBatchList() /// <summary>
/// From: <see cref="Api.nvttCreateBatchList()" />
/// </summary>
[System.Runtime.CompilerServices.MethodImpl(System.Runtime.CompilerServices.MethodImplOptions.AggressiveInlining)]
public static NvttBatchList* Create() public static NvttBatchList* Create()
{ {
return Api.nvttCreateBatchList(); return Api.nvttCreateBatchList();
} }
// From: nvttDestroyBatchList(NvttBatchList*) /// <summary>
/// From: <see cref="Api.nvttDestroyBatchList(NvttBatchList*)" />
/// </summary>
[System.Runtime.CompilerServices.MethodImpl(System.Runtime.CompilerServices.MethodImplOptions.AggressiveInlining)]
public void Dispose() public void Dispose()
{ {
Api.nvttDestroyBatchList((NvttBatchList*)System.Runtime.CompilerServices.Unsafe.AsPointer(ref this)); Api.nvttDestroyBatchList((NvttBatchList*)System.Runtime.CompilerServices.Unsafe.AsPointer(ref this));
} }
// From: nvttBatchListClear(NvttBatchList*) /// <summary>
/// From: <see cref="Api.nvttBatchListClear(NvttBatchList*)" />
/// </summary>
[System.Runtime.CompilerServices.MethodImpl(System.Runtime.CompilerServices.MethodImplOptions.AggressiveInlining)]
public void Clear() public void Clear()
{ {
Api.nvttBatchListClear((NvttBatchList*)System.Runtime.CompilerServices.Unsafe.AsPointer(ref this)); Api.nvttBatchListClear((NvttBatchList*)System.Runtime.CompilerServices.Unsafe.AsPointer(ref this));
} }
// From: nvttBatchListAppend(NvttBatchList*, NvttSurface*, int, int, NvttOutputOptions*) /// <summary>
/// From: <see cref="Api.nvttBatchListAppend(NvttBatchList*, NvttSurface*, int, int, NvttOutputOptions*)" />
/// </summary>
[System.Runtime.CompilerServices.MethodImpl(System.Runtime.CompilerServices.MethodImplOptions.AggressiveInlining)]
public void Append(NvttSurface* pImg, int face, int mipmap, NvttOutputOptions* outputOptions) public void Append(NvttSurface* pImg, int face, int mipmap, NvttOutputOptions* outputOptions)
{ {
Api.nvttBatchListAppend( Api.nvttBatchListAppend(
@@ -35,13 +47,19 @@ public unsafe partial struct NvttBatchList : System.IDisposable
outputOptions); outputOptions);
} }
// From: nvttBatchListGetSize(NvttBatchList*) /// <summary>
/// From: <see cref="Api.nvttBatchListGetSize(NvttBatchList*)" />
/// </summary>
[System.Runtime.CompilerServices.MethodImpl(System.Runtime.CompilerServices.MethodImplOptions.AggressiveInlining)]
public uint GetSize() public uint GetSize()
{ {
return Api.nvttBatchListGetSize((NvttBatchList*)System.Runtime.CompilerServices.Unsafe.AsPointer(ref this)); return Api.nvttBatchListGetSize((NvttBatchList*)System.Runtime.CompilerServices.Unsafe.AsPointer(ref this));
} }
// From: nvttBatchListGetItem(NvttBatchList*, uint, NvttSurface**, int*, int*, NvttOutputOptions**) /// <summary>
/// From: <see cref="Api.nvttBatchListGetItem(NvttBatchList*, uint, NvttSurface**, int*, int*, NvttOutputOptions**)" />
/// </summary>
[System.Runtime.CompilerServices.MethodImpl(System.Runtime.CompilerServices.MethodImplOptions.AggressiveInlining)]
public void GetItem(uint i, NvttSurface** pImg, int* face, int* mipmap, NvttOutputOptions** outputOptions) public void GetItem(uint i, NvttSurface** pImg, int* face, int* mipmap, NvttOutputOptions** outputOptions)
{ {
Api.nvttBatchListGetItem( Api.nvttBatchListGetItem(

View File

@@ -6,19 +6,28 @@ namespace Ghost.Nvtt;
public unsafe partial struct NvttCPUInputBuffer : System.IDisposable public unsafe partial struct NvttCPUInputBuffer : System.IDisposable
{ {
// From: nvttDestroyCPUInputBuffer(NvttCPUInputBuffer*) /// <summary>
/// From: <see cref="Api.nvttDestroyCPUInputBuffer(NvttCPUInputBuffer*)" />
/// </summary>
[System.Runtime.CompilerServices.MethodImpl(System.Runtime.CompilerServices.MethodImplOptions.AggressiveInlining)]
public void Dispose() public void Dispose()
{ {
Api.nvttDestroyCPUInputBuffer((NvttCPUInputBuffer*)System.Runtime.CompilerServices.Unsafe.AsPointer(ref this)); Api.nvttDestroyCPUInputBuffer((NvttCPUInputBuffer*)System.Runtime.CompilerServices.Unsafe.AsPointer(ref this));
} }
// From: nvttCPUInputBufferNumTiles(NvttCPUInputBuffer*) /// <summary>
/// From: <see cref="Api.nvttCPUInputBufferNumTiles(NvttCPUInputBuffer*)" />
/// </summary>
[System.Runtime.CompilerServices.MethodImpl(System.Runtime.CompilerServices.MethodImplOptions.AggressiveInlining)]
public int NumTiles() public int NumTiles()
{ {
return Api.nvttCPUInputBufferNumTiles((NvttCPUInputBuffer*)System.Runtime.CompilerServices.Unsafe.AsPointer(ref this)); return Api.nvttCPUInputBufferNumTiles((NvttCPUInputBuffer*)System.Runtime.CompilerServices.Unsafe.AsPointer(ref this));
} }
// From: nvttCPUInputBufferTileSize(NvttCPUInputBuffer*, int*, int*) /// <summary>
/// From: <see cref="Api.nvttCPUInputBufferTileSize(NvttCPUInputBuffer*, int*, int*)" />
/// </summary>
[System.Runtime.CompilerServices.MethodImpl(System.Runtime.CompilerServices.MethodImplOptions.AggressiveInlining)]
public void TileSize(int* tile_w, int* tile_h) public void TileSize(int* tile_w, int* tile_h)
{ {
Api.nvttCPUInputBufferTileSize( Api.nvttCPUInputBufferTileSize(
@@ -27,13 +36,19 @@ public unsafe partial struct NvttCPUInputBuffer : System.IDisposable
tile_h); tile_h);
} }
// From: nvttCPUInputBufferType(NvttCPUInputBuffer*) /// <summary>
/// From: <see cref="Api.nvttCPUInputBufferType(NvttCPUInputBuffer*)" />
/// </summary>
[System.Runtime.CompilerServices.MethodImpl(System.Runtime.CompilerServices.MethodImplOptions.AggressiveInlining)]
public NvttValueType Type() public NvttValueType Type()
{ {
return Api.nvttCPUInputBufferType((NvttCPUInputBuffer*)System.Runtime.CompilerServices.Unsafe.AsPointer(ref this)); return Api.nvttCPUInputBufferType((NvttCPUInputBuffer*)System.Runtime.CompilerServices.Unsafe.AsPointer(ref this));
} }
// From: nvttEncodeCPU(NvttCPUInputBuffer*, void*, NvttEncodeSettings*) /// <summary>
/// From: <see cref="Api.nvttEncodeCPU(NvttCPUInputBuffer*, void*, NvttEncodeSettings*)" />
/// </summary>
[System.Runtime.CompilerServices.MethodImpl(System.Runtime.CompilerServices.MethodImplOptions.AggressiveInlining)]
public NvttBoolean EncodeCPU(void* output, NvttEncodeSettings* settings) public NvttBoolean EncodeCPU(void* output, NvttEncodeSettings* settings)
{ {
return Api.nvttEncodeCPU( return Api.nvttEncodeCPU(
@@ -42,7 +57,10 @@ public unsafe partial struct NvttCPUInputBuffer : System.IDisposable
settings); settings);
} }
// From: nvttEncodeBC1CPU(NvttCPUInputBuffer*, NvttBoolean, void*, NvttBoolean, NvttBoolean, NvttTimingContext*) /// <summary>
/// From: <see cref="Api.nvttEncodeBC1CPU(NvttCPUInputBuffer*, NvttBoolean, void*, NvttBoolean, NvttBoolean, NvttTimingContext*)" />
/// </summary>
[System.Runtime.CompilerServices.MethodImpl(System.Runtime.CompilerServices.MethodImplOptions.AggressiveInlining)]
public void EncodeBC1CPU(NvttBoolean fast_mode, void* output, NvttBoolean useGpu, NvttBoolean to_device_mem, NvttTimingContext* tc) public void EncodeBC1CPU(NvttBoolean fast_mode, void* output, NvttBoolean useGpu, NvttBoolean to_device_mem, NvttTimingContext* tc)
{ {
Api.nvttEncodeBC1CPU( Api.nvttEncodeBC1CPU(
@@ -54,7 +72,10 @@ public unsafe partial struct NvttCPUInputBuffer : System.IDisposable
tc); tc);
} }
// From: nvttEncodeBC1ACPU(NvttCPUInputBuffer*, NvttBoolean, void*, NvttBoolean, NvttBoolean, NvttTimingContext*) /// <summary>
/// From: <see cref="Api.nvttEncodeBC1ACPU(NvttCPUInputBuffer*, NvttBoolean, void*, NvttBoolean, NvttBoolean, NvttTimingContext*)" />
/// </summary>
[System.Runtime.CompilerServices.MethodImpl(System.Runtime.CompilerServices.MethodImplOptions.AggressiveInlining)]
public void EncodeBC1ACPU(NvttBoolean fast_mode, void* output, NvttBoolean useGpu, NvttBoolean to_device_mem, NvttTimingContext* tc) public void EncodeBC1ACPU(NvttBoolean fast_mode, void* output, NvttBoolean useGpu, NvttBoolean to_device_mem, NvttTimingContext* tc)
{ {
Api.nvttEncodeBC1ACPU( Api.nvttEncodeBC1ACPU(
@@ -66,7 +87,10 @@ public unsafe partial struct NvttCPUInputBuffer : System.IDisposable
tc); tc);
} }
// From: nvttEncodeBC2CPU(NvttCPUInputBuffer*, NvttBoolean, void*, NvttBoolean, NvttBoolean, NvttTimingContext*) /// <summary>
/// From: <see cref="Api.nvttEncodeBC2CPU(NvttCPUInputBuffer*, NvttBoolean, void*, NvttBoolean, NvttBoolean, NvttTimingContext*)" />
/// </summary>
[System.Runtime.CompilerServices.MethodImpl(System.Runtime.CompilerServices.MethodImplOptions.AggressiveInlining)]
public void EncodeBC2CPU(NvttBoolean fast_mode, void* output, NvttBoolean useGpu, NvttBoolean to_device_mem, NvttTimingContext* tc) public void EncodeBC2CPU(NvttBoolean fast_mode, void* output, NvttBoolean useGpu, NvttBoolean to_device_mem, NvttTimingContext* tc)
{ {
Api.nvttEncodeBC2CPU( Api.nvttEncodeBC2CPU(
@@ -78,7 +102,10 @@ public unsafe partial struct NvttCPUInputBuffer : System.IDisposable
tc); tc);
} }
// From: nvttEncodeBC3CPU(NvttCPUInputBuffer*, NvttBoolean, void*, NvttBoolean, NvttBoolean, NvttTimingContext*) /// <summary>
/// From: <see cref="Api.nvttEncodeBC3CPU(NvttCPUInputBuffer*, NvttBoolean, void*, NvttBoolean, NvttBoolean, NvttTimingContext*)" />
/// </summary>
[System.Runtime.CompilerServices.MethodImpl(System.Runtime.CompilerServices.MethodImplOptions.AggressiveInlining)]
public void EncodeBC3CPU(NvttBoolean fast_mode, void* output, NvttBoolean useGpu, NvttBoolean to_device_mem, NvttTimingContext* tc) public void EncodeBC3CPU(NvttBoolean fast_mode, void* output, NvttBoolean useGpu, NvttBoolean to_device_mem, NvttTimingContext* tc)
{ {
Api.nvttEncodeBC3CPU( Api.nvttEncodeBC3CPU(
@@ -90,7 +117,10 @@ public unsafe partial struct NvttCPUInputBuffer : System.IDisposable
tc); tc);
} }
// From: nvttEncodeBC3NCPU(NvttCPUInputBuffer*, int, void*, NvttTimingContext*) /// <summary>
/// From: <see cref="Api.nvttEncodeBC3NCPU(NvttCPUInputBuffer*, int, void*, NvttTimingContext*)" />
/// </summary>
[System.Runtime.CompilerServices.MethodImpl(System.Runtime.CompilerServices.MethodImplOptions.AggressiveInlining)]
public void EncodeBC3NCPU(int qualityLevel, void* output, NvttTimingContext* tc) public void EncodeBC3NCPU(int qualityLevel, void* output, NvttTimingContext* tc)
{ {
Api.nvttEncodeBC3NCPU( Api.nvttEncodeBC3NCPU(
@@ -100,7 +130,10 @@ public unsafe partial struct NvttCPUInputBuffer : System.IDisposable
tc); tc);
} }
// From: nvttEncodeBC3RGBMCPU(NvttCPUInputBuffer*, void*, NvttBoolean, NvttBoolean, NvttTimingContext*) /// <summary>
/// From: <see cref="Api.nvttEncodeBC3RGBMCPU(NvttCPUInputBuffer*, void*, NvttBoolean, NvttBoolean, NvttTimingContext*)" />
/// </summary>
[System.Runtime.CompilerServices.MethodImpl(System.Runtime.CompilerServices.MethodImplOptions.AggressiveInlining)]
public void EncodeBC3RGBMCPU(void* output, NvttBoolean useGpu, NvttBoolean to_device_mem, NvttTimingContext* tc) public void EncodeBC3RGBMCPU(void* output, NvttBoolean useGpu, NvttBoolean to_device_mem, NvttTimingContext* tc)
{ {
Api.nvttEncodeBC3RGBMCPU( Api.nvttEncodeBC3RGBMCPU(
@@ -111,7 +144,10 @@ public unsafe partial struct NvttCPUInputBuffer : System.IDisposable
tc); tc);
} }
// From: nvttEncodeBC4CPU(NvttCPUInputBuffer*, NvttBoolean, void*, NvttBoolean, NvttBoolean, NvttTimingContext*) /// <summary>
/// From: <see cref="Api.nvttEncodeBC4CPU(NvttCPUInputBuffer*, NvttBoolean, void*, NvttBoolean, NvttBoolean, NvttTimingContext*)" />
/// </summary>
[System.Runtime.CompilerServices.MethodImpl(System.Runtime.CompilerServices.MethodImplOptions.AggressiveInlining)]
public void EncodeBC4CPU(NvttBoolean slow_mode, void* output, NvttBoolean useGpu, NvttBoolean to_device_mem, NvttTimingContext* tc) public void EncodeBC4CPU(NvttBoolean slow_mode, void* output, NvttBoolean useGpu, NvttBoolean to_device_mem, NvttTimingContext* tc)
{ {
Api.nvttEncodeBC4CPU( Api.nvttEncodeBC4CPU(
@@ -123,7 +159,10 @@ public unsafe partial struct NvttCPUInputBuffer : System.IDisposable
tc); tc);
} }
// From: nvttEncodeBC4SCPU(NvttCPUInputBuffer*, NvttBoolean, void*, NvttBoolean, NvttBoolean, NvttTimingContext*) /// <summary>
/// From: <see cref="Api.nvttEncodeBC4SCPU(NvttCPUInputBuffer*, NvttBoolean, void*, NvttBoolean, NvttBoolean, NvttTimingContext*)" />
/// </summary>
[System.Runtime.CompilerServices.MethodImpl(System.Runtime.CompilerServices.MethodImplOptions.AggressiveInlining)]
public void EncodeBC4SCPU(NvttBoolean slow_mode, void* output, NvttBoolean useGpu, NvttBoolean to_device_mem, NvttTimingContext* tc) public void EncodeBC4SCPU(NvttBoolean slow_mode, void* output, NvttBoolean useGpu, NvttBoolean to_device_mem, NvttTimingContext* tc)
{ {
Api.nvttEncodeBC4SCPU( Api.nvttEncodeBC4SCPU(
@@ -135,7 +174,10 @@ public unsafe partial struct NvttCPUInputBuffer : System.IDisposable
tc); tc);
} }
// From: nvttEncodeATI2CPU(NvttCPUInputBuffer*, NvttBoolean, void*, NvttBoolean, NvttBoolean, NvttTimingContext*) /// <summary>
/// From: <see cref="Api.nvttEncodeATI2CPU(NvttCPUInputBuffer*, NvttBoolean, void*, NvttBoolean, NvttBoolean, NvttTimingContext*)" />
/// </summary>
[System.Runtime.CompilerServices.MethodImpl(System.Runtime.CompilerServices.MethodImplOptions.AggressiveInlining)]
public void EncodeATI2CPU(NvttBoolean slow_mode, void* output, NvttBoolean useGpu, NvttBoolean to_device_mem, NvttTimingContext* tc) public void EncodeATI2CPU(NvttBoolean slow_mode, void* output, NvttBoolean useGpu, NvttBoolean to_device_mem, NvttTimingContext* tc)
{ {
Api.nvttEncodeATI2CPU( Api.nvttEncodeATI2CPU(
@@ -147,7 +189,10 @@ public unsafe partial struct NvttCPUInputBuffer : System.IDisposable
tc); tc);
} }
// From: nvttEncodeBC5CPU(NvttCPUInputBuffer*, NvttBoolean, void*, NvttBoolean, NvttBoolean, NvttTimingContext*) /// <summary>
/// From: <see cref="Api.nvttEncodeBC5CPU(NvttCPUInputBuffer*, NvttBoolean, void*, NvttBoolean, NvttBoolean, NvttTimingContext*)" />
/// </summary>
[System.Runtime.CompilerServices.MethodImpl(System.Runtime.CompilerServices.MethodImplOptions.AggressiveInlining)]
public void EncodeBC5CPU(NvttBoolean slow_mode, void* output, NvttBoolean useGpu, NvttBoolean to_device_mem, NvttTimingContext* tc) public void EncodeBC5CPU(NvttBoolean slow_mode, void* output, NvttBoolean useGpu, NvttBoolean to_device_mem, NvttTimingContext* tc)
{ {
Api.nvttEncodeBC5CPU( Api.nvttEncodeBC5CPU(
@@ -159,7 +204,10 @@ public unsafe partial struct NvttCPUInputBuffer : System.IDisposable
tc); tc);
} }
// From: nvttEncodeBC5SCPU(NvttCPUInputBuffer*, NvttBoolean, void*, NvttBoolean, NvttBoolean, NvttTimingContext*) /// <summary>
/// From: <see cref="Api.nvttEncodeBC5SCPU(NvttCPUInputBuffer*, NvttBoolean, void*, NvttBoolean, NvttBoolean, NvttTimingContext*)" />
/// </summary>
[System.Runtime.CompilerServices.MethodImpl(System.Runtime.CompilerServices.MethodImplOptions.AggressiveInlining)]
public void EncodeBC5SCPU(NvttBoolean slow_mode, void* output, NvttBoolean useGpu, NvttBoolean to_device_mem, NvttTimingContext* tc) public void EncodeBC5SCPU(NvttBoolean slow_mode, void* output, NvttBoolean useGpu, NvttBoolean to_device_mem, NvttTimingContext* tc)
{ {
Api.nvttEncodeBC5SCPU( Api.nvttEncodeBC5SCPU(
@@ -171,7 +219,10 @@ public unsafe partial struct NvttCPUInputBuffer : System.IDisposable
tc); tc);
} }
// From: nvttEncodeBC6HCPU(NvttCPUInputBuffer*, NvttBoolean, NvttBoolean, void*, NvttBoolean, NvttBoolean, NvttTimingContext*) /// <summary>
/// From: <see cref="Api.nvttEncodeBC6HCPU(NvttCPUInputBuffer*, NvttBoolean, NvttBoolean, void*, NvttBoolean, NvttBoolean, NvttTimingContext*)" />
/// </summary>
[System.Runtime.CompilerServices.MethodImpl(System.Runtime.CompilerServices.MethodImplOptions.AggressiveInlining)]
public void EncodeBC6HCPU(NvttBoolean slow_mode, NvttBoolean is_signed, void* output, NvttBoolean useGpu, NvttBoolean to_device_mem, NvttTimingContext* tc) public void EncodeBC6HCPU(NvttBoolean slow_mode, NvttBoolean is_signed, void* output, NvttBoolean useGpu, NvttBoolean to_device_mem, NvttTimingContext* tc)
{ {
Api.nvttEncodeBC6HCPU( Api.nvttEncodeBC6HCPU(
@@ -184,7 +235,10 @@ public unsafe partial struct NvttCPUInputBuffer : System.IDisposable
tc); tc);
} }
// From: nvttEncodeBC7CPU(NvttCPUInputBuffer*, NvttBoolean, NvttBoolean, void*, NvttBoolean, NvttBoolean, NvttTimingContext*) /// <summary>
/// From: <see cref="Api.nvttEncodeBC7CPU(NvttCPUInputBuffer*, NvttBoolean, NvttBoolean, void*, NvttBoolean, NvttBoolean, NvttTimingContext*)" />
/// </summary>
[System.Runtime.CompilerServices.MethodImpl(System.Runtime.CompilerServices.MethodImplOptions.AggressiveInlining)]
public void EncodeBC7CPU(NvttBoolean slow_mode, NvttBoolean imageHasAlpha, void* output, NvttBoolean useGpu, NvttBoolean to_device_mem, NvttTimingContext* tc) public void EncodeBC7CPU(NvttBoolean slow_mode, NvttBoolean imageHasAlpha, void* output, NvttBoolean useGpu, NvttBoolean to_device_mem, NvttTimingContext* tc)
{ {
Api.nvttEncodeBC7CPU( Api.nvttEncodeBC7CPU(
@@ -197,7 +251,10 @@ public unsafe partial struct NvttCPUInputBuffer : System.IDisposable
tc); tc);
} }
// From: nvttEncodeASTCCPU(NvttCPUInputBuffer*, int, NvttBoolean, void*, NvttBoolean, NvttBoolean, NvttTimingContext*) /// <summary>
/// From: <see cref="Api.nvttEncodeASTCCPU(NvttCPUInputBuffer*, int, NvttBoolean, void*, NvttBoolean, NvttBoolean, NvttTimingContext*)" />
/// </summary>
[System.Runtime.CompilerServices.MethodImpl(System.Runtime.CompilerServices.MethodImplOptions.AggressiveInlining)]
public void EncodeASTCCPU(int qualityLevel, NvttBoolean imageHasAlpha, void* output, NvttBoolean useGpu, NvttBoolean to_device_mem, NvttTimingContext* tc) public void EncodeASTCCPU(int qualityLevel, NvttBoolean imageHasAlpha, void* output, NvttBoolean useGpu, NvttBoolean to_device_mem, NvttTimingContext* tc)
{ {
Api.nvttEncodeASTCCPU( Api.nvttEncodeASTCCPU(

View File

@@ -6,25 +6,37 @@ namespace Ghost.Nvtt;
public unsafe partial struct NvttCompressionOptions : System.IDisposable public unsafe partial struct NvttCompressionOptions : System.IDisposable
{ {
// From: nvttCreateCompressionOptions() /// <summary>
/// From: <see cref="Api.nvttCreateCompressionOptions()" />
/// </summary>
[System.Runtime.CompilerServices.MethodImpl(System.Runtime.CompilerServices.MethodImplOptions.AggressiveInlining)]
public static NvttCompressionOptions* Create() public static NvttCompressionOptions* Create()
{ {
return Api.nvttCreateCompressionOptions(); return Api.nvttCreateCompressionOptions();
} }
// From: nvttDestroyCompressionOptions(NvttCompressionOptions*) /// <summary>
/// From: <see cref="Api.nvttDestroyCompressionOptions(NvttCompressionOptions*)" />
/// </summary>
[System.Runtime.CompilerServices.MethodImpl(System.Runtime.CompilerServices.MethodImplOptions.AggressiveInlining)]
public void Dispose() public void Dispose()
{ {
Api.nvttDestroyCompressionOptions((NvttCompressionOptions*)System.Runtime.CompilerServices.Unsafe.AsPointer(ref this)); Api.nvttDestroyCompressionOptions((NvttCompressionOptions*)System.Runtime.CompilerServices.Unsafe.AsPointer(ref this));
} }
// From: nvttResetCompressionOptions(NvttCompressionOptions*) /// <summary>
/// From: <see cref="Api.nvttResetCompressionOptions(NvttCompressionOptions*)" />
/// </summary>
[System.Runtime.CompilerServices.MethodImpl(System.Runtime.CompilerServices.MethodImplOptions.AggressiveInlining)]
public void Reset() public void Reset()
{ {
Api.nvttResetCompressionOptions((NvttCompressionOptions*)System.Runtime.CompilerServices.Unsafe.AsPointer(ref this)); Api.nvttResetCompressionOptions((NvttCompressionOptions*)System.Runtime.CompilerServices.Unsafe.AsPointer(ref this));
} }
// From: nvttSetCompressionOptionsFormat(NvttCompressionOptions*, NvttFormat) /// <summary>
/// From: <see cref="Api.nvttSetCompressionOptionsFormat(NvttCompressionOptions*, NvttFormat)" />
/// </summary>
[System.Runtime.CompilerServices.MethodImpl(System.Runtime.CompilerServices.MethodImplOptions.AggressiveInlining)]
public void SetFormat(NvttFormat format) public void SetFormat(NvttFormat format)
{ {
Api.nvttSetCompressionOptionsFormat( Api.nvttSetCompressionOptionsFormat(
@@ -32,7 +44,10 @@ public unsafe partial struct NvttCompressionOptions : System.IDisposable
format); format);
} }
// From: nvttSetCompressionOptionsQuality(NvttCompressionOptions*, NvttQuality) /// <summary>
/// From: <see cref="Api.nvttSetCompressionOptionsQuality(NvttCompressionOptions*, NvttQuality)" />
/// </summary>
[System.Runtime.CompilerServices.MethodImpl(System.Runtime.CompilerServices.MethodImplOptions.AggressiveInlining)]
public void SetQuality(NvttQuality quality) public void SetQuality(NvttQuality quality)
{ {
Api.nvttSetCompressionOptionsQuality( Api.nvttSetCompressionOptionsQuality(
@@ -40,7 +55,10 @@ public unsafe partial struct NvttCompressionOptions : System.IDisposable
quality); quality);
} }
// From: nvttSetCompressionOptionsColorWeights(NvttCompressionOptions*, float, float, float, float) /// <summary>
/// From: <see cref="Api.nvttSetCompressionOptionsColorWeights(NvttCompressionOptions*, float, float, float, float)" />
/// </summary>
[System.Runtime.CompilerServices.MethodImpl(System.Runtime.CompilerServices.MethodImplOptions.AggressiveInlining)]
public void SetColorWeights(float red, float green, float blue, float alpha) public void SetColorWeights(float red, float green, float blue, float alpha)
{ {
Api.nvttSetCompressionOptionsColorWeights( Api.nvttSetCompressionOptionsColorWeights(
@@ -51,7 +69,10 @@ public unsafe partial struct NvttCompressionOptions : System.IDisposable
alpha); alpha);
} }
// From: nvttSetCompressionOptionsPixelFormat(NvttCompressionOptions*, uint, uint, uint, uint, uint) /// <summary>
/// From: <see cref="Api.nvttSetCompressionOptionsPixelFormat(NvttCompressionOptions*, uint, uint, uint, uint, uint)" />
/// </summary>
[System.Runtime.CompilerServices.MethodImpl(System.Runtime.CompilerServices.MethodImplOptions.AggressiveInlining)]
public void SetPixelFormat(uint bitcount, uint rmask, uint gmask, uint bmask, uint amask) public void SetPixelFormat(uint bitcount, uint rmask, uint gmask, uint bmask, uint amask)
{ {
Api.nvttSetCompressionOptionsPixelFormat( Api.nvttSetCompressionOptionsPixelFormat(
@@ -63,7 +84,10 @@ public unsafe partial struct NvttCompressionOptions : System.IDisposable
amask); amask);
} }
// From: nvttSetCompressionOptionsPixelType(NvttCompressionOptions*, NvttPixelType) /// <summary>
/// From: <see cref="Api.nvttSetCompressionOptionsPixelType(NvttCompressionOptions*, NvttPixelType)" />
/// </summary>
[System.Runtime.CompilerServices.MethodImpl(System.Runtime.CompilerServices.MethodImplOptions.AggressiveInlining)]
public void SetPixelType(NvttPixelType pixelType) public void SetPixelType(NvttPixelType pixelType)
{ {
Api.nvttSetCompressionOptionsPixelType( Api.nvttSetCompressionOptionsPixelType(
@@ -71,7 +95,10 @@ public unsafe partial struct NvttCompressionOptions : System.IDisposable
pixelType); pixelType);
} }
// From: nvttSetCompressionOptionsPitchAlignment(NvttCompressionOptions*, int) /// <summary>
/// From: <see cref="Api.nvttSetCompressionOptionsPitchAlignment(NvttCompressionOptions*, int)" />
/// </summary>
[System.Runtime.CompilerServices.MethodImpl(System.Runtime.CompilerServices.MethodImplOptions.AggressiveInlining)]
public void SetPitchAlignment(int pitchAlignment) public void SetPitchAlignment(int pitchAlignment)
{ {
Api.nvttSetCompressionOptionsPitchAlignment( Api.nvttSetCompressionOptionsPitchAlignment(
@@ -79,7 +106,10 @@ public unsafe partial struct NvttCompressionOptions : System.IDisposable
pitchAlignment); pitchAlignment);
} }
// From: nvttSetCompressionOptionsQuantization(NvttCompressionOptions*, NvttBoolean, NvttBoolean, NvttBoolean, int) /// <summary>
/// From: <see cref="Api.nvttSetCompressionOptionsQuantization(NvttCompressionOptions*, NvttBoolean, NvttBoolean, NvttBoolean, int)" />
/// </summary>
[System.Runtime.CompilerServices.MethodImpl(System.Runtime.CompilerServices.MethodImplOptions.AggressiveInlining)]
public void SetQuantization(NvttBoolean colorDithering, NvttBoolean alphaDithering, NvttBoolean binaryAlpha, int alphaThreshold) public void SetQuantization(NvttBoolean colorDithering, NvttBoolean alphaDithering, NvttBoolean binaryAlpha, int alphaThreshold)
{ {
Api.nvttSetCompressionOptionsQuantization( Api.nvttSetCompressionOptionsQuantization(
@@ -90,7 +120,10 @@ public unsafe partial struct NvttCompressionOptions : System.IDisposable
alphaThreshold); alphaThreshold);
} }
// From: nvttGetCompressionOptionsD3D9Format(NvttCompressionOptions*) /// <summary>
/// From: <see cref="Api.nvttGetCompressionOptionsD3D9Format(NvttCompressionOptions*)" />
/// </summary>
[System.Runtime.CompilerServices.MethodImpl(System.Runtime.CompilerServices.MethodImplOptions.AggressiveInlining)]
public uint GetD3D9Format() public uint GetD3D9Format()
{ {
return Api.nvttGetCompressionOptionsD3D9Format((NvttCompressionOptions*)System.Runtime.CompilerServices.Unsafe.AsPointer(ref this)); return Api.nvttGetCompressionOptionsD3D9Format((NvttCompressionOptions*)System.Runtime.CompilerServices.Unsafe.AsPointer(ref this));

View File

@@ -6,19 +6,28 @@ namespace Ghost.Nvtt;
public unsafe partial struct NvttContext : System.IDisposable public unsafe partial struct NvttContext : System.IDisposable
{ {
// From: nvttCreateContext() /// <summary>
/// From: <see cref="Api.nvttCreateContext()" />
/// </summary>
[System.Runtime.CompilerServices.MethodImpl(System.Runtime.CompilerServices.MethodImplOptions.AggressiveInlining)]
public static NvttContext* Create() public static NvttContext* Create()
{ {
return Api.nvttCreateContext(); return Api.nvttCreateContext();
} }
// From: nvttDestroyContext(NvttContext*) /// <summary>
/// From: <see cref="Api.nvttDestroyContext(NvttContext*)" />
/// </summary>
[System.Runtime.CompilerServices.MethodImpl(System.Runtime.CompilerServices.MethodImplOptions.AggressiveInlining)]
public void Dispose() public void Dispose()
{ {
Api.nvttDestroyContext((NvttContext*)System.Runtime.CompilerServices.Unsafe.AsPointer(ref this)); Api.nvttDestroyContext((NvttContext*)System.Runtime.CompilerServices.Unsafe.AsPointer(ref this));
} }
// From: nvttSetContextCudaAcceleration(NvttContext*, NvttBoolean) /// <summary>
/// From: <see cref="Api.nvttSetContextCudaAcceleration(NvttContext*, NvttBoolean)" />
/// </summary>
[System.Runtime.CompilerServices.MethodImpl(System.Runtime.CompilerServices.MethodImplOptions.AggressiveInlining)]
public void SetCudaAcceleration(NvttBoolean enable) public void SetCudaAcceleration(NvttBoolean enable)
{ {
Api.nvttSetContextCudaAcceleration( Api.nvttSetContextCudaAcceleration(
@@ -26,13 +35,19 @@ public unsafe partial struct NvttContext : System.IDisposable
enable); enable);
} }
// From: nvttContextIsCudaAccelerationEnabled(NvttContext*) /// <summary>
/// From: <see cref="Api.nvttContextIsCudaAccelerationEnabled(NvttContext*)" />
/// </summary>
[System.Runtime.CompilerServices.MethodImpl(System.Runtime.CompilerServices.MethodImplOptions.AggressiveInlining)]
public NvttBoolean IsCudaAccelerationEnabled() public NvttBoolean IsCudaAccelerationEnabled()
{ {
return Api.nvttContextIsCudaAccelerationEnabled((NvttContext*)System.Runtime.CompilerServices.Unsafe.AsPointer(ref this)); return Api.nvttContextIsCudaAccelerationEnabled((NvttContext*)System.Runtime.CompilerServices.Unsafe.AsPointer(ref this));
} }
// From: nvttContextOutputHeader(NvttContext*, NvttSurface*, int, NvttCompressionOptions*, NvttOutputOptions*) /// <summary>
/// From: <see cref="Api.nvttContextOutputHeader(NvttContext*, NvttSurface*, int, NvttCompressionOptions*, NvttOutputOptions*)" />
/// </summary>
[System.Runtime.CompilerServices.MethodImpl(System.Runtime.CompilerServices.MethodImplOptions.AggressiveInlining)]
public NvttBoolean OutputHeader(NvttSurface* img, int mipmapCount, NvttCompressionOptions* compressionOptions, NvttOutputOptions* outputOptions) public NvttBoolean OutputHeader(NvttSurface* img, int mipmapCount, NvttCompressionOptions* compressionOptions, NvttOutputOptions* outputOptions)
{ {
return Api.nvttContextOutputHeader( return Api.nvttContextOutputHeader(
@@ -43,7 +58,10 @@ public unsafe partial struct NvttContext : System.IDisposable
outputOptions); outputOptions);
} }
// From: nvttContextCompress(NvttContext*, NvttSurface*, int, int, NvttCompressionOptions*, NvttOutputOptions*) /// <summary>
/// From: <see cref="Api.nvttContextCompress(NvttContext*, NvttSurface*, int, int, NvttCompressionOptions*, NvttOutputOptions*)" />
/// </summary>
[System.Runtime.CompilerServices.MethodImpl(System.Runtime.CompilerServices.MethodImplOptions.AggressiveInlining)]
public NvttBoolean Compress(NvttSurface* img, int face, int mipmap, NvttCompressionOptions* compressionOptions, NvttOutputOptions* outputOptions) public NvttBoolean Compress(NvttSurface* img, int face, int mipmap, NvttCompressionOptions* compressionOptions, NvttOutputOptions* outputOptions)
{ {
return Api.nvttContextCompress( return Api.nvttContextCompress(
@@ -55,7 +73,10 @@ public unsafe partial struct NvttContext : System.IDisposable
outputOptions); outputOptions);
} }
// From: nvttContextEstimateSize(NvttContext*, NvttSurface*, int, NvttCompressionOptions*) /// <summary>
/// From: <see cref="Api.nvttContextEstimateSize(NvttContext*, NvttSurface*, int, NvttCompressionOptions*)" />
/// </summary>
[System.Runtime.CompilerServices.MethodImpl(System.Runtime.CompilerServices.MethodImplOptions.AggressiveInlining)]
public int EstimateSize(NvttSurface* img, int mipmapCount, NvttCompressionOptions* compressionOptions) public int EstimateSize(NvttSurface* img, int mipmapCount, NvttCompressionOptions* compressionOptions)
{ {
return Api.nvttContextEstimateSize( return Api.nvttContextEstimateSize(
@@ -65,7 +86,10 @@ public unsafe partial struct NvttContext : System.IDisposable
compressionOptions); compressionOptions);
} }
// From: nvttContextQuantize(NvttContext*, NvttSurface*, NvttCompressionOptions*) /// <summary>
/// From: <see cref="Api.nvttContextQuantize(NvttContext*, NvttSurface*, NvttCompressionOptions*)" />
/// </summary>
[System.Runtime.CompilerServices.MethodImpl(System.Runtime.CompilerServices.MethodImplOptions.AggressiveInlining)]
public void Quantize(NvttSurface* tex, NvttCompressionOptions* compressionOptions) public void Quantize(NvttSurface* tex, NvttCompressionOptions* compressionOptions)
{ {
Api.nvttContextQuantize( Api.nvttContextQuantize(
@@ -74,7 +98,10 @@ public unsafe partial struct NvttContext : System.IDisposable
compressionOptions); compressionOptions);
} }
// From: nvttContextOutputHeaderCube(NvttContext*, NvttCubeSurface*, int, NvttCompressionOptions*, NvttOutputOptions*) /// <summary>
/// From: <see cref="Api.nvttContextOutputHeaderCube(NvttContext*, NvttCubeSurface*, int, NvttCompressionOptions*, NvttOutputOptions*)" />
/// </summary>
[System.Runtime.CompilerServices.MethodImpl(System.Runtime.CompilerServices.MethodImplOptions.AggressiveInlining)]
public NvttBoolean OutputHeaderCube(NvttCubeSurface* img, int mipmapCount, NvttCompressionOptions* compressionOptions, NvttOutputOptions* outputOptions) public NvttBoolean OutputHeaderCube(NvttCubeSurface* img, int mipmapCount, NvttCompressionOptions* compressionOptions, NvttOutputOptions* outputOptions)
{ {
return Api.nvttContextOutputHeaderCube( return Api.nvttContextOutputHeaderCube(
@@ -85,7 +112,10 @@ public unsafe partial struct NvttContext : System.IDisposable
outputOptions); outputOptions);
} }
// From: nvttContextCompressCube(NvttContext*, NvttCubeSurface*, int, NvttCompressionOptions*, NvttOutputOptions*) /// <summary>
/// From: <see cref="Api.nvttContextCompressCube(NvttContext*, NvttCubeSurface*, int, NvttCompressionOptions*, NvttOutputOptions*)" />
/// </summary>
[System.Runtime.CompilerServices.MethodImpl(System.Runtime.CompilerServices.MethodImplOptions.AggressiveInlining)]
public NvttBoolean CompressCube(NvttCubeSurface* img, int mipmap, NvttCompressionOptions* compressionOptions, NvttOutputOptions* outputOptions) public NvttBoolean CompressCube(NvttCubeSurface* img, int mipmap, NvttCompressionOptions* compressionOptions, NvttOutputOptions* outputOptions)
{ {
return Api.nvttContextCompressCube( return Api.nvttContextCompressCube(
@@ -96,7 +126,10 @@ public unsafe partial struct NvttContext : System.IDisposable
outputOptions); outputOptions);
} }
// From: nvttContextEstimateSizeCube(NvttContext*, NvttCubeSurface*, int, NvttCompressionOptions*) /// <summary>
/// From: <see cref="Api.nvttContextEstimateSizeCube(NvttContext*, NvttCubeSurface*, int, NvttCompressionOptions*)" />
/// </summary>
[System.Runtime.CompilerServices.MethodImpl(System.Runtime.CompilerServices.MethodImplOptions.AggressiveInlining)]
public int EstimateSizeCube(NvttCubeSurface* img, int mipmapCount, NvttCompressionOptions* compressionOptions) public int EstimateSizeCube(NvttCubeSurface* img, int mipmapCount, NvttCompressionOptions* compressionOptions)
{ {
return Api.nvttContextEstimateSizeCube( return Api.nvttContextEstimateSizeCube(
@@ -106,7 +139,10 @@ public unsafe partial struct NvttContext : System.IDisposable
compressionOptions); compressionOptions);
} }
// From: nvttContextOutputHeaderData(NvttContext*, NvttTextureType, int, int, int, int, NvttBoolean, NvttCompressionOptions*, NvttOutputOptions*) /// <summary>
/// From: <see cref="Api.nvttContextOutputHeaderData(NvttContext*, NvttTextureType, int, int, int, int, NvttBoolean, NvttCompressionOptions*, NvttOutputOptions*)" />
/// </summary>
[System.Runtime.CompilerServices.MethodImpl(System.Runtime.CompilerServices.MethodImplOptions.AggressiveInlining)]
public NvttBoolean OutputHeaderData(NvttTextureType type, int w, int h, int d, int mipmapCount, NvttBoolean isNormalMap, NvttCompressionOptions* compressionOptions, NvttOutputOptions* outputOptions) public NvttBoolean OutputHeaderData(NvttTextureType type, int w, int h, int d, int mipmapCount, NvttBoolean isNormalMap, NvttCompressionOptions* compressionOptions, NvttOutputOptions* outputOptions)
{ {
return Api.nvttContextOutputHeaderData( return Api.nvttContextOutputHeaderData(
@@ -121,7 +157,10 @@ public unsafe partial struct NvttContext : System.IDisposable
outputOptions); outputOptions);
} }
// From: nvttContextCompressData(NvttContext*, int, int, int, int, int, float*, NvttCompressionOptions*, NvttOutputOptions*) /// <summary>
/// From: <see cref="Api.nvttContextCompressData(NvttContext*, int, int, int, int, int, float*, NvttCompressionOptions*, NvttOutputOptions*)" />
/// </summary>
[System.Runtime.CompilerServices.MethodImpl(System.Runtime.CompilerServices.MethodImplOptions.AggressiveInlining)]
public NvttBoolean CompressData(int w, int h, int d, int face, int mipmap, float* rgba, NvttCompressionOptions* compressionOptions, NvttOutputOptions* outputOptions) public NvttBoolean CompressData(int w, int h, int d, int face, int mipmap, float* rgba, NvttCompressionOptions* compressionOptions, NvttOutputOptions* outputOptions)
{ {
return Api.nvttContextCompressData( return Api.nvttContextCompressData(
@@ -136,7 +175,10 @@ public unsafe partial struct NvttContext : System.IDisposable
outputOptions); outputOptions);
} }
// From: nvttContextEstimateSizeData(NvttContext*, int, int, int, int, NvttCompressionOptions*) /// <summary>
/// From: <see cref="Api.nvttContextEstimateSizeData(NvttContext*, int, int, int, int, NvttCompressionOptions*)" />
/// </summary>
[System.Runtime.CompilerServices.MethodImpl(System.Runtime.CompilerServices.MethodImplOptions.AggressiveInlining)]
public int EstimateSizeData(int w, int h, int d, int mipmapCount, NvttCompressionOptions* compressionOptions) public int EstimateSizeData(int w, int h, int d, int mipmapCount, NvttCompressionOptions* compressionOptions)
{ {
return Api.nvttContextEstimateSizeData( return Api.nvttContextEstimateSizeData(
@@ -148,7 +190,10 @@ public unsafe partial struct NvttContext : System.IDisposable
compressionOptions); compressionOptions);
} }
// From: nvttContextCompressBatch(NvttContext*, NvttBatchList*, NvttCompressionOptions*) /// <summary>
/// From: <see cref="Api.nvttContextCompressBatch(NvttContext*, NvttBatchList*, NvttCompressionOptions*)" />
/// </summary>
[System.Runtime.CompilerServices.MethodImpl(System.Runtime.CompilerServices.MethodImplOptions.AggressiveInlining)]
public NvttBoolean CompressBatch(NvttBatchList* lst, NvttCompressionOptions* compressionOptions) public NvttBoolean CompressBatch(NvttBatchList* lst, NvttCompressionOptions* compressionOptions)
{ {
return Api.nvttContextCompressBatch( return Api.nvttContextCompressBatch(
@@ -157,7 +202,10 @@ public unsafe partial struct NvttContext : System.IDisposable
compressionOptions); compressionOptions);
} }
// From: nvttContextEnableTiming(NvttContext*, NvttBoolean, int) /// <summary>
/// From: <see cref="Api.nvttContextEnableTiming(NvttContext*, NvttBoolean, int)" />
/// </summary>
[System.Runtime.CompilerServices.MethodImpl(System.Runtime.CompilerServices.MethodImplOptions.AggressiveInlining)]
public void EnableTiming(NvttBoolean enable, int detailLevel) public void EnableTiming(NvttBoolean enable, int detailLevel)
{ {
Api.nvttContextEnableTiming( Api.nvttContextEnableTiming(
@@ -166,7 +214,10 @@ public unsafe partial struct NvttContext : System.IDisposable
detailLevel); detailLevel);
} }
// From: nvttContextGetTimingContext(NvttContext*) /// <summary>
/// From: <see cref="Api.nvttContextGetTimingContext(NvttContext*)" />
/// </summary>
[System.Runtime.CompilerServices.MethodImpl(System.Runtime.CompilerServices.MethodImplOptions.AggressiveInlining)]
public NvttTimingContext* GetTiming() public NvttTimingContext* GetTiming()
{ {
return Api.nvttContextGetTimingContext((NvttContext*)System.Runtime.CompilerServices.Unsafe.AsPointer(ref this)); return Api.nvttContextGetTimingContext((NvttContext*)System.Runtime.CompilerServices.Unsafe.AsPointer(ref this));

View File

@@ -6,37 +6,55 @@ namespace Ghost.Nvtt;
public unsafe partial struct NvttCubeSurface : System.IDisposable public unsafe partial struct NvttCubeSurface : System.IDisposable
{ {
// From: nvttCreateCubeSurface() /// <summary>
/// From: <see cref="Api.nvttCreateCubeSurface()" />
/// </summary>
[System.Runtime.CompilerServices.MethodImpl(System.Runtime.CompilerServices.MethodImplOptions.AggressiveInlining)]
public static NvttCubeSurface* Create() public static NvttCubeSurface* Create()
{ {
return Api.nvttCreateCubeSurface(); return Api.nvttCreateCubeSurface();
} }
// From: nvttDestroyCubeSurface(NvttCubeSurface*) /// <summary>
/// From: <see cref="Api.nvttDestroyCubeSurface(NvttCubeSurface*)" />
/// </summary>
[System.Runtime.CompilerServices.MethodImpl(System.Runtime.CompilerServices.MethodImplOptions.AggressiveInlining)]
public void Dispose() public void Dispose()
{ {
Api.nvttDestroyCubeSurface((NvttCubeSurface*)System.Runtime.CompilerServices.Unsafe.AsPointer(ref this)); Api.nvttDestroyCubeSurface((NvttCubeSurface*)System.Runtime.CompilerServices.Unsafe.AsPointer(ref this));
} }
// From: nvttCubeSurfaceIsNull(NvttCubeSurface*) /// <summary>
/// From: <see cref="Api.nvttCubeSurfaceIsNull(NvttCubeSurface*)" />
/// </summary>
[System.Runtime.CompilerServices.MethodImpl(System.Runtime.CompilerServices.MethodImplOptions.AggressiveInlining)]
public NvttBoolean IsNull() public NvttBoolean IsNull()
{ {
return Api.nvttCubeSurfaceIsNull((NvttCubeSurface*)System.Runtime.CompilerServices.Unsafe.AsPointer(ref this)); return Api.nvttCubeSurfaceIsNull((NvttCubeSurface*)System.Runtime.CompilerServices.Unsafe.AsPointer(ref this));
} }
// From: nvttCubeSurfaceEdgeLength(NvttCubeSurface*) /// <summary>
/// From: <see cref="Api.nvttCubeSurfaceEdgeLength(NvttCubeSurface*)" />
/// </summary>
[System.Runtime.CompilerServices.MethodImpl(System.Runtime.CompilerServices.MethodImplOptions.AggressiveInlining)]
public int EdgeLength() public int EdgeLength()
{ {
return Api.nvttCubeSurfaceEdgeLength((NvttCubeSurface*)System.Runtime.CompilerServices.Unsafe.AsPointer(ref this)); return Api.nvttCubeSurfaceEdgeLength((NvttCubeSurface*)System.Runtime.CompilerServices.Unsafe.AsPointer(ref this));
} }
// From: nvttCubeSurfaceCountMipmaps(NvttCubeSurface*) /// <summary>
/// From: <see cref="Api.nvttCubeSurfaceCountMipmaps(NvttCubeSurface*)" />
/// </summary>
[System.Runtime.CompilerServices.MethodImpl(System.Runtime.CompilerServices.MethodImplOptions.AggressiveInlining)]
public int CountMipmaps() public int CountMipmaps()
{ {
return Api.nvttCubeSurfaceCountMipmaps((NvttCubeSurface*)System.Runtime.CompilerServices.Unsafe.AsPointer(ref this)); return Api.nvttCubeSurfaceCountMipmaps((NvttCubeSurface*)System.Runtime.CompilerServices.Unsafe.AsPointer(ref this));
} }
// From: nvttCubeSurfaceLoad(NvttCubeSurface*, sbyte*, int) /// <summary>
/// From: <see cref="Api.nvttCubeSurfaceLoad(NvttCubeSurface*, sbyte*, int)" />
/// </summary>
[System.Runtime.CompilerServices.MethodImpl(System.Runtime.CompilerServices.MethodImplOptions.AggressiveInlining)]
public NvttBoolean Load(ReadOnlySpan<byte> fileName, int mipmap) public NvttBoolean Load(ReadOnlySpan<byte> fileName, int mipmap)
{ {
fixed (byte* pfileName = fileName) fixed (byte* pfileName = fileName)
@@ -48,7 +66,10 @@ public unsafe partial struct NvttCubeSurface : System.IDisposable
} }
} }
// From: nvttCubeSurfaceLoadFromMemory(NvttCubeSurface*, void*, ulong, int) /// <summary>
/// From: <see cref="Api.nvttCubeSurfaceLoadFromMemory(NvttCubeSurface*, void*, ulong, int)" />
/// </summary>
[System.Runtime.CompilerServices.MethodImpl(System.Runtime.CompilerServices.MethodImplOptions.AggressiveInlining)]
public NvttBoolean LoadFromMemory(void* data, ulong sizeInBytes, int mipmap) public NvttBoolean LoadFromMemory(void* data, ulong sizeInBytes, int mipmap)
{ {
return Api.nvttCubeSurfaceLoadFromMemory( return Api.nvttCubeSurfaceLoadFromMemory(
@@ -58,7 +79,10 @@ public unsafe partial struct NvttCubeSurface : System.IDisposable
mipmap); mipmap);
} }
// From: nvttCubeSurfaceSave(NvttCubeSurface*, sbyte*) /// <summary>
/// From: <see cref="Api.nvttCubeSurfaceSave(NvttCubeSurface*, sbyte*)" />
/// </summary>
[System.Runtime.CompilerServices.MethodImpl(System.Runtime.CompilerServices.MethodImplOptions.AggressiveInlining)]
public NvttBoolean Save(ReadOnlySpan<byte> fileName) public NvttBoolean Save(ReadOnlySpan<byte> fileName)
{ {
fixed (byte* pfileName = fileName) fixed (byte* pfileName = fileName)
@@ -69,7 +93,10 @@ public unsafe partial struct NvttCubeSurface : System.IDisposable
} }
} }
// From: nvttCubeSurfaceFace(NvttCubeSurface*, int) /// <summary>
/// From: <see cref="Api.nvttCubeSurfaceFace(NvttCubeSurface*, int)" />
/// </summary>
[System.Runtime.CompilerServices.MethodImpl(System.Runtime.CompilerServices.MethodImplOptions.AggressiveInlining)]
public NvttSurface* Face(int face) public NvttSurface* Face(int face)
{ {
return Api.nvttCubeSurfaceFace( return Api.nvttCubeSurfaceFace(
@@ -77,7 +104,10 @@ public unsafe partial struct NvttCubeSurface : System.IDisposable
face); face);
} }
// From: nvttCubeSurfaceFold(NvttCubeSurface*, NvttSurface*, NvttCubeLayout) /// <summary>
/// From: <see cref="Api.nvttCubeSurfaceFold(NvttCubeSurface*, NvttSurface*, NvttCubeLayout)" />
/// </summary>
[System.Runtime.CompilerServices.MethodImpl(System.Runtime.CompilerServices.MethodImplOptions.AggressiveInlining)]
public void Fold(NvttSurface* img, NvttCubeLayout layout) public void Fold(NvttSurface* img, NvttCubeLayout layout)
{ {
Api.nvttCubeSurfaceFold( Api.nvttCubeSurfaceFold(
@@ -86,7 +116,10 @@ public unsafe partial struct NvttCubeSurface : System.IDisposable
layout); layout);
} }
// From: nvttCubeSurfaceUnfold(NvttCubeSurface*, NvttCubeLayout) /// <summary>
/// From: <see cref="Api.nvttCubeSurfaceUnfold(NvttCubeSurface*, NvttCubeLayout)" />
/// </summary>
[System.Runtime.CompilerServices.MethodImpl(System.Runtime.CompilerServices.MethodImplOptions.AggressiveInlining)]
public NvttSurface* Unfold(NvttCubeLayout layout) public NvttSurface* Unfold(NvttCubeLayout layout)
{ {
return Api.nvttCubeSurfaceUnfold( return Api.nvttCubeSurfaceUnfold(
@@ -94,7 +127,10 @@ public unsafe partial struct NvttCubeSurface : System.IDisposable
layout); layout);
} }
// From: nvttCubeSurfaceAverage(NvttCubeSurface*, int) /// <summary>
/// From: <see cref="Api.nvttCubeSurfaceAverage(NvttCubeSurface*, int)" />
/// </summary>
[System.Runtime.CompilerServices.MethodImpl(System.Runtime.CompilerServices.MethodImplOptions.AggressiveInlining)]
public float Average(int channel) public float Average(int channel)
{ {
return Api.nvttCubeSurfaceAverage( return Api.nvttCubeSurfaceAverage(
@@ -102,7 +138,10 @@ public unsafe partial struct NvttCubeSurface : System.IDisposable
channel); channel);
} }
// From: nvttCubeSurfaceRange(NvttCubeSurface*, int, float*, float*) /// <summary>
/// From: <see cref="Api.nvttCubeSurfaceRange(NvttCubeSurface*, int, float*, float*)" />
/// </summary>
[System.Runtime.CompilerServices.MethodImpl(System.Runtime.CompilerServices.MethodImplOptions.AggressiveInlining)]
public void Range(int channel, float* minimum_ptr, float* maximum_ptr) public void Range(int channel, float* minimum_ptr, float* maximum_ptr)
{ {
Api.nvttCubeSurfaceRange( Api.nvttCubeSurfaceRange(
@@ -112,7 +151,10 @@ public unsafe partial struct NvttCubeSurface : System.IDisposable
maximum_ptr); maximum_ptr);
} }
// From: nvttCubeSurfaceClamp(NvttCubeSurface*, int, float, float) /// <summary>
/// From: <see cref="Api.nvttCubeSurfaceClamp(NvttCubeSurface*, int, float, float)" />
/// </summary>
[System.Runtime.CompilerServices.MethodImpl(System.Runtime.CompilerServices.MethodImplOptions.AggressiveInlining)]
public void Clamp(int channel, float low, float high) public void Clamp(int channel, float low, float high)
{ {
Api.nvttCubeSurfaceClamp( Api.nvttCubeSurfaceClamp(
@@ -122,7 +164,10 @@ public unsafe partial struct NvttCubeSurface : System.IDisposable
high); high);
} }
// From: nvttCubeSurfaceIrradianceFilter(NvttCubeSurface*, int, EdgeFixup) /// <summary>
/// From: <see cref="Api.nvttCubeSurfaceIrradianceFilter(NvttCubeSurface*, int, EdgeFixup)" />
/// </summary>
[System.Runtime.CompilerServices.MethodImpl(System.Runtime.CompilerServices.MethodImplOptions.AggressiveInlining)]
public NvttCubeSurface* IrradianceFilter(int size, EdgeFixup fixupMethod) public NvttCubeSurface* IrradianceFilter(int size, EdgeFixup fixupMethod)
{ {
return Api.nvttCubeSurfaceIrradianceFilter( return Api.nvttCubeSurfaceIrradianceFilter(
@@ -131,7 +176,10 @@ public unsafe partial struct NvttCubeSurface : System.IDisposable
fixupMethod); fixupMethod);
} }
// From: nvttCubeSurfaceCosinePowerFilter(NvttCubeSurface*, int, float, EdgeFixup) /// <summary>
/// From: <see cref="Api.nvttCubeSurfaceCosinePowerFilter(NvttCubeSurface*, int, float, EdgeFixup)" />
/// </summary>
[System.Runtime.CompilerServices.MethodImpl(System.Runtime.CompilerServices.MethodImplOptions.AggressiveInlining)]
public NvttCubeSurface* CosinePowerFilter(int size, float cosinePower, EdgeFixup fixupMethod) public NvttCubeSurface* CosinePowerFilter(int size, float cosinePower, EdgeFixup fixupMethod)
{ {
return Api.nvttCubeSurfaceCosinePowerFilter( return Api.nvttCubeSurfaceCosinePowerFilter(
@@ -141,7 +189,10 @@ public unsafe partial struct NvttCubeSurface : System.IDisposable
fixupMethod); fixupMethod);
} }
// From: nvttCubeSurfaceFastResample(NvttCubeSurface*, int, EdgeFixup) /// <summary>
/// From: <see cref="Api.nvttCubeSurfaceFastResample(NvttCubeSurface*, int, EdgeFixup)" />
/// </summary>
[System.Runtime.CompilerServices.MethodImpl(System.Runtime.CompilerServices.MethodImplOptions.AggressiveInlining)]
public NvttCubeSurface* FastResample(int size, EdgeFixup fixupMethod) public NvttCubeSurface* FastResample(int size, EdgeFixup fixupMethod)
{ {
return Api.nvttCubeSurfaceFastResample( return Api.nvttCubeSurfaceFastResample(
@@ -150,7 +201,10 @@ public unsafe partial struct NvttCubeSurface : System.IDisposable
fixupMethod); fixupMethod);
} }
// From: nvttCubeSurfaceToLinear(NvttCubeSurface*, float) /// <summary>
/// From: <see cref="Api.nvttCubeSurfaceToLinear(NvttCubeSurface*, float)" />
/// </summary>
[System.Runtime.CompilerServices.MethodImpl(System.Runtime.CompilerServices.MethodImplOptions.AggressiveInlining)]
public void ToLinear(float gamma) public void ToLinear(float gamma)
{ {
Api.nvttCubeSurfaceToLinear( Api.nvttCubeSurfaceToLinear(
@@ -158,7 +212,10 @@ public unsafe partial struct NvttCubeSurface : System.IDisposable
gamma); gamma);
} }
// From: nvttCubeSurfaceToGamma(NvttCubeSurface*, float) /// <summary>
/// From: <see cref="Api.nvttCubeSurfaceToGamma(NvttCubeSurface*, float)" />
/// </summary>
[System.Runtime.CompilerServices.MethodImpl(System.Runtime.CompilerServices.MethodImplOptions.AggressiveInlining)]
public void ToGamma(float gamma) public void ToGamma(float gamma)
{ {
Api.nvttCubeSurfaceToGamma( Api.nvttCubeSurfaceToGamma(

View File

@@ -6,19 +6,28 @@ namespace Ghost.Nvtt;
public unsafe partial struct NvttGPUInputBuffer : System.IDisposable public unsafe partial struct NvttGPUInputBuffer : System.IDisposable
{ {
// From: nvttDestroyGPUInputBuffer(NvttGPUInputBuffer*) /// <summary>
/// From: <see cref="Api.nvttDestroyGPUInputBuffer(NvttGPUInputBuffer*)" />
/// </summary>
[System.Runtime.CompilerServices.MethodImpl(System.Runtime.CompilerServices.MethodImplOptions.AggressiveInlining)]
public void Dispose() public void Dispose()
{ {
Api.nvttDestroyGPUInputBuffer((NvttGPUInputBuffer*)System.Runtime.CompilerServices.Unsafe.AsPointer(ref this)); Api.nvttDestroyGPUInputBuffer((NvttGPUInputBuffer*)System.Runtime.CompilerServices.Unsafe.AsPointer(ref this));
} }
// From: nvttGPUInputBufferNumTiles(NvttGPUInputBuffer*) /// <summary>
/// From: <see cref="Api.nvttGPUInputBufferNumTiles(NvttGPUInputBuffer*)" />
/// </summary>
[System.Runtime.CompilerServices.MethodImpl(System.Runtime.CompilerServices.MethodImplOptions.AggressiveInlining)]
public int NumTiles() public int NumTiles()
{ {
return Api.nvttGPUInputBufferNumTiles((NvttGPUInputBuffer*)System.Runtime.CompilerServices.Unsafe.AsPointer(ref this)); return Api.nvttGPUInputBufferNumTiles((NvttGPUInputBuffer*)System.Runtime.CompilerServices.Unsafe.AsPointer(ref this));
} }
// From: nvttGPUInputBufferTileSize(NvttGPUInputBuffer*, int*, int*) /// <summary>
/// From: <see cref="Api.nvttGPUInputBufferTileSize(NvttGPUInputBuffer*, int*, int*)" />
/// </summary>
[System.Runtime.CompilerServices.MethodImpl(System.Runtime.CompilerServices.MethodImplOptions.AggressiveInlining)]
public void TileSize(int* tile_w, int* tile_h) public void TileSize(int* tile_w, int* tile_h)
{ {
Api.nvttGPUInputBufferTileSize( Api.nvttGPUInputBufferTileSize(
@@ -27,13 +36,19 @@ public unsafe partial struct NvttGPUInputBuffer : System.IDisposable
tile_h); tile_h);
} }
// From: nvttGPUInputBufferType(NvttGPUInputBuffer*) /// <summary>
/// From: <see cref="Api.nvttGPUInputBufferType(NvttGPUInputBuffer*)" />
/// </summary>
[System.Runtime.CompilerServices.MethodImpl(System.Runtime.CompilerServices.MethodImplOptions.AggressiveInlining)]
public NvttValueType Type() public NvttValueType Type()
{ {
return Api.nvttGPUInputBufferType((NvttGPUInputBuffer*)System.Runtime.CompilerServices.Unsafe.AsPointer(ref this)); return Api.nvttGPUInputBufferType((NvttGPUInputBuffer*)System.Runtime.CompilerServices.Unsafe.AsPointer(ref this));
} }
// From: nvttEncodeGPU(NvttGPUInputBuffer*, void*, NvttEncodeSettings*) /// <summary>
/// From: <see cref="Api.nvttEncodeGPU(NvttGPUInputBuffer*, void*, NvttEncodeSettings*)" />
/// </summary>
[System.Runtime.CompilerServices.MethodImpl(System.Runtime.CompilerServices.MethodImplOptions.AggressiveInlining)]
public NvttBoolean EncodeGPU(void* output, NvttEncodeSettings* settings) public NvttBoolean EncodeGPU(void* output, NvttEncodeSettings* settings)
{ {
return Api.nvttEncodeGPU( return Api.nvttEncodeGPU(
@@ -42,7 +57,10 @@ public unsafe partial struct NvttGPUInputBuffer : System.IDisposable
settings); settings);
} }
// From: nvttEncodeBC1GPU(NvttGPUInputBuffer*, NvttBoolean, void*, NvttBoolean, NvttTimingContext*) /// <summary>
/// From: <see cref="Api.nvttEncodeBC1GPU(NvttGPUInputBuffer*, NvttBoolean, void*, NvttBoolean, NvttTimingContext*)" />
/// </summary>
[System.Runtime.CompilerServices.MethodImpl(System.Runtime.CompilerServices.MethodImplOptions.AggressiveInlining)]
public void EncodeBC1GPU(NvttBoolean fast_mode, void* output, NvttBoolean to_device_mem, NvttTimingContext* tc) public void EncodeBC1GPU(NvttBoolean fast_mode, void* output, NvttBoolean to_device_mem, NvttTimingContext* tc)
{ {
Api.nvttEncodeBC1GPU( Api.nvttEncodeBC1GPU(
@@ -53,7 +71,10 @@ public unsafe partial struct NvttGPUInputBuffer : System.IDisposable
tc); tc);
} }
// From: nvttEncodeBC1AGPU(NvttGPUInputBuffer*, void*, NvttBoolean, NvttTimingContext*) /// <summary>
/// From: <see cref="Api.nvttEncodeBC1AGPU(NvttGPUInputBuffer*, void*, NvttBoolean, NvttTimingContext*)" />
/// </summary>
[System.Runtime.CompilerServices.MethodImpl(System.Runtime.CompilerServices.MethodImplOptions.AggressiveInlining)]
public void EncodeBC1AGPU(void* output, NvttBoolean to_device_mem, NvttTimingContext* tc) public void EncodeBC1AGPU(void* output, NvttBoolean to_device_mem, NvttTimingContext* tc)
{ {
Api.nvttEncodeBC1AGPU( Api.nvttEncodeBC1AGPU(
@@ -63,7 +84,10 @@ public unsafe partial struct NvttGPUInputBuffer : System.IDisposable
tc); tc);
} }
// From: nvttEncodeBC2GPU(NvttGPUInputBuffer*, void*, NvttBoolean, NvttTimingContext*) /// <summary>
/// From: <see cref="Api.nvttEncodeBC2GPU(NvttGPUInputBuffer*, void*, NvttBoolean, NvttTimingContext*)" />
/// </summary>
[System.Runtime.CompilerServices.MethodImpl(System.Runtime.CompilerServices.MethodImplOptions.AggressiveInlining)]
public void EncodeBC2GPU(void* output, NvttBoolean to_device_mem, NvttTimingContext* tc) public void EncodeBC2GPU(void* output, NvttBoolean to_device_mem, NvttTimingContext* tc)
{ {
Api.nvttEncodeBC2GPU( Api.nvttEncodeBC2GPU(
@@ -73,7 +97,10 @@ public unsafe partial struct NvttGPUInputBuffer : System.IDisposable
tc); tc);
} }
// From: nvttEncodeBC3GPU(NvttGPUInputBuffer*, void*, NvttBoolean, NvttTimingContext*) /// <summary>
/// From: <see cref="Api.nvttEncodeBC3GPU(NvttGPUInputBuffer*, void*, NvttBoolean, NvttTimingContext*)" />
/// </summary>
[System.Runtime.CompilerServices.MethodImpl(System.Runtime.CompilerServices.MethodImplOptions.AggressiveInlining)]
public void EncodeBC3GPU(void* output, NvttBoolean to_device_mem, NvttTimingContext* tc) public void EncodeBC3GPU(void* output, NvttBoolean to_device_mem, NvttTimingContext* tc)
{ {
Api.nvttEncodeBC3GPU( Api.nvttEncodeBC3GPU(
@@ -83,7 +110,10 @@ public unsafe partial struct NvttGPUInputBuffer : System.IDisposable
tc); tc);
} }
// From: nvttEncodeBC4GPU(NvttGPUInputBuffer*, void*, NvttBoolean, NvttTimingContext*) /// <summary>
/// From: <see cref="Api.nvttEncodeBC4GPU(NvttGPUInputBuffer*, void*, NvttBoolean, NvttTimingContext*)" />
/// </summary>
[System.Runtime.CompilerServices.MethodImpl(System.Runtime.CompilerServices.MethodImplOptions.AggressiveInlining)]
public void EncodeBC4GPU(void* output, NvttBoolean to_device_mem, NvttTimingContext* tc) public void EncodeBC4GPU(void* output, NvttBoolean to_device_mem, NvttTimingContext* tc)
{ {
Api.nvttEncodeBC4GPU( Api.nvttEncodeBC4GPU(
@@ -93,7 +123,10 @@ public unsafe partial struct NvttGPUInputBuffer : System.IDisposable
tc); tc);
} }
// From: nvttEncodeBC4SGPU(NvttGPUInputBuffer*, void*, NvttBoolean, NvttTimingContext*) /// <summary>
/// From: <see cref="Api.nvttEncodeBC4SGPU(NvttGPUInputBuffer*, void*, NvttBoolean, NvttTimingContext*)" />
/// </summary>
[System.Runtime.CompilerServices.MethodImpl(System.Runtime.CompilerServices.MethodImplOptions.AggressiveInlining)]
public void EncodeBC4SGPU(void* output, NvttBoolean to_device_mem, NvttTimingContext* tc) public void EncodeBC4SGPU(void* output, NvttBoolean to_device_mem, NvttTimingContext* tc)
{ {
Api.nvttEncodeBC4SGPU( Api.nvttEncodeBC4SGPU(
@@ -103,7 +136,10 @@ public unsafe partial struct NvttGPUInputBuffer : System.IDisposable
tc); tc);
} }
// From: nvttEncodeATI2GPU(NvttGPUInputBuffer*, void*, NvttBoolean, NvttTimingContext*) /// <summary>
/// From: <see cref="Api.nvttEncodeATI2GPU(NvttGPUInputBuffer*, void*, NvttBoolean, NvttTimingContext*)" />
/// </summary>
[System.Runtime.CompilerServices.MethodImpl(System.Runtime.CompilerServices.MethodImplOptions.AggressiveInlining)]
public void EncodeATI2GPU(void* output, NvttBoolean to_device_mem, NvttTimingContext* tc) public void EncodeATI2GPU(void* output, NvttBoolean to_device_mem, NvttTimingContext* tc)
{ {
Api.nvttEncodeATI2GPU( Api.nvttEncodeATI2GPU(
@@ -113,7 +149,10 @@ public unsafe partial struct NvttGPUInputBuffer : System.IDisposable
tc); tc);
} }
// From: nvttEncodeBC5GPU(NvttGPUInputBuffer*, void*, NvttBoolean, NvttTimingContext*) /// <summary>
/// From: <see cref="Api.nvttEncodeBC5GPU(NvttGPUInputBuffer*, void*, NvttBoolean, NvttTimingContext*)" />
/// </summary>
[System.Runtime.CompilerServices.MethodImpl(System.Runtime.CompilerServices.MethodImplOptions.AggressiveInlining)]
public void EncodeBC5GPU(void* output, NvttBoolean to_device_mem, NvttTimingContext* tc) public void EncodeBC5GPU(void* output, NvttBoolean to_device_mem, NvttTimingContext* tc)
{ {
Api.nvttEncodeBC5GPU( Api.nvttEncodeBC5GPU(
@@ -123,7 +162,10 @@ public unsafe partial struct NvttGPUInputBuffer : System.IDisposable
tc); tc);
} }
// From: nvttEncodeBC5SGPU(NvttGPUInputBuffer*, void*, NvttBoolean, NvttTimingContext*) /// <summary>
/// From: <see cref="Api.nvttEncodeBC5SGPU(NvttGPUInputBuffer*, void*, NvttBoolean, NvttTimingContext*)" />
/// </summary>
[System.Runtime.CompilerServices.MethodImpl(System.Runtime.CompilerServices.MethodImplOptions.AggressiveInlining)]
public void EncodeBC5SGPU(void* output, NvttBoolean to_device_mem, NvttTimingContext* tc) public void EncodeBC5SGPU(void* output, NvttBoolean to_device_mem, NvttTimingContext* tc)
{ {
Api.nvttEncodeBC5SGPU( Api.nvttEncodeBC5SGPU(
@@ -133,7 +175,10 @@ public unsafe partial struct NvttGPUInputBuffer : System.IDisposable
tc); tc);
} }
// From: nvttEncodeBC6HGPU(NvttGPUInputBuffer*, NvttBoolean, void*, NvttBoolean, NvttTimingContext*) /// <summary>
/// From: <see cref="Api.nvttEncodeBC6HGPU(NvttGPUInputBuffer*, NvttBoolean, void*, NvttBoolean, NvttTimingContext*)" />
/// </summary>
[System.Runtime.CompilerServices.MethodImpl(System.Runtime.CompilerServices.MethodImplOptions.AggressiveInlining)]
public void EncodeBC6HGPU(NvttBoolean is_signed, void* output, NvttBoolean to_device_mem, NvttTimingContext* tc) public void EncodeBC6HGPU(NvttBoolean is_signed, void* output, NvttBoolean to_device_mem, NvttTimingContext* tc)
{ {
Api.nvttEncodeBC6HGPU( Api.nvttEncodeBC6HGPU(
@@ -144,7 +189,10 @@ public unsafe partial struct NvttGPUInputBuffer : System.IDisposable
tc); tc);
} }
// From: nvttEncodeBC7GPU(NvttGPUInputBuffer*, NvttBoolean, void*, NvttBoolean, NvttTimingContext*) /// <summary>
/// From: <see cref="Api.nvttEncodeBC7GPU(NvttGPUInputBuffer*, NvttBoolean, void*, NvttBoolean, NvttTimingContext*)" />
/// </summary>
[System.Runtime.CompilerServices.MethodImpl(System.Runtime.CompilerServices.MethodImplOptions.AggressiveInlining)]
public void EncodeBC7GPU(NvttBoolean imageHasAlpha, void* output, NvttBoolean to_device_mem, NvttTimingContext* tc) public void EncodeBC7GPU(NvttBoolean imageHasAlpha, void* output, NvttBoolean to_device_mem, NvttTimingContext* tc)
{ {
Api.nvttEncodeBC7GPU( Api.nvttEncodeBC7GPU(
@@ -155,7 +203,10 @@ public unsafe partial struct NvttGPUInputBuffer : System.IDisposable
tc); tc);
} }
// From: nvttEncodeASTCGPU(NvttGPUInputBuffer*, int, NvttBoolean, void*, NvttBoolean, NvttTimingContext*) /// <summary>
/// From: <see cref="Api.nvttEncodeASTCGPU(NvttGPUInputBuffer*, int, NvttBoolean, void*, NvttBoolean, NvttTimingContext*)" />
/// </summary>
[System.Runtime.CompilerServices.MethodImpl(System.Runtime.CompilerServices.MethodImplOptions.AggressiveInlining)]
public void EncodeASTCGPU(int qualityLevel, NvttBoolean imageHasAlpha, void* output, NvttBoolean to_device_mem, NvttTimingContext* tc) public void EncodeASTCGPU(int qualityLevel, NvttBoolean imageHasAlpha, void* output, NvttBoolean to_device_mem, NvttTimingContext* tc)
{ {
Api.nvttEncodeASTCGPU( Api.nvttEncodeASTCGPU(

View File

@@ -6,25 +6,37 @@ namespace Ghost.Nvtt;
public unsafe partial struct NvttOutputOptions : System.IDisposable public unsafe partial struct NvttOutputOptions : System.IDisposable
{ {
// From: nvttCreateOutputOptions() /// <summary>
/// From: <see cref="Api.nvttCreateOutputOptions()" />
/// </summary>
[System.Runtime.CompilerServices.MethodImpl(System.Runtime.CompilerServices.MethodImplOptions.AggressiveInlining)]
public static NvttOutputOptions* Create() public static NvttOutputOptions* Create()
{ {
return Api.nvttCreateOutputOptions(); return Api.nvttCreateOutputOptions();
} }
// From: nvttDestroyOutputOptions(NvttOutputOptions*) /// <summary>
/// From: <see cref="Api.nvttDestroyOutputOptions(NvttOutputOptions*)" />
/// </summary>
[System.Runtime.CompilerServices.MethodImpl(System.Runtime.CompilerServices.MethodImplOptions.AggressiveInlining)]
public void Dispose() public void Dispose()
{ {
Api.nvttDestroyOutputOptions((NvttOutputOptions*)System.Runtime.CompilerServices.Unsafe.AsPointer(ref this)); Api.nvttDestroyOutputOptions((NvttOutputOptions*)System.Runtime.CompilerServices.Unsafe.AsPointer(ref this));
} }
// From: nvttResetOutputOptions(NvttOutputOptions*) /// <summary>
/// From: <see cref="Api.nvttResetOutputOptions(NvttOutputOptions*)" />
/// </summary>
[System.Runtime.CompilerServices.MethodImpl(System.Runtime.CompilerServices.MethodImplOptions.AggressiveInlining)]
public void Reset() public void Reset()
{ {
Api.nvttResetOutputOptions((NvttOutputOptions*)System.Runtime.CompilerServices.Unsafe.AsPointer(ref this)); Api.nvttResetOutputOptions((NvttOutputOptions*)System.Runtime.CompilerServices.Unsafe.AsPointer(ref this));
} }
// From: nvttSetOutputOptionsFileName(NvttOutputOptions*, sbyte*) /// <summary>
/// From: <see cref="Api.nvttSetOutputOptionsFileName(NvttOutputOptions*, sbyte*)" />
/// </summary>
[System.Runtime.CompilerServices.MethodImpl(System.Runtime.CompilerServices.MethodImplOptions.AggressiveInlining)]
public void SetFileName(ReadOnlySpan<byte> fileName) public void SetFileName(ReadOnlySpan<byte> fileName)
{ {
fixed (byte* pfileName = fileName) fixed (byte* pfileName = fileName)
@@ -35,7 +47,10 @@ public unsafe partial struct NvttOutputOptions : System.IDisposable
} }
} }
// From: nvttSetOutputOptionsFileHandle(NvttOutputOptions*, void*) /// <summary>
/// From: <see cref="Api.nvttSetOutputOptionsFileHandle(NvttOutputOptions*, void*)" />
/// </summary>
[System.Runtime.CompilerServices.MethodImpl(System.Runtime.CompilerServices.MethodImplOptions.AggressiveInlining)]
public void SetFileHandle(void* fp) public void SetFileHandle(void* fp)
{ {
Api.nvttSetOutputOptionsFileHandle( Api.nvttSetOutputOptionsFileHandle(
@@ -43,7 +58,10 @@ public unsafe partial struct NvttOutputOptions : System.IDisposable
fp); fp);
} }
// From: nvttSetOutputOptionsOutputHandler(NvttOutputOptions*, delegate* unmanaged[Cdecl]<int, int, int, int, int, int, void>, delegate* unmanaged[Cdecl]<void*, int, NvttBoolean>, IntPtr) /// <summary>
/// From: <see cref="Api.nvttSetOutputOptionsOutputHandler(NvttOutputOptions*, delegate* unmanaged[Cdecl]<int, int, int, int, int, int, void>, delegate* unmanaged[Cdecl]<void*, int, NvttBoolean>, IntPtr)" />
/// </summary>
[System.Runtime.CompilerServices.MethodImpl(System.Runtime.CompilerServices.MethodImplOptions.AggressiveInlining)]
public void SetOutputHandler(delegate* unmanaged[Cdecl]<int, int, int, int, int, int, void> beginImageHandler, delegate* unmanaged[Cdecl]<void*, int, NvttBoolean> outputHandler, IntPtr endImageHandler) public void SetOutputHandler(delegate* unmanaged[Cdecl]<int, int, int, int, int, int, void> beginImageHandler, delegate* unmanaged[Cdecl]<void*, int, NvttBoolean> outputHandler, IntPtr endImageHandler)
{ {
Api.nvttSetOutputOptionsOutputHandler( Api.nvttSetOutputOptionsOutputHandler(
@@ -53,7 +71,10 @@ public unsafe partial struct NvttOutputOptions : System.IDisposable
endImageHandler); endImageHandler);
} }
// From: nvttSetOutputOptionsErrorHandler(NvttOutputOptions*, delegate* unmanaged[Cdecl]<NvttError, void>) /// <summary>
/// From: <see cref="Api.nvttSetOutputOptionsErrorHandler(NvttOutputOptions*, delegate* unmanaged[Cdecl]<NvttError, void>)" />
/// </summary>
[System.Runtime.CompilerServices.MethodImpl(System.Runtime.CompilerServices.MethodImplOptions.AggressiveInlining)]
public void SetErrorHandler(delegate* unmanaged[Cdecl]<NvttError, void> errorHandler) public void SetErrorHandler(delegate* unmanaged[Cdecl]<NvttError, void> errorHandler)
{ {
Api.nvttSetOutputOptionsErrorHandler( Api.nvttSetOutputOptionsErrorHandler(
@@ -61,7 +82,10 @@ public unsafe partial struct NvttOutputOptions : System.IDisposable
errorHandler); errorHandler);
} }
// From: nvttSetOutputOptionsOutputHeader(NvttOutputOptions*, NvttBoolean) /// <summary>
/// From: <see cref="Api.nvttSetOutputOptionsOutputHeader(NvttOutputOptions*, NvttBoolean)" />
/// </summary>
[System.Runtime.CompilerServices.MethodImpl(System.Runtime.CompilerServices.MethodImplOptions.AggressiveInlining)]
public void SetOutputHeader(NvttBoolean b) public void SetOutputHeader(NvttBoolean b)
{ {
Api.nvttSetOutputOptionsOutputHeader( Api.nvttSetOutputOptionsOutputHeader(
@@ -69,7 +93,10 @@ public unsafe partial struct NvttOutputOptions : System.IDisposable
b); b);
} }
// From: nvttSetOutputOptionsContainer(NvttOutputOptions*, NvttContainer) /// <summary>
/// From: <see cref="Api.nvttSetOutputOptionsContainer(NvttOutputOptions*, NvttContainer)" />
/// </summary>
[System.Runtime.CompilerServices.MethodImpl(System.Runtime.CompilerServices.MethodImplOptions.AggressiveInlining)]
public void SetContainer(NvttContainer container) public void SetContainer(NvttContainer container)
{ {
Api.nvttSetOutputOptionsContainer( Api.nvttSetOutputOptionsContainer(
@@ -77,7 +104,10 @@ public unsafe partial struct NvttOutputOptions : System.IDisposable
container); container);
} }
// From: nvttSetOutputOptionsUserVersion(NvttOutputOptions*, int) /// <summary>
/// From: <see cref="Api.nvttSetOutputOptionsUserVersion(NvttOutputOptions*, int)" />
/// </summary>
[System.Runtime.CompilerServices.MethodImpl(System.Runtime.CompilerServices.MethodImplOptions.AggressiveInlining)]
public void SetUserVersion(int version) public void SetUserVersion(int version)
{ {
Api.nvttSetOutputOptionsUserVersion( Api.nvttSetOutputOptionsUserVersion(
@@ -85,7 +115,10 @@ public unsafe partial struct NvttOutputOptions : System.IDisposable
version); version);
} }
// From: nvttSetOutputOptionsSrgbFlag(NvttOutputOptions*, NvttBoolean) /// <summary>
/// From: <see cref="Api.nvttSetOutputOptionsSrgbFlag(NvttOutputOptions*, NvttBoolean)" />
/// </summary>
[System.Runtime.CompilerServices.MethodImpl(System.Runtime.CompilerServices.MethodImplOptions.AggressiveInlining)]
public void SetSrgbFlag(NvttBoolean b) public void SetSrgbFlag(NvttBoolean b)
{ {
Api.nvttSetOutputOptionsSrgbFlag( Api.nvttSetOutputOptionsSrgbFlag(

View File

@@ -6,7 +6,10 @@ namespace Ghost.Nvtt;
public unsafe partial struct NvttRefImage public unsafe partial struct NvttRefImage
{ {
// From: nvttCreateCPUInputBuffer(NvttRefImage*, NvttValueType, int, int, int, float, float, float, float, NvttTimingContext*, uint*) /// <summary>
/// From: <see cref="Api.nvttCreateCPUInputBuffer(NvttRefImage*, NvttValueType, int, int, int, float, float, float, float, NvttTimingContext*, uint*)" />
/// </summary>
[System.Runtime.CompilerServices.MethodImpl(System.Runtime.CompilerServices.MethodImplOptions.AggressiveInlining)]
public NvttCPUInputBuffer* CreateCPUInputBuffer(NvttValueType value_type, int numImages, int tile_w, int tile_h, float WeightR, float WeightG, float WeightB, float WeightA, NvttTimingContext* tc, uint* num_tiles) public NvttCPUInputBuffer* CreateCPUInputBuffer(NvttValueType value_type, int numImages, int tile_w, int tile_h, float WeightR, float WeightG, float WeightB, float WeightA, NvttTimingContext* tc, uint* num_tiles)
{ {
return Api.nvttCreateCPUInputBuffer( return Api.nvttCreateCPUInputBuffer(
@@ -23,7 +26,10 @@ public unsafe partial struct NvttRefImage
num_tiles); num_tiles);
} }
// From: nvttCreateGPUInputBuffer(NvttRefImage*, NvttValueType, int, int, int, float, float, float, float, NvttTimingContext*, uint*) /// <summary>
/// From: <see cref="Api.nvttCreateGPUInputBuffer(NvttRefImage*, NvttValueType, int, int, int, float, float, float, float, NvttTimingContext*, uint*)" />
/// </summary>
[System.Runtime.CompilerServices.MethodImpl(System.Runtime.CompilerServices.MethodImplOptions.AggressiveInlining)]
public NvttGPUInputBuffer* CreateGPUInputBuffer(NvttValueType value_type, int numImages, int tile_w, int tile_h, float WeightR, float WeightG, float WeightB, float WeightA, NvttTimingContext* tc, uint* num_tiles) public NvttGPUInputBuffer* CreateGPUInputBuffer(NvttValueType value_type, int numImages, int tile_w, int tile_h, float WeightR, float WeightG, float WeightB, float WeightA, NvttTimingContext* tc, uint* num_tiles)
{ {
return Api.nvttCreateGPUInputBuffer( return Api.nvttCreateGPUInputBuffer(

File diff suppressed because it is too large Load Diff

View File

@@ -6,61 +6,91 @@ namespace Ghost.Nvtt;
public unsafe partial struct NvttSurfaceSet : System.IDisposable public unsafe partial struct NvttSurfaceSet : System.IDisposable
{ {
// From: nvttCreateSurfaceSet() /// <summary>
/// From: <see cref="Api.nvttCreateSurfaceSet()" />
/// </summary>
[System.Runtime.CompilerServices.MethodImpl(System.Runtime.CompilerServices.MethodImplOptions.AggressiveInlining)]
public static NvttSurfaceSet* Create() public static NvttSurfaceSet* Create()
{ {
return Api.nvttCreateSurfaceSet(); return Api.nvttCreateSurfaceSet();
} }
// From: nvttDestroySurfaceSet(NvttSurfaceSet*) /// <summary>
/// From: <see cref="Api.nvttDestroySurfaceSet(NvttSurfaceSet*)" />
/// </summary>
[System.Runtime.CompilerServices.MethodImpl(System.Runtime.CompilerServices.MethodImplOptions.AggressiveInlining)]
public void Dispose() public void Dispose()
{ {
Api.nvttDestroySurfaceSet((NvttSurfaceSet*)System.Runtime.CompilerServices.Unsafe.AsPointer(ref this)); Api.nvttDestroySurfaceSet((NvttSurfaceSet*)System.Runtime.CompilerServices.Unsafe.AsPointer(ref this));
} }
// From: nvttResetSurfaceSet(NvttSurfaceSet*) /// <summary>
/// From: <see cref="Api.nvttResetSurfaceSet(NvttSurfaceSet*)" />
/// </summary>
[System.Runtime.CompilerServices.MethodImpl(System.Runtime.CompilerServices.MethodImplOptions.AggressiveInlining)]
public void Reset() public void Reset()
{ {
Api.nvttResetSurfaceSet((NvttSurfaceSet*)System.Runtime.CompilerServices.Unsafe.AsPointer(ref this)); Api.nvttResetSurfaceSet((NvttSurfaceSet*)System.Runtime.CompilerServices.Unsafe.AsPointer(ref this));
} }
// From: nvttSurfaceSetGetTextureType(NvttSurfaceSet*) /// <summary>
/// From: <see cref="Api.nvttSurfaceSetGetTextureType(NvttSurfaceSet*)" />
/// </summary>
[System.Runtime.CompilerServices.MethodImpl(System.Runtime.CompilerServices.MethodImplOptions.AggressiveInlining)]
public NvttTextureType GetTextureType() public NvttTextureType GetTextureType()
{ {
return Api.nvttSurfaceSetGetTextureType((NvttSurfaceSet*)System.Runtime.CompilerServices.Unsafe.AsPointer(ref this)); return Api.nvttSurfaceSetGetTextureType((NvttSurfaceSet*)System.Runtime.CompilerServices.Unsafe.AsPointer(ref this));
} }
// From: nvttSurfaceSetGetFaceCount(NvttSurfaceSet*) /// <summary>
/// From: <see cref="Api.nvttSurfaceSetGetFaceCount(NvttSurfaceSet*)" />
/// </summary>
[System.Runtime.CompilerServices.MethodImpl(System.Runtime.CompilerServices.MethodImplOptions.AggressiveInlining)]
public int GetFaceCount() public int GetFaceCount()
{ {
return Api.nvttSurfaceSetGetFaceCount((NvttSurfaceSet*)System.Runtime.CompilerServices.Unsafe.AsPointer(ref this)); return Api.nvttSurfaceSetGetFaceCount((NvttSurfaceSet*)System.Runtime.CompilerServices.Unsafe.AsPointer(ref this));
} }
// From: nvttSurfaceSetGetMipmapCount(NvttSurfaceSet*) /// <summary>
/// From: <see cref="Api.nvttSurfaceSetGetMipmapCount(NvttSurfaceSet*)" />
/// </summary>
[System.Runtime.CompilerServices.MethodImpl(System.Runtime.CompilerServices.MethodImplOptions.AggressiveInlining)]
public int GetMipmapCount() public int GetMipmapCount()
{ {
return Api.nvttSurfaceSetGetMipmapCount((NvttSurfaceSet*)System.Runtime.CompilerServices.Unsafe.AsPointer(ref this)); return Api.nvttSurfaceSetGetMipmapCount((NvttSurfaceSet*)System.Runtime.CompilerServices.Unsafe.AsPointer(ref this));
} }
// From: nvttSurfaceSetGetWidth(NvttSurfaceSet*) /// <summary>
/// From: <see cref="Api.nvttSurfaceSetGetWidth(NvttSurfaceSet*)" />
/// </summary>
[System.Runtime.CompilerServices.MethodImpl(System.Runtime.CompilerServices.MethodImplOptions.AggressiveInlining)]
public int GetWidth() public int GetWidth()
{ {
return Api.nvttSurfaceSetGetWidth((NvttSurfaceSet*)System.Runtime.CompilerServices.Unsafe.AsPointer(ref this)); return Api.nvttSurfaceSetGetWidth((NvttSurfaceSet*)System.Runtime.CompilerServices.Unsafe.AsPointer(ref this));
} }
// From: nvttSurfaceSetGetHeight(NvttSurfaceSet*) /// <summary>
/// From: <see cref="Api.nvttSurfaceSetGetHeight(NvttSurfaceSet*)" />
/// </summary>
[System.Runtime.CompilerServices.MethodImpl(System.Runtime.CompilerServices.MethodImplOptions.AggressiveInlining)]
public int GetHeight() public int GetHeight()
{ {
return Api.nvttSurfaceSetGetHeight((NvttSurfaceSet*)System.Runtime.CompilerServices.Unsafe.AsPointer(ref this)); return Api.nvttSurfaceSetGetHeight((NvttSurfaceSet*)System.Runtime.CompilerServices.Unsafe.AsPointer(ref this));
} }
// From: nvttSurfaceSetGetDepth(NvttSurfaceSet*) /// <summary>
/// From: <see cref="Api.nvttSurfaceSetGetDepth(NvttSurfaceSet*)" />
/// </summary>
[System.Runtime.CompilerServices.MethodImpl(System.Runtime.CompilerServices.MethodImplOptions.AggressiveInlining)]
public int GetDepth() public int GetDepth()
{ {
return Api.nvttSurfaceSetGetDepth((NvttSurfaceSet*)System.Runtime.CompilerServices.Unsafe.AsPointer(ref this)); return Api.nvttSurfaceSetGetDepth((NvttSurfaceSet*)System.Runtime.CompilerServices.Unsafe.AsPointer(ref this));
} }
// From: nvttSurfaceSetGetSurface(NvttSurfaceSet*, int, int, NvttBoolean) /// <summary>
/// From: <see cref="Api.nvttSurfaceSetGetSurface(NvttSurfaceSet*, int, int, NvttBoolean)" />
/// </summary>
[System.Runtime.CompilerServices.MethodImpl(System.Runtime.CompilerServices.MethodImplOptions.AggressiveInlining)]
public NvttSurface* GetSurface(int faceId, int mipId, NvttBoolean expectSigned) public NvttSurface* GetSurface(int faceId, int mipId, NvttBoolean expectSigned)
{ {
return Api.nvttSurfaceSetGetSurface( return Api.nvttSurfaceSetGetSurface(
@@ -70,7 +100,10 @@ public unsafe partial struct NvttSurfaceSet : System.IDisposable
expectSigned); expectSigned);
} }
// From: nvttSurfaceSetLoadDDS(NvttSurfaceSet*, sbyte*, NvttBoolean) /// <summary>
/// From: <see cref="Api.nvttSurfaceSetLoadDDS(NvttSurfaceSet*, sbyte*, NvttBoolean)" />
/// </summary>
[System.Runtime.CompilerServices.MethodImpl(System.Runtime.CompilerServices.MethodImplOptions.AggressiveInlining)]
public NvttBoolean LoadDDS(ReadOnlySpan<byte> fileName, NvttBoolean forcenormal) public NvttBoolean LoadDDS(ReadOnlySpan<byte> fileName, NvttBoolean forcenormal)
{ {
fixed (byte* pfileName = fileName) fixed (byte* pfileName = fileName)
@@ -82,7 +115,10 @@ public unsafe partial struct NvttSurfaceSet : System.IDisposable
} }
} }
// From: nvttSurfaceSetLoadDDSFromMemory(NvttSurfaceSet*, void*, ulong, NvttBoolean) /// <summary>
/// From: <see cref="Api.nvttSurfaceSetLoadDDSFromMemory(NvttSurfaceSet*, void*, ulong, NvttBoolean)" />
/// </summary>
[System.Runtime.CompilerServices.MethodImpl(System.Runtime.CompilerServices.MethodImplOptions.AggressiveInlining)]
public NvttBoolean LoadDDSFromMemory(void* data, ulong sizeInBytes, NvttBoolean forcenormal) public NvttBoolean LoadDDSFromMemory(void* data, ulong sizeInBytes, NvttBoolean forcenormal)
{ {
return Api.nvttSurfaceSetLoadDDSFromMemory( return Api.nvttSurfaceSetLoadDDSFromMemory(
@@ -92,7 +128,10 @@ public unsafe partial struct NvttSurfaceSet : System.IDisposable
forcenormal); forcenormal);
} }
// From: nvttSurfaceSetSaveImage(NvttSurfaceSet*, sbyte*, int, int) /// <summary>
/// From: <see cref="Api.nvttSurfaceSetSaveImage(NvttSurfaceSet*, sbyte*, int, int)" />
/// </summary>
[System.Runtime.CompilerServices.MethodImpl(System.Runtime.CompilerServices.MethodImplOptions.AggressiveInlining)]
public NvttBoolean SaveImage(ReadOnlySpan<byte> fileName, int faceId, int mipId) public NvttBoolean SaveImage(ReadOnlySpan<byte> fileName, int faceId, int mipId)
{ {
fixed (byte* pfileName = fileName) fixed (byte* pfileName = fileName)

View File

@@ -6,19 +6,28 @@ namespace Ghost.Nvtt;
public unsafe partial struct NvttTimingContext : System.IDisposable public unsafe partial struct NvttTimingContext : System.IDisposable
{ {
// From: nvttCreateTimingContext(int) /// <summary>
/// From: <see cref="Api.nvttCreateTimingContext(int)" />
/// </summary>
[System.Runtime.CompilerServices.MethodImpl(System.Runtime.CompilerServices.MethodImplOptions.AggressiveInlining)]
public static NvttTimingContext* Create(int detailLevel) public static NvttTimingContext* Create(int detailLevel)
{ {
return Api.nvttCreateTimingContext(detailLevel); return Api.nvttCreateTimingContext(detailLevel);
} }
// From: nvttDestroyTimingContext(NvttTimingContext*) /// <summary>
/// From: <see cref="Api.nvttDestroyTimingContext(NvttTimingContext*)" />
/// </summary>
[System.Runtime.CompilerServices.MethodImpl(System.Runtime.CompilerServices.MethodImplOptions.AggressiveInlining)]
public void Dispose() public void Dispose()
{ {
Api.nvttDestroyTimingContext((NvttTimingContext*)System.Runtime.CompilerServices.Unsafe.AsPointer(ref this)); Api.nvttDestroyTimingContext((NvttTimingContext*)System.Runtime.CompilerServices.Unsafe.AsPointer(ref this));
} }
// From: nvttTimingContextSetDetailLevel(NvttTimingContext*, int) /// <summary>
/// From: <see cref="Api.nvttTimingContextSetDetailLevel(NvttTimingContext*, int)" />
/// </summary>
[System.Runtime.CompilerServices.MethodImpl(System.Runtime.CompilerServices.MethodImplOptions.AggressiveInlining)]
public void SetDetailLevel(int detailLevel) public void SetDetailLevel(int detailLevel)
{ {
Api.nvttTimingContextSetDetailLevel( Api.nvttTimingContextSetDetailLevel(
@@ -26,13 +35,19 @@ public unsafe partial struct NvttTimingContext : System.IDisposable
detailLevel); detailLevel);
} }
// From: nvttTimingContextGetRecordCount(NvttTimingContext*) /// <summary>
/// From: <see cref="Api.nvttTimingContextGetRecordCount(NvttTimingContext*)" />
/// </summary>
[System.Runtime.CompilerServices.MethodImpl(System.Runtime.CompilerServices.MethodImplOptions.AggressiveInlining)]
public int GetRecordCount() public int GetRecordCount()
{ {
return Api.nvttTimingContextGetRecordCount((NvttTimingContext*)System.Runtime.CompilerServices.Unsafe.AsPointer(ref this)); return Api.nvttTimingContextGetRecordCount((NvttTimingContext*)System.Runtime.CompilerServices.Unsafe.AsPointer(ref this));
} }
// From: nvttTimingContextGetRecord(NvttTimingContext*, int, sbyte*, double*) /// <summary>
/// From: <see cref="Api.nvttTimingContextGetRecord(NvttTimingContext*, int, sbyte*, double*)" />
/// </summary>
[System.Runtime.CompilerServices.MethodImpl(System.Runtime.CompilerServices.MethodImplOptions.AggressiveInlining)]
public void GetRecord(int i, sbyte* description, double* seconds) public void GetRecord(int i, sbyte* description, double* seconds)
{ {
Api.nvttTimingContextGetRecord( Api.nvttTimingContextGetRecord(
@@ -42,7 +57,10 @@ public unsafe partial struct NvttTimingContext : System.IDisposable
seconds); seconds);
} }
// From: nvttTimingContextGetRecordSafe(NvttTimingContext*, int, sbyte*, nuint, double*) /// <summary>
/// From: <see cref="Api.nvttTimingContextGetRecordSafe(NvttTimingContext*, int, sbyte*, nuint, double*)" />
/// </summary>
[System.Runtime.CompilerServices.MethodImpl(System.Runtime.CompilerServices.MethodImplOptions.AggressiveInlining)]
public nuint GetRecordSafe(int i, sbyte* outDescription, nuint outDescriptionSize, double* seconds) public nuint GetRecordSafe(int i, sbyte* outDescription, nuint outDescriptionSize, double* seconds)
{ {
return Api.nvttTimingContextGetRecordSafe( return Api.nvttTimingContextGetRecordSafe(
@@ -53,7 +71,10 @@ public unsafe partial struct NvttTimingContext : System.IDisposable
seconds); seconds);
} }
// From: nvttTimingContextPrintRecords(NvttTimingContext*) /// <summary>
/// From: <see cref="Api.nvttTimingContextPrintRecords(NvttTimingContext*)" />
/// </summary>
[System.Runtime.CompilerServices.MethodImpl(System.Runtime.CompilerServices.MethodImplOptions.AggressiveInlining)]
public void PrintRecords() public void PrintRecords()
{ {
Api.nvttTimingContextPrintRecords((NvttTimingContext*)System.Runtime.CompilerServices.Unsafe.AsPointer(ref this)); Api.nvttTimingContextPrintRecords((NvttTimingContext*)System.Runtime.CompilerServices.Unsafe.AsPointer(ref this));

View File

@@ -0,0 +1,299 @@
// <auto-generated>
// This file is generated by Ghost.NativeWrapperGen. Do not edit manually.
// </auto-generated>
namespace Ghost.Ufbx;
public unsafe partial struct UfbxApi
{
/// <summary>
/// From: <see cref="Api.ufbx_is_thread_safe()" />
/// </summary>
[System.Runtime.CompilerServices.MethodImpl(System.Runtime.CompilerServices.MethodImplOptions.AggressiveInlining)]
public static bool IsThreadSafe()
{
return Api.ufbx_is_thread_safe();
}
/// <summary>
/// From: <see cref="Api.ufbx_format_error(sbyte*, nuint, ufbx_error*)" />
/// </summary>
[System.Runtime.CompilerServices.MethodImpl(System.Runtime.CompilerServices.MethodImplOptions.AggressiveInlining)]
public static nuint FormatError(sbyte* dst, nuint dst_size, ufbx_error* error)
{
return Api.ufbx_format_error(
dst,
dst_size,
error);
}
/// <summary>
/// From: <see cref="Api.ufbx_inflate(void*, nuint, ufbx_inflate_input*, ufbx_inflate_retain*)" />
/// </summary>
[System.Runtime.CompilerServices.MethodImpl(System.Runtime.CompilerServices.MethodImplOptions.AggressiveInlining)]
public static nint Inflate(void* dst, nuint dst_size, ufbx_inflate_input* input, ufbx_inflate_retain* retain)
{
return Api.ufbx_inflate(
dst,
dst_size,
input,
retain);
}
/// <summary>
/// From: <see cref="Api.ufbx_default_open_file(void*, ufbx_stream*, sbyte*, nuint, ufbx_open_file_info*)" />
/// </summary>
[System.Runtime.CompilerServices.MethodImpl(System.Runtime.CompilerServices.MethodImplOptions.AggressiveInlining)]
public static bool DefaultOpenFile(void* user, ufbx_stream* stream, ReadOnlySpan<byte> path, ufbx_open_file_info* info)
{
fixed (byte* ppath = path)
{
return Api.ufbx_default_open_file(
user,
stream,
(sbyte*)ppath,
(nuint)path.Length,
info);
}
}
/// <summary>
/// From: <see cref="Api.ufbx_evaluate_baked_vec3(ufbx_baked_vec3_list, double)" />
/// </summary>
[System.Runtime.CompilerServices.MethodImpl(System.Runtime.CompilerServices.MethodImplOptions.AggressiveInlining)]
public static Misaki.HighPerformance.Mathematics.float3 EvaluateBakedVec3(ufbx_baked_vec3_list keyframes, double time)
{
return Api.ufbx_evaluate_baked_vec3(
keyframes,
time);
}
/// <summary>
/// From: <see cref="Api.ufbx_evaluate_baked_quat(ufbx_baked_quat_list, double)" />
/// </summary>
[System.Runtime.CompilerServices.MethodImpl(System.Runtime.CompilerServices.MethodImplOptions.AggressiveInlining)]
public static Misaki.HighPerformance.Mathematics.quaternion EvaluateBakedQuat(ufbx_baked_quat_list keyframes, double time)
{
return Api.ufbx_evaluate_baked_quat(
keyframes,
time);
}
/// <summary>
/// From: <see cref="Api.ufbx_coordinate_axes_valid(ufbx_coordinate_axes)" />
/// </summary>
[System.Runtime.CompilerServices.MethodImpl(System.Runtime.CompilerServices.MethodImplOptions.AggressiveInlining)]
public static bool CoordinateAxesValid(ufbx_coordinate_axes axes)
{
return Api.ufbx_coordinate_axes_valid(axes);
}
/// <summary>
/// From: <see cref="Api.ufbx_vec3_normalize(Misaki.HighPerformance.Mathematics.float3)" />
/// </summary>
[System.Runtime.CompilerServices.MethodImpl(System.Runtime.CompilerServices.MethodImplOptions.AggressiveInlining)]
public static Misaki.HighPerformance.Mathematics.float3 Vec3Normalize(Misaki.HighPerformance.Mathematics.float3 v)
{
return Api.ufbx_vec3_normalize(v);
}
/// <summary>
/// From: <see cref="Api.ufbx_quat_dot(Misaki.HighPerformance.Mathematics.quaternion, Misaki.HighPerformance.Mathematics.quaternion)" />
/// </summary>
[System.Runtime.CompilerServices.MethodImpl(System.Runtime.CompilerServices.MethodImplOptions.AggressiveInlining)]
public static float QuatDot(Misaki.HighPerformance.Mathematics.quaternion a, Misaki.HighPerformance.Mathematics.quaternion b)
{
return Api.ufbx_quat_dot(
a,
b);
}
/// <summary>
/// From: <see cref="Api.ufbx_quat_mul(Misaki.HighPerformance.Mathematics.quaternion, Misaki.HighPerformance.Mathematics.quaternion)" />
/// </summary>
[System.Runtime.CompilerServices.MethodImpl(System.Runtime.CompilerServices.MethodImplOptions.AggressiveInlining)]
public static Misaki.HighPerformance.Mathematics.quaternion QuatMul(Misaki.HighPerformance.Mathematics.quaternion a, Misaki.HighPerformance.Mathematics.quaternion b)
{
return Api.ufbx_quat_mul(
a,
b);
}
/// <summary>
/// From: <see cref="Api.ufbx_quat_normalize(Misaki.HighPerformance.Mathematics.quaternion)" />
/// </summary>
[System.Runtime.CompilerServices.MethodImpl(System.Runtime.CompilerServices.MethodImplOptions.AggressiveInlining)]
public static Misaki.HighPerformance.Mathematics.quaternion QuatNormalize(Misaki.HighPerformance.Mathematics.quaternion q)
{
return Api.ufbx_quat_normalize(q);
}
/// <summary>
/// From: <see cref="Api.ufbx_quat_fix_antipodal(Misaki.HighPerformance.Mathematics.quaternion, Misaki.HighPerformance.Mathematics.quaternion)" />
/// </summary>
[System.Runtime.CompilerServices.MethodImpl(System.Runtime.CompilerServices.MethodImplOptions.AggressiveInlining)]
public static Misaki.HighPerformance.Mathematics.quaternion QuatFixAntipodal(Misaki.HighPerformance.Mathematics.quaternion q, Misaki.HighPerformance.Mathematics.quaternion reference)
{
return Api.ufbx_quat_fix_antipodal(
q,
reference);
}
/// <summary>
/// From: <see cref="Api.ufbx_quat_slerp(Misaki.HighPerformance.Mathematics.quaternion, Misaki.HighPerformance.Mathematics.quaternion, float)" />
/// </summary>
[System.Runtime.CompilerServices.MethodImpl(System.Runtime.CompilerServices.MethodImplOptions.AggressiveInlining)]
public static Misaki.HighPerformance.Mathematics.quaternion QuatSlerp(Misaki.HighPerformance.Mathematics.quaternion a, Misaki.HighPerformance.Mathematics.quaternion b, float t)
{
return Api.ufbx_quat_slerp(
a,
b,
t);
}
/// <summary>
/// From: <see cref="Api.ufbx_quat_rotate_vec3(Misaki.HighPerformance.Mathematics.quaternion, Misaki.HighPerformance.Mathematics.float3)" />
/// </summary>
[System.Runtime.CompilerServices.MethodImpl(System.Runtime.CompilerServices.MethodImplOptions.AggressiveInlining)]
public static Misaki.HighPerformance.Mathematics.float3 QuatRotateVec3(Misaki.HighPerformance.Mathematics.quaternion q, Misaki.HighPerformance.Mathematics.float3 v)
{
return Api.ufbx_quat_rotate_vec3(
q,
v);
}
/// <summary>
/// From: <see cref="Api.ufbx_quat_to_euler(Misaki.HighPerformance.Mathematics.quaternion, ufbx_rotation_order)" />
/// </summary>
[System.Runtime.CompilerServices.MethodImpl(System.Runtime.CompilerServices.MethodImplOptions.AggressiveInlining)]
public static Misaki.HighPerformance.Mathematics.float3 QuatToEuler(Misaki.HighPerformance.Mathematics.quaternion q, ufbx_rotation_order order)
{
return Api.ufbx_quat_to_euler(
q,
order);
}
/// <summary>
/// From: <see cref="Api.ufbx_euler_to_quat(Misaki.HighPerformance.Mathematics.float3, ufbx_rotation_order)" />
/// </summary>
[System.Runtime.CompilerServices.MethodImpl(System.Runtime.CompilerServices.MethodImplOptions.AggressiveInlining)]
public static Misaki.HighPerformance.Mathematics.quaternion EulerToQuat(Misaki.HighPerformance.Mathematics.float3 v, ufbx_rotation_order order)
{
return Api.ufbx_euler_to_quat(
v,
order);
}
/// <summary>
/// From: <see cref="Api.ufbx_matrix_mul(Misaki.HighPerformance.Mathematics.float3x4*, Misaki.HighPerformance.Mathematics.float3x4*)" />
/// </summary>
[System.Runtime.CompilerServices.MethodImpl(System.Runtime.CompilerServices.MethodImplOptions.AggressiveInlining)]
public static Misaki.HighPerformance.Mathematics.float3x4 MatrixMul(Misaki.HighPerformance.Mathematics.float3x4* a, Misaki.HighPerformance.Mathematics.float3x4* b)
{
return Api.ufbx_matrix_mul(
a,
b);
}
/// <summary>
/// From: <see cref="Api.ufbx_matrix_determinant(Misaki.HighPerformance.Mathematics.float3x4*)" />
/// </summary>
[System.Runtime.CompilerServices.MethodImpl(System.Runtime.CompilerServices.MethodImplOptions.AggressiveInlining)]
public static float MatrixDeterminant(Misaki.HighPerformance.Mathematics.float3x4* m)
{
return Api.ufbx_matrix_determinant(m);
}
/// <summary>
/// From: <see cref="Api.ufbx_matrix_invert(Misaki.HighPerformance.Mathematics.float3x4*)" />
/// </summary>
[System.Runtime.CompilerServices.MethodImpl(System.Runtime.CompilerServices.MethodImplOptions.AggressiveInlining)]
public static Misaki.HighPerformance.Mathematics.float3x4 MatrixInvert(Misaki.HighPerformance.Mathematics.float3x4* m)
{
return Api.ufbx_matrix_invert(m);
}
/// <summary>
/// From: <see cref="Api.ufbx_matrix_for_normals(Misaki.HighPerformance.Mathematics.float3x4*)" />
/// </summary>
[System.Runtime.CompilerServices.MethodImpl(System.Runtime.CompilerServices.MethodImplOptions.AggressiveInlining)]
public static Misaki.HighPerformance.Mathematics.float3x4 MatrixForNormals(Misaki.HighPerformance.Mathematics.float3x4* m)
{
return Api.ufbx_matrix_for_normals(m);
}
/// <summary>
/// From: <see cref="Api.ufbx_transform_position(Misaki.HighPerformance.Mathematics.float3x4*, Misaki.HighPerformance.Mathematics.float3)" />
/// </summary>
[System.Runtime.CompilerServices.MethodImpl(System.Runtime.CompilerServices.MethodImplOptions.AggressiveInlining)]
public static Misaki.HighPerformance.Mathematics.float3 TransformPosition(Misaki.HighPerformance.Mathematics.float3x4* m, Misaki.HighPerformance.Mathematics.float3 v)
{
return Api.ufbx_transform_position(
m,
v);
}
/// <summary>
/// From: <see cref="Api.ufbx_transform_direction(Misaki.HighPerformance.Mathematics.float3x4*, Misaki.HighPerformance.Mathematics.float3)" />
/// </summary>
[System.Runtime.CompilerServices.MethodImpl(System.Runtime.CompilerServices.MethodImplOptions.AggressiveInlining)]
public static Misaki.HighPerformance.Mathematics.float3 TransformDirection(Misaki.HighPerformance.Mathematics.float3x4* m, Misaki.HighPerformance.Mathematics.float3 v)
{
return Api.ufbx_transform_direction(
m,
v);
}
/// <summary>
/// From: <see cref="Api.ufbx_matrix_to_transform(Misaki.HighPerformance.Mathematics.float3x4*)" />
/// </summary>
[System.Runtime.CompilerServices.MethodImpl(System.Runtime.CompilerServices.MethodImplOptions.AggressiveInlining)]
public static ufbx_transform MatrixToTransform(Misaki.HighPerformance.Mathematics.float3x4* m)
{
return Api.ufbx_matrix_to_transform(m);
}
/// <summary>
/// From: <see cref="Api.ufbx_triangulate_face(uint*, nuint, ufbx_mesh*, ufbx_face)" />
/// </summary>
[System.Runtime.CompilerServices.MethodImpl(System.Runtime.CompilerServices.MethodImplOptions.AggressiveInlining)]
public static uint TriangulateFace(uint* indices, nuint num_indices, ufbx_mesh* mesh, ufbx_face face)
{
return Api.ufbx_triangulate_face(
indices,
num_indices,
mesh,
face);
}
/// <summary>
/// From: <see cref="Api.ufbx_thread_pool_run_task(nuint, uint)" />
/// </summary>
[System.Runtime.CompilerServices.MethodImpl(System.Runtime.CompilerServices.MethodImplOptions.AggressiveInlining)]
public static void ThreadPoolRunTask(nuint ctx, uint index)
{
Api.ufbx_thread_pool_run_task(
ctx,
index);
}
/// <summary>
/// From: <see cref="Api.ufbx_thread_pool_set_user_ptr(nuint, void*)" />
/// </summary>
[System.Runtime.CompilerServices.MethodImpl(System.Runtime.CompilerServices.MethodImplOptions.AggressiveInlining)]
public static void ThreadPoolSetUserPtr(nuint ctx, void* user_ptr)
{
Api.ufbx_thread_pool_set_user_ptr(
ctx,
user_ptr);
}
/// <summary>
/// From: <see cref="Api.ufbx_thread_pool_get_user_ptr(nuint)" />
/// </summary>
[System.Runtime.CompilerServices.MethodImpl(System.Runtime.CompilerServices.MethodImplOptions.AggressiveInlining)]
public static void* ThreadPoolGetUserPtr(nuint ctx)
{
return Api.ufbx_thread_pool_get_user_ptr(ctx);
}
}

View File

@@ -2,14 +2,15 @@
// This file is generated by Ghost.NativeWrapperGen. Do not edit manually. // This file is generated by Ghost.NativeWrapperGen. Do not edit manually.
// </auto-generated> // </auto-generated>
using System.Runtime.CompilerServices;
namespace Ghost.Ufbx; namespace Ghost.Ufbx;
public unsafe partial struct ufbx_anim public unsafe partial struct ufbx_anim : System.IDisposable
{ {
// From: ufbx_evaluate_prop_len(ufbx_anim*, ufbx_element*, sbyte*, nuint, double) /// <summary>
public ufbx_prop evaluate_prop_len(ufbx_element* element, ReadOnlySpan<byte> name, double time) /// From: <see cref="Api.ufbx_evaluate_prop_len(ufbx_anim*, ufbx_element*, sbyte*, nuint, double)" />
/// </summary>
[System.Runtime.CompilerServices.MethodImpl(System.Runtime.CompilerServices.MethodImplOptions.AggressiveInlining)]
public ufbx_prop EvaluatePropLen(ufbx_element* element, ReadOnlySpan<byte> name, double time)
{ {
fixed (byte* pname = name) fixed (byte* pname = name)
{ {
@@ -22,8 +23,11 @@ public unsafe partial struct ufbx_anim
} }
} }
// From: ufbx_evaluate_prop(ufbx_anim*, ufbx_element*, sbyte*, double) /// <summary>
public ufbx_prop evaluate_prop(ufbx_element* element, sbyte* name, double time) /// From: <see cref="Api.ufbx_evaluate_prop(ufbx_anim*, ufbx_element*, sbyte*, double)" />
/// </summary>
[System.Runtime.CompilerServices.MethodImpl(System.Runtime.CompilerServices.MethodImplOptions.AggressiveInlining)]
public ufbx_prop EvaluateProp(ufbx_element* element, sbyte* name, double time)
{ {
return Api.ufbx_evaluate_prop( return Api.ufbx_evaluate_prop(
(ufbx_anim*)System.Runtime.CompilerServices.Unsafe.AsPointer(ref this), (ufbx_anim*)System.Runtime.CompilerServices.Unsafe.AsPointer(ref this),
@@ -32,8 +36,11 @@ public unsafe partial struct ufbx_anim
time); time);
} }
// From: ufbx_evaluate_prop_flags_len(ufbx_anim*, ufbx_element*, sbyte*, nuint, double, uint) /// <summary>
public ufbx_prop evaluate_prop_flags_len(ufbx_element* element, ReadOnlySpan<byte> name, double time, uint flags) /// From: <see cref="Api.ufbx_evaluate_prop_flags_len(ufbx_anim*, ufbx_element*, sbyte*, nuint, double, uint)" />
/// </summary>
[System.Runtime.CompilerServices.MethodImpl(System.Runtime.CompilerServices.MethodImplOptions.AggressiveInlining)]
public ufbx_prop EvaluatePropFlagsLen(ufbx_element* element, ReadOnlySpan<byte> name, double time, uint flags)
{ {
fixed (byte* pname = name) fixed (byte* pname = name)
{ {
@@ -47,8 +54,11 @@ public unsafe partial struct ufbx_anim
} }
} }
// From: ufbx_evaluate_prop_flags(ufbx_anim*, ufbx_element*, sbyte*, double, uint) /// <summary>
public ufbx_prop evaluate_prop_flags(ufbx_element* element, sbyte* name, double time, uint flags) /// From: <see cref="Api.ufbx_evaluate_prop_flags(ufbx_anim*, ufbx_element*, sbyte*, double, uint)" />
/// </summary>
[System.Runtime.CompilerServices.MethodImpl(System.Runtime.CompilerServices.MethodImplOptions.AggressiveInlining)]
public ufbx_prop EvaluatePropFlags(ufbx_element* element, sbyte* name, double time, uint flags)
{ {
return Api.ufbx_evaluate_prop_flags( return Api.ufbx_evaluate_prop_flags(
(ufbx_anim*)System.Runtime.CompilerServices.Unsafe.AsPointer(ref this), (ufbx_anim*)System.Runtime.CompilerServices.Unsafe.AsPointer(ref this),
@@ -58,8 +68,11 @@ public unsafe partial struct ufbx_anim
flags); flags);
} }
// From: ufbx_evaluate_props(ufbx_anim*, ufbx_element*, double, ufbx_prop*, nuint) /// <summary>
public ufbx_props evaluate_props(ufbx_element* element, double time, ufbx_prop* buffer, nuint buffer_size) /// From: <see cref="Api.ufbx_evaluate_props(ufbx_anim*, ufbx_element*, double, ufbx_prop*, nuint)" />
/// </summary>
[System.Runtime.CompilerServices.MethodImpl(System.Runtime.CompilerServices.MethodImplOptions.AggressiveInlining)]
public ufbx_props EvaluateProps(ufbx_element* element, double time, ufbx_prop* buffer, nuint buffer_size)
{ {
return Api.ufbx_evaluate_props( return Api.ufbx_evaluate_props(
(ufbx_anim*)System.Runtime.CompilerServices.Unsafe.AsPointer(ref this), (ufbx_anim*)System.Runtime.CompilerServices.Unsafe.AsPointer(ref this),
@@ -69,8 +82,11 @@ public unsafe partial struct ufbx_anim
buffer_size); buffer_size);
} }
// From: ufbx_evaluate_props_flags(ufbx_anim*, ufbx_element*, double, ufbx_prop*, nuint, uint) /// <summary>
public ufbx_props evaluate_props_flags(ufbx_element* element, double time, ufbx_prop* buffer, nuint buffer_size, uint flags) /// From: <see cref="Api.ufbx_evaluate_props_flags(ufbx_anim*, ufbx_element*, double, ufbx_prop*, nuint, uint)" />
/// </summary>
[System.Runtime.CompilerServices.MethodImpl(System.Runtime.CompilerServices.MethodImplOptions.AggressiveInlining)]
public ufbx_props EvaluatePropsFlags(ufbx_element* element, double time, ufbx_prop* buffer, nuint buffer_size, uint flags)
{ {
return Api.ufbx_evaluate_props_flags( return Api.ufbx_evaluate_props_flags(
(ufbx_anim*)System.Runtime.CompilerServices.Unsafe.AsPointer(ref this), (ufbx_anim*)System.Runtime.CompilerServices.Unsafe.AsPointer(ref this),
@@ -81,8 +97,11 @@ public unsafe partial struct ufbx_anim
flags); flags);
} }
// From: ufbx_evaluate_transform(ufbx_anim*, ufbx_node*, double) /// <summary>
public ufbx_transform evaluate_transform(ufbx_node* node, double time) /// From: <see cref="Api.ufbx_evaluate_transform(ufbx_anim*, ufbx_node*, double)" />
/// </summary>
[System.Runtime.CompilerServices.MethodImpl(System.Runtime.CompilerServices.MethodImplOptions.AggressiveInlining)]
public ufbx_transform EvaluateTransform(ufbx_node* node, double time)
{ {
return Api.ufbx_evaluate_transform( return Api.ufbx_evaluate_transform(
(ufbx_anim*)System.Runtime.CompilerServices.Unsafe.AsPointer(ref this), (ufbx_anim*)System.Runtime.CompilerServices.Unsafe.AsPointer(ref this),
@@ -90,8 +109,11 @@ public unsafe partial struct ufbx_anim
time); time);
} }
// From: ufbx_evaluate_transform_flags(ufbx_anim*, ufbx_node*, double, uint) /// <summary>
public ufbx_transform evaluate_transform_flags(ufbx_node* node, double time, uint flags) /// From: <see cref="Api.ufbx_evaluate_transform_flags(ufbx_anim*, ufbx_node*, double, uint)" />
/// </summary>
[System.Runtime.CompilerServices.MethodImpl(System.Runtime.CompilerServices.MethodImplOptions.AggressiveInlining)]
public ufbx_transform EvaluateTransformFlags(ufbx_node* node, double time, uint flags)
{ {
return Api.ufbx_evaluate_transform_flags( return Api.ufbx_evaluate_transform_flags(
(ufbx_anim*)System.Runtime.CompilerServices.Unsafe.AsPointer(ref this), (ufbx_anim*)System.Runtime.CompilerServices.Unsafe.AsPointer(ref this),
@@ -100,8 +122,11 @@ public unsafe partial struct ufbx_anim
flags); flags);
} }
// From: ufbx_evaluate_blend_weight(ufbx_anim*, ufbx_blend_channel*, double) /// <summary>
public float evaluate_blend_weight(ufbx_blend_channel* channel, double time) /// From: <see cref="Api.ufbx_evaluate_blend_weight(ufbx_anim*, ufbx_blend_channel*, double)" />
/// </summary>
[System.Runtime.CompilerServices.MethodImpl(System.Runtime.CompilerServices.MethodImplOptions.AggressiveInlining)]
public float EvaluateBlendWeight(ufbx_blend_channel* channel, double time)
{ {
return Api.ufbx_evaluate_blend_weight( return Api.ufbx_evaluate_blend_weight(
(ufbx_anim*)System.Runtime.CompilerServices.Unsafe.AsPointer(ref this), (ufbx_anim*)System.Runtime.CompilerServices.Unsafe.AsPointer(ref this),
@@ -109,8 +134,11 @@ public unsafe partial struct ufbx_anim
time); time);
} }
// From: ufbx_evaluate_blend_weight_flags(ufbx_anim*, ufbx_blend_channel*, double, uint) /// <summary>
public float evaluate_blend_weight_flags(ufbx_blend_channel* channel, double time, uint flags) /// From: <see cref="Api.ufbx_evaluate_blend_weight_flags(ufbx_anim*, ufbx_blend_channel*, double, uint)" />
/// </summary>
[System.Runtime.CompilerServices.MethodImpl(System.Runtime.CompilerServices.MethodImplOptions.AggressiveInlining)]
public float EvaluateBlendWeightFlags(ufbx_blend_channel* channel, double time, uint flags)
{ {
return Api.ufbx_evaluate_blend_weight_flags( return Api.ufbx_evaluate_blend_weight_flags(
(ufbx_anim*)System.Runtime.CompilerServices.Unsafe.AsPointer(ref this), (ufbx_anim*)System.Runtime.CompilerServices.Unsafe.AsPointer(ref this),
@@ -119,14 +147,20 @@ public unsafe partial struct ufbx_anim
flags); flags);
} }
// From: ufbx_free_anim(ufbx_anim*) /// <summary>
public void free() /// From: <see cref="Api.ufbx_free_anim(ufbx_anim*)" />
/// </summary>
[System.Runtime.CompilerServices.MethodImpl(System.Runtime.CompilerServices.MethodImplOptions.AggressiveInlining)]
public void Dispose()
{ {
Api.ufbx_free_anim((ufbx_anim*)System.Runtime.CompilerServices.Unsafe.AsPointer(ref this)); Api.ufbx_free_anim((ufbx_anim*)System.Runtime.CompilerServices.Unsafe.AsPointer(ref this));
} }
// From: ufbx_retain_anim(ufbx_anim*) /// <summary>
public void retain() /// From: <see cref="Api.ufbx_retain_anim(ufbx_anim*)" />
/// </summary>
[System.Runtime.CompilerServices.MethodImpl(System.Runtime.CompilerServices.MethodImplOptions.AggressiveInlining)]
public void Retain()
{ {
Api.ufbx_retain_anim((ufbx_anim*)System.Runtime.CompilerServices.Unsafe.AsPointer(ref this)); Api.ufbx_retain_anim((ufbx_anim*)System.Runtime.CompilerServices.Unsafe.AsPointer(ref this));
} }

View File

@@ -2,14 +2,15 @@
// This file is generated by Ghost.NativeWrapperGen. Do not edit manually. // This file is generated by Ghost.NativeWrapperGen. Do not edit manually.
// </auto-generated> // </auto-generated>
using System.Runtime.CompilerServices;
namespace Ghost.Ufbx; namespace Ghost.Ufbx;
public unsafe partial struct ufbx_anim_curve public unsafe partial struct ufbx_anim_curve
{ {
// From: ufbx_evaluate_curve(ufbx_anim_curve*, double, float) /// <summary>
public float evaluate_curve(double time, float default_value) /// From: <see cref="Api.ufbx_evaluate_curve(ufbx_anim_curve*, double, float)" />
/// </summary>
[System.Runtime.CompilerServices.MethodImpl(System.Runtime.CompilerServices.MethodImplOptions.AggressiveInlining)]
public float EvaluateCurve(double time, float default_value)
{ {
return Api.ufbx_evaluate_curve( return Api.ufbx_evaluate_curve(
(ufbx_anim_curve*)System.Runtime.CompilerServices.Unsafe.AsPointer(ref this), (ufbx_anim_curve*)System.Runtime.CompilerServices.Unsafe.AsPointer(ref this),
@@ -17,8 +18,11 @@ public unsafe partial struct ufbx_anim_curve
default_value); default_value);
} }
// From: ufbx_evaluate_curve_flags(ufbx_anim_curve*, double, float, uint) /// <summary>
public float evaluate_curve_flags(double time, float default_value, uint flags) /// From: <see cref="Api.ufbx_evaluate_curve_flags(ufbx_anim_curve*, double, float, uint)" />
/// </summary>
[System.Runtime.CompilerServices.MethodImpl(System.Runtime.CompilerServices.MethodImplOptions.AggressiveInlining)]
public float EvaluateCurveFlags(double time, float default_value, uint flags)
{ {
return Api.ufbx_evaluate_curve_flags( return Api.ufbx_evaluate_curve_flags(
(ufbx_anim_curve*)System.Runtime.CompilerServices.Unsafe.AsPointer(ref this), (ufbx_anim_curve*)System.Runtime.CompilerServices.Unsafe.AsPointer(ref this),

View File

@@ -2,14 +2,15 @@
// This file is generated by Ghost.NativeWrapperGen. Do not edit manually. // This file is generated by Ghost.NativeWrapperGen. Do not edit manually.
// </auto-generated> // </auto-generated>
using System.Runtime.CompilerServices;
namespace Ghost.Ufbx; namespace Ghost.Ufbx;
public unsafe partial struct ufbx_anim_layer public unsafe partial struct ufbx_anim_layer
{ {
// From: ufbx_find_anim_prop_len(ufbx_anim_layer*, ufbx_element*, sbyte*, nuint) /// <summary>
public ufbx_anim_prop* find_anim_prop_len(ufbx_element* element, ReadOnlySpan<byte> prop) /// From: <see cref="Api.ufbx_find_anim_prop_len(ufbx_anim_layer*, ufbx_element*, sbyte*, nuint)" />
/// </summary>
[System.Runtime.CompilerServices.MethodImpl(System.Runtime.CompilerServices.MethodImplOptions.AggressiveInlining)]
public ufbx_anim_prop* FindAnimPropLen(ufbx_element* element, ReadOnlySpan<byte> prop)
{ {
fixed (byte* pprop = prop) fixed (byte* pprop = prop)
{ {
@@ -21,8 +22,11 @@ public unsafe partial struct ufbx_anim_layer
} }
} }
// From: ufbx_find_anim_prop(ufbx_anim_layer*, ufbx_element*, sbyte*) /// <summary>
public ufbx_anim_prop* find_anim_prop(ufbx_element* element, sbyte* prop) /// From: <see cref="Api.ufbx_find_anim_prop(ufbx_anim_layer*, ufbx_element*, sbyte*)" />
/// </summary>
[System.Runtime.CompilerServices.MethodImpl(System.Runtime.CompilerServices.MethodImplOptions.AggressiveInlining)]
public ufbx_anim_prop* FindAnimProp(ufbx_element* element, sbyte* prop)
{ {
return Api.ufbx_find_anim_prop( return Api.ufbx_find_anim_prop(
(ufbx_anim_layer*)System.Runtime.CompilerServices.Unsafe.AsPointer(ref this), (ufbx_anim_layer*)System.Runtime.CompilerServices.Unsafe.AsPointer(ref this),
@@ -30,8 +34,11 @@ public unsafe partial struct ufbx_anim_layer
prop); prop);
} }
// From: ufbx_find_anim_props(ufbx_anim_layer*, ufbx_element*) /// <summary>
public ufbx_anim_prop_list find_anim_props(ufbx_element* element) /// From: <see cref="Api.ufbx_find_anim_props(ufbx_anim_layer*, ufbx_element*)" />
/// </summary>
[System.Runtime.CompilerServices.MethodImpl(System.Runtime.CompilerServices.MethodImplOptions.AggressiveInlining)]
public ufbx_anim_prop_list FindAnimProps(ufbx_element* element)
{ {
return Api.ufbx_find_anim_props( return Api.ufbx_find_anim_props(
(ufbx_anim_layer*)System.Runtime.CompilerServices.Unsafe.AsPointer(ref this), (ufbx_anim_layer*)System.Runtime.CompilerServices.Unsafe.AsPointer(ref this),

View File

@@ -2,30 +2,37 @@
// This file is generated by Ghost.NativeWrapperGen. Do not edit manually. // This file is generated by Ghost.NativeWrapperGen. Do not edit manually.
// </auto-generated> // </auto-generated>
using System.Runtime.CompilerServices;
namespace Ghost.Ufbx; namespace Ghost.Ufbx;
public unsafe partial struct ufbx_anim_value public unsafe partial struct ufbx_anim_value
{ {
// From: ufbx_evaluate_anim_value_real(ufbx_anim_value*, double) /// <summary>
public float evaluate_anim_value_real(double time) /// From: <see cref="Api.ufbx_evaluate_anim_value_real(ufbx_anim_value*, double)" />
/// </summary>
[System.Runtime.CompilerServices.MethodImpl(System.Runtime.CompilerServices.MethodImplOptions.AggressiveInlining)]
public float EvaluateReal(double time)
{ {
return Api.ufbx_evaluate_anim_value_real( return Api.ufbx_evaluate_anim_value_real(
(ufbx_anim_value*)System.Runtime.CompilerServices.Unsafe.AsPointer(ref this), (ufbx_anim_value*)System.Runtime.CompilerServices.Unsafe.AsPointer(ref this),
time); time);
} }
// From: ufbx_evaluate_anim_value_vec3(ufbx_anim_value*, double) /// <summary>
public Misaki.HighPerformance.Mathematics.float3 evaluate_anim_value_vec3(double time) /// From: <see cref="Api.ufbx_evaluate_anim_value_vec3(ufbx_anim_value*, double)" />
/// </summary>
[System.Runtime.CompilerServices.MethodImpl(System.Runtime.CompilerServices.MethodImplOptions.AggressiveInlining)]
public Misaki.HighPerformance.Mathematics.float3 EvaluateVec3(double time)
{ {
return Api.ufbx_evaluate_anim_value_vec3( return Api.ufbx_evaluate_anim_value_vec3(
(ufbx_anim_value*)System.Runtime.CompilerServices.Unsafe.AsPointer(ref this), (ufbx_anim_value*)System.Runtime.CompilerServices.Unsafe.AsPointer(ref this),
time); time);
} }
// From: ufbx_evaluate_anim_value_real_flags(ufbx_anim_value*, double, uint) /// <summary>
public float evaluate_anim_value_real_flags(double time, uint flags) /// From: <see cref="Api.ufbx_evaluate_anim_value_real_flags(ufbx_anim_value*, double, uint)" />
/// </summary>
[System.Runtime.CompilerServices.MethodImpl(System.Runtime.CompilerServices.MethodImplOptions.AggressiveInlining)]
public float EvaluateRealFlags(double time, uint flags)
{ {
return Api.ufbx_evaluate_anim_value_real_flags( return Api.ufbx_evaluate_anim_value_real_flags(
(ufbx_anim_value*)System.Runtime.CompilerServices.Unsafe.AsPointer(ref this), (ufbx_anim_value*)System.Runtime.CompilerServices.Unsafe.AsPointer(ref this),
@@ -33,8 +40,11 @@ public unsafe partial struct ufbx_anim_value
flags); flags);
} }
// From: ufbx_evaluate_anim_value_vec3_flags(ufbx_anim_value*, double, uint) /// <summary>
public Misaki.HighPerformance.Mathematics.float3 evaluate_anim_value_vec3_flags(double time, uint flags) /// From: <see cref="Api.ufbx_evaluate_anim_value_vec3_flags(ufbx_anim_value*, double, uint)" />
/// </summary>
[System.Runtime.CompilerServices.MethodImpl(System.Runtime.CompilerServices.MethodImplOptions.AggressiveInlining)]
public Misaki.HighPerformance.Mathematics.float3 EvaluateVec3Flags(double time, uint flags)
{ {
return Api.ufbx_evaluate_anim_value_vec3_flags( return Api.ufbx_evaluate_anim_value_vec3_flags(
(ufbx_anim_value*)System.Runtime.CompilerServices.Unsafe.AsPointer(ref this), (ufbx_anim_value*)System.Runtime.CompilerServices.Unsafe.AsPointer(ref this),

View File

@@ -2,50 +2,66 @@
// This file is generated by Ghost.NativeWrapperGen. Do not edit manually. // This file is generated by Ghost.NativeWrapperGen. Do not edit manually.
// </auto-generated> // </auto-generated>
using System.Runtime.CompilerServices;
namespace Ghost.Ufbx; namespace Ghost.Ufbx;
public unsafe partial struct ufbx_baked_anim public unsafe partial struct ufbx_baked_anim : System.IDisposable
{ {
// From: ufbx_retain_baked_anim(ufbx_baked_anim*) /// <summary>
public void retain() /// From: <see cref="Api.ufbx_retain_baked_anim(ufbx_baked_anim*)" />
/// </summary>
[System.Runtime.CompilerServices.MethodImpl(System.Runtime.CompilerServices.MethodImplOptions.AggressiveInlining)]
public void Retain()
{ {
Api.ufbx_retain_baked_anim((ufbx_baked_anim*)System.Runtime.CompilerServices.Unsafe.AsPointer(ref this)); Api.ufbx_retain_baked_anim((ufbx_baked_anim*)System.Runtime.CompilerServices.Unsafe.AsPointer(ref this));
} }
// From: ufbx_free_baked_anim(ufbx_baked_anim*) /// <summary>
public void free() /// From: <see cref="Api.ufbx_free_baked_anim(ufbx_baked_anim*)" />
/// </summary>
[System.Runtime.CompilerServices.MethodImpl(System.Runtime.CompilerServices.MethodImplOptions.AggressiveInlining)]
public void Dispose()
{ {
Api.ufbx_free_baked_anim((ufbx_baked_anim*)System.Runtime.CompilerServices.Unsafe.AsPointer(ref this)); Api.ufbx_free_baked_anim((ufbx_baked_anim*)System.Runtime.CompilerServices.Unsafe.AsPointer(ref this));
} }
// From: ufbx_find_baked_node_by_typed_id(ufbx_baked_anim*, uint) /// <summary>
public ufbx_baked_node* find_baked_node_by_typed_id(uint typed_id) /// From: <see cref="Api.ufbx_find_baked_node_by_typed_id(ufbx_baked_anim*, uint)" />
/// </summary>
[System.Runtime.CompilerServices.MethodImpl(System.Runtime.CompilerServices.MethodImplOptions.AggressiveInlining)]
public ufbx_baked_node* FindBakedNodeByTypedId(uint typed_id)
{ {
return Api.ufbx_find_baked_node_by_typed_id( return Api.ufbx_find_baked_node_by_typed_id(
(ufbx_baked_anim*)System.Runtime.CompilerServices.Unsafe.AsPointer(ref this), (ufbx_baked_anim*)System.Runtime.CompilerServices.Unsafe.AsPointer(ref this),
typed_id); typed_id);
} }
// From: ufbx_find_baked_node(ufbx_baked_anim*, ufbx_node*) /// <summary>
public ufbx_baked_node* find_baked_node(ufbx_node* node) /// From: <see cref="Api.ufbx_find_baked_node(ufbx_baked_anim*, ufbx_node*)" />
/// </summary>
[System.Runtime.CompilerServices.MethodImpl(System.Runtime.CompilerServices.MethodImplOptions.AggressiveInlining)]
public ufbx_baked_node* FindBakedNode(ufbx_node* node)
{ {
return Api.ufbx_find_baked_node( return Api.ufbx_find_baked_node(
(ufbx_baked_anim*)System.Runtime.CompilerServices.Unsafe.AsPointer(ref this), (ufbx_baked_anim*)System.Runtime.CompilerServices.Unsafe.AsPointer(ref this),
node); node);
} }
// From: ufbx_find_baked_element_by_element_id(ufbx_baked_anim*, uint) /// <summary>
public ufbx_baked_element* find_baked_element_by_element_id(uint element_id) /// From: <see cref="Api.ufbx_find_baked_element_by_element_id(ufbx_baked_anim*, uint)" />
/// </summary>
[System.Runtime.CompilerServices.MethodImpl(System.Runtime.CompilerServices.MethodImplOptions.AggressiveInlining)]
public ufbx_baked_element* FindBakedElementByElementId(uint element_id)
{ {
return Api.ufbx_find_baked_element_by_element_id( return Api.ufbx_find_baked_element_by_element_id(
(ufbx_baked_anim*)System.Runtime.CompilerServices.Unsafe.AsPointer(ref this), (ufbx_baked_anim*)System.Runtime.CompilerServices.Unsafe.AsPointer(ref this),
element_id); element_id);
} }
// From: ufbx_find_baked_element(ufbx_baked_anim*, ufbx_element*) /// <summary>
public ufbx_baked_element* find_baked_element(ufbx_element* element) /// From: <see cref="Api.ufbx_find_baked_element(ufbx_baked_anim*, ufbx_element*)" />
/// </summary>
[System.Runtime.CompilerServices.MethodImpl(System.Runtime.CompilerServices.MethodImplOptions.AggressiveInlining)]
public ufbx_baked_element* FindBakedElement(ufbx_element* element)
{ {
return Api.ufbx_find_baked_element( return Api.ufbx_find_baked_element(
(ufbx_baked_anim*)System.Runtime.CompilerServices.Unsafe.AsPointer(ref this), (ufbx_baked_anim*)System.Runtime.CompilerServices.Unsafe.AsPointer(ref this),

View File

@@ -2,22 +2,26 @@
// This file is generated by Ghost.NativeWrapperGen. Do not edit manually. // This file is generated by Ghost.NativeWrapperGen. Do not edit manually.
// </auto-generated> // </auto-generated>
using System.Runtime.CompilerServices;
namespace Ghost.Ufbx; namespace Ghost.Ufbx;
public unsafe partial struct ufbx_blend_deformer public unsafe partial struct ufbx_blend_deformer
{ {
// From: ufbx_get_blend_vertex_offset(ufbx_blend_deformer*, nuint) /// <summary>
public Misaki.HighPerformance.Mathematics.float3 get_blend_vertex_offset(nuint vertex) /// From: <see cref="Api.ufbx_get_blend_vertex_offset(ufbx_blend_deformer*, nuint)" />
/// </summary>
[System.Runtime.CompilerServices.MethodImpl(System.Runtime.CompilerServices.MethodImplOptions.AggressiveInlining)]
public Misaki.HighPerformance.Mathematics.float3 GetBlendVertexOffset(nuint vertex)
{ {
return Api.ufbx_get_blend_vertex_offset( return Api.ufbx_get_blend_vertex_offset(
(ufbx_blend_deformer*)System.Runtime.CompilerServices.Unsafe.AsPointer(ref this), (ufbx_blend_deformer*)System.Runtime.CompilerServices.Unsafe.AsPointer(ref this),
vertex); vertex);
} }
// From: ufbx_add_blend_vertex_offsets(ufbx_blend_deformer*, Misaki.HighPerformance.Mathematics.float3*, nuint, float) /// <summary>
public void add_blend_vertex_offsets(Misaki.HighPerformance.Mathematics.float3* vertices, nuint num_vertices, float weight) /// From: <see cref="Api.ufbx_add_blend_vertex_offsets(ufbx_blend_deformer*, Misaki.HighPerformance.Mathematics.float3*, nuint, float)" />
/// </summary>
[System.Runtime.CompilerServices.MethodImpl(System.Runtime.CompilerServices.MethodImplOptions.AggressiveInlining)]
public void AddBlendVertexOffsets(Misaki.HighPerformance.Mathematics.float3* vertices, nuint num_vertices, float weight)
{ {
Api.ufbx_add_blend_vertex_offsets( Api.ufbx_add_blend_vertex_offsets(
(ufbx_blend_deformer*)System.Runtime.CompilerServices.Unsafe.AsPointer(ref this), (ufbx_blend_deformer*)System.Runtime.CompilerServices.Unsafe.AsPointer(ref this),

View File

@@ -2,30 +2,37 @@
// This file is generated by Ghost.NativeWrapperGen. Do not edit manually. // This file is generated by Ghost.NativeWrapperGen. Do not edit manually.
// </auto-generated> // </auto-generated>
using System.Runtime.CompilerServices;
namespace Ghost.Ufbx; namespace Ghost.Ufbx;
public unsafe partial struct ufbx_blend_shape public unsafe partial struct ufbx_blend_shape
{ {
// From: ufbx_get_blend_shape_offset_index(ufbx_blend_shape*, nuint) /// <summary>
public uint get_blend_shape_offset_index(nuint vertex) /// From: <see cref="Api.ufbx_get_blend_shape_offset_index(ufbx_blend_shape*, nuint)" />
/// </summary>
[System.Runtime.CompilerServices.MethodImpl(System.Runtime.CompilerServices.MethodImplOptions.AggressiveInlining)]
public uint GetOffsetIndex(nuint vertex)
{ {
return Api.ufbx_get_blend_shape_offset_index( return Api.ufbx_get_blend_shape_offset_index(
(ufbx_blend_shape*)System.Runtime.CompilerServices.Unsafe.AsPointer(ref this), (ufbx_blend_shape*)System.Runtime.CompilerServices.Unsafe.AsPointer(ref this),
vertex); vertex);
} }
// From: ufbx_get_blend_shape_vertex_offset(ufbx_blend_shape*, nuint) /// <summary>
public Misaki.HighPerformance.Mathematics.float3 get_blend_shape_vertex_offset(nuint vertex) /// From: <see cref="Api.ufbx_get_blend_shape_vertex_offset(ufbx_blend_shape*, nuint)" />
/// </summary>
[System.Runtime.CompilerServices.MethodImpl(System.Runtime.CompilerServices.MethodImplOptions.AggressiveInlining)]
public Misaki.HighPerformance.Mathematics.float3 GetVertexOffset(nuint vertex)
{ {
return Api.ufbx_get_blend_shape_vertex_offset( return Api.ufbx_get_blend_shape_vertex_offset(
(ufbx_blend_shape*)System.Runtime.CompilerServices.Unsafe.AsPointer(ref this), (ufbx_blend_shape*)System.Runtime.CompilerServices.Unsafe.AsPointer(ref this),
vertex); vertex);
} }
// From: ufbx_add_blend_shape_vertex_offsets(ufbx_blend_shape*, Misaki.HighPerformance.Mathematics.float3*, nuint, float) /// <summary>
public void add_blend_shape_vertex_offsets(Misaki.HighPerformance.Mathematics.float3* vertices, nuint num_vertices, float weight) /// From: <see cref="Api.ufbx_add_blend_shape_vertex_offsets(ufbx_blend_shape*, Misaki.HighPerformance.Mathematics.float3*, nuint, float)" />
/// </summary>
[System.Runtime.CompilerServices.MethodImpl(System.Runtime.CompilerServices.MethodImplOptions.AggressiveInlining)]
public void AddVertexOffsets(Misaki.HighPerformance.Mathematics.float3* vertices, nuint num_vertices, float weight)
{ {
Api.ufbx_add_blend_shape_vertex_offsets( Api.ufbx_add_blend_shape_vertex_offsets(
(ufbx_blend_shape*)System.Runtime.CompilerServices.Unsafe.AsPointer(ref this), (ufbx_blend_shape*)System.Runtime.CompilerServices.Unsafe.AsPointer(ref this),

View File

@@ -2,14 +2,15 @@
// This file is generated by Ghost.NativeWrapperGen. Do not edit manually. // This file is generated by Ghost.NativeWrapperGen. Do not edit manually.
// </auto-generated> // </auto-generated>
using System.Runtime.CompilerServices;
namespace Ghost.Ufbx; namespace Ghost.Ufbx;
public unsafe partial struct ufbx_cache_channel public unsafe partial struct ufbx_cache_channel
{ {
// From: ufbx_sample_geometry_cache_real(ufbx_cache_channel*, double, float*, nuint, ufbx_geometry_cache_data_opts*) /// <summary>
public nuint sample_geometry_cache_real(double time, float* data, nuint num_data, ufbx_geometry_cache_data_opts* opts) /// From: <see cref="Api.ufbx_sample_geometry_cache_real(ufbx_cache_channel*, double, float*, nuint, ufbx_geometry_cache_data_opts*)" />
/// </summary>
[System.Runtime.CompilerServices.MethodImpl(System.Runtime.CompilerServices.MethodImplOptions.AggressiveInlining)]
public nuint SampleGeometryCacheReal(double time, float* data, nuint num_data, ufbx_geometry_cache_data_opts* opts)
{ {
return Api.ufbx_sample_geometry_cache_real( return Api.ufbx_sample_geometry_cache_real(
(ufbx_cache_channel*)System.Runtime.CompilerServices.Unsafe.AsPointer(ref this), (ufbx_cache_channel*)System.Runtime.CompilerServices.Unsafe.AsPointer(ref this),
@@ -19,8 +20,11 @@ public unsafe partial struct ufbx_cache_channel
opts); opts);
} }
// From: ufbx_sample_geometry_cache_vec3(ufbx_cache_channel*, double, Misaki.HighPerformance.Mathematics.float3*, nuint, ufbx_geometry_cache_data_opts*) /// <summary>
public nuint sample_geometry_cache_vec3(double time, Misaki.HighPerformance.Mathematics.float3* data, nuint num_data, ufbx_geometry_cache_data_opts* opts) /// From: <see cref="Api.ufbx_sample_geometry_cache_vec3(ufbx_cache_channel*, double, Misaki.HighPerformance.Mathematics.float3*, nuint, ufbx_geometry_cache_data_opts*)" />
/// </summary>
[System.Runtime.CompilerServices.MethodImpl(System.Runtime.CompilerServices.MethodImplOptions.AggressiveInlining)]
public nuint SampleGeometryCacheVec3(double time, Misaki.HighPerformance.Mathematics.float3* data, nuint num_data, ufbx_geometry_cache_data_opts* opts)
{ {
return Api.ufbx_sample_geometry_cache_vec3( return Api.ufbx_sample_geometry_cache_vec3(
(ufbx_cache_channel*)System.Runtime.CompilerServices.Unsafe.AsPointer(ref this), (ufbx_cache_channel*)System.Runtime.CompilerServices.Unsafe.AsPointer(ref this),

View File

@@ -2,14 +2,15 @@
// This file is generated by Ghost.NativeWrapperGen. Do not edit manually. // This file is generated by Ghost.NativeWrapperGen. Do not edit manually.
// </auto-generated> // </auto-generated>
using System.Runtime.CompilerServices;
namespace Ghost.Ufbx; namespace Ghost.Ufbx;
public unsafe partial struct ufbx_cache_frame public unsafe partial struct ufbx_cache_frame
{ {
// From: ufbx_read_geometry_cache_real(ufbx_cache_frame*, float*, nuint, ufbx_geometry_cache_data_opts*) /// <summary>
public nuint read_geometry_cache_real(float* data, nuint num_data, ufbx_geometry_cache_data_opts* opts) /// From: <see cref="Api.ufbx_read_geometry_cache_real(ufbx_cache_frame*, float*, nuint, ufbx_geometry_cache_data_opts*)" />
/// </summary>
[System.Runtime.CompilerServices.MethodImpl(System.Runtime.CompilerServices.MethodImplOptions.AggressiveInlining)]
public nuint ReadGeometryCacheReal(float* data, nuint num_data, ufbx_geometry_cache_data_opts* opts)
{ {
return Api.ufbx_read_geometry_cache_real( return Api.ufbx_read_geometry_cache_real(
(ufbx_cache_frame*)System.Runtime.CompilerServices.Unsafe.AsPointer(ref this), (ufbx_cache_frame*)System.Runtime.CompilerServices.Unsafe.AsPointer(ref this),
@@ -18,8 +19,11 @@ public unsafe partial struct ufbx_cache_frame
opts); opts);
} }
// From: ufbx_read_geometry_cache_vec3(ufbx_cache_frame*, Misaki.HighPerformance.Mathematics.float3*, nuint, ufbx_geometry_cache_data_opts*) /// <summary>
public nuint read_geometry_cache_vec3(Misaki.HighPerformance.Mathematics.float3* data, nuint num_data, ufbx_geometry_cache_data_opts* opts) /// From: <see cref="Api.ufbx_read_geometry_cache_vec3(ufbx_cache_frame*, Misaki.HighPerformance.Mathematics.float3*, nuint, ufbx_geometry_cache_data_opts*)" />
/// </summary>
[System.Runtime.CompilerServices.MethodImpl(System.Runtime.CompilerServices.MethodImplOptions.AggressiveInlining)]
public nuint ReadGeometryCacheVec3(Misaki.HighPerformance.Mathematics.float3* data, nuint num_data, ufbx_geometry_cache_data_opts* opts)
{ {
return Api.ufbx_read_geometry_cache_vec3( return Api.ufbx_read_geometry_cache_vec3(
(ufbx_cache_frame*)System.Runtime.CompilerServices.Unsafe.AsPointer(ref this), (ufbx_cache_frame*)System.Runtime.CompilerServices.Unsafe.AsPointer(ref this),

View File

@@ -2,14 +2,15 @@
// This file is generated by Ghost.NativeWrapperGen. Do not edit manually. // This file is generated by Ghost.NativeWrapperGen. Do not edit manually.
// </auto-generated> // </auto-generated>
using System.Runtime.CompilerServices;
namespace Ghost.Ufbx; namespace Ghost.Ufbx;
public unsafe partial struct ufbx_dom_node public unsafe partial struct ufbx_dom_node
{ {
// From: ufbx_dom_find_len(ufbx_dom_node*, sbyte*, nuint) /// <summary>
public ufbx_dom_node* dom_find_len(ReadOnlySpan<byte> name) /// From: <see cref="Api.ufbx_dom_find_len(ufbx_dom_node*, sbyte*, nuint)" />
/// </summary>
[System.Runtime.CompilerServices.MethodImpl(System.Runtime.CompilerServices.MethodImplOptions.AggressiveInlining)]
public ufbx_dom_node* DomFindLen(ReadOnlySpan<byte> name)
{ {
fixed (byte* pname = name) fixed (byte* pname = name)
{ {
@@ -20,58 +21,85 @@ public unsafe partial struct ufbx_dom_node
} }
} }
// From: ufbx_dom_find(ufbx_dom_node*, sbyte*) /// <summary>
public ufbx_dom_node* dom_find(sbyte* name) /// From: <see cref="Api.ufbx_dom_find(ufbx_dom_node*, sbyte*)" />
/// </summary>
[System.Runtime.CompilerServices.MethodImpl(System.Runtime.CompilerServices.MethodImplOptions.AggressiveInlining)]
public ufbx_dom_node* DomFind(sbyte* name)
{ {
return Api.ufbx_dom_find( return Api.ufbx_dom_find(
(ufbx_dom_node*)System.Runtime.CompilerServices.Unsafe.AsPointer(ref this), (ufbx_dom_node*)System.Runtime.CompilerServices.Unsafe.AsPointer(ref this),
name); name);
} }
// From: ufbx_dom_is_array(ufbx_dom_node*) /// <summary>
public bool dom_is_array() /// From: <see cref="Api.ufbx_dom_is_array(ufbx_dom_node*)" />
/// </summary>
[System.Runtime.CompilerServices.MethodImpl(System.Runtime.CompilerServices.MethodImplOptions.AggressiveInlining)]
public bool DomIsArray()
{ {
return Api.ufbx_dom_is_array((ufbx_dom_node*)System.Runtime.CompilerServices.Unsafe.AsPointer(ref this)); return Api.ufbx_dom_is_array((ufbx_dom_node*)System.Runtime.CompilerServices.Unsafe.AsPointer(ref this));
} }
// From: ufbx_dom_array_size(ufbx_dom_node*) /// <summary>
public nuint dom_array_size() /// From: <see cref="Api.ufbx_dom_array_size(ufbx_dom_node*)" />
/// </summary>
[System.Runtime.CompilerServices.MethodImpl(System.Runtime.CompilerServices.MethodImplOptions.AggressiveInlining)]
public nuint DomArraySize()
{ {
return Api.ufbx_dom_array_size((ufbx_dom_node*)System.Runtime.CompilerServices.Unsafe.AsPointer(ref this)); return Api.ufbx_dom_array_size((ufbx_dom_node*)System.Runtime.CompilerServices.Unsafe.AsPointer(ref this));
} }
// From: ufbx_dom_as_int32_list(ufbx_dom_node*) /// <summary>
public ufbx_int32_list dom_as_int32_list() /// From: <see cref="Api.ufbx_dom_as_int32_list(ufbx_dom_node*)" />
/// </summary>
[System.Runtime.CompilerServices.MethodImpl(System.Runtime.CompilerServices.MethodImplOptions.AggressiveInlining)]
public ufbx_int32_list DomAsInt32List()
{ {
return Api.ufbx_dom_as_int32_list((ufbx_dom_node*)System.Runtime.CompilerServices.Unsafe.AsPointer(ref this)); return Api.ufbx_dom_as_int32_list((ufbx_dom_node*)System.Runtime.CompilerServices.Unsafe.AsPointer(ref this));
} }
// From: ufbx_dom_as_int64_list(ufbx_dom_node*) /// <summary>
public ufbx_int64_list dom_as_int64_list() /// From: <see cref="Api.ufbx_dom_as_int64_list(ufbx_dom_node*)" />
/// </summary>
[System.Runtime.CompilerServices.MethodImpl(System.Runtime.CompilerServices.MethodImplOptions.AggressiveInlining)]
public ufbx_int64_list DomAsInt64List()
{ {
return Api.ufbx_dom_as_int64_list((ufbx_dom_node*)System.Runtime.CompilerServices.Unsafe.AsPointer(ref this)); return Api.ufbx_dom_as_int64_list((ufbx_dom_node*)System.Runtime.CompilerServices.Unsafe.AsPointer(ref this));
} }
// From: ufbx_dom_as_float_list(ufbx_dom_node*) /// <summary>
public ufbx_float_list dom_as_float_list() /// From: <see cref="Api.ufbx_dom_as_float_list(ufbx_dom_node*)" />
/// </summary>
[System.Runtime.CompilerServices.MethodImpl(System.Runtime.CompilerServices.MethodImplOptions.AggressiveInlining)]
public ufbx_float_list DomAsFloatList()
{ {
return Api.ufbx_dom_as_float_list((ufbx_dom_node*)System.Runtime.CompilerServices.Unsafe.AsPointer(ref this)); return Api.ufbx_dom_as_float_list((ufbx_dom_node*)System.Runtime.CompilerServices.Unsafe.AsPointer(ref this));
} }
// From: ufbx_dom_as_double_list(ufbx_dom_node*) /// <summary>
public ufbx_double_list dom_as_double_list() /// From: <see cref="Api.ufbx_dom_as_double_list(ufbx_dom_node*)" />
/// </summary>
[System.Runtime.CompilerServices.MethodImpl(System.Runtime.CompilerServices.MethodImplOptions.AggressiveInlining)]
public ufbx_double_list DomAsDoubleList()
{ {
return Api.ufbx_dom_as_double_list((ufbx_dom_node*)System.Runtime.CompilerServices.Unsafe.AsPointer(ref this)); return Api.ufbx_dom_as_double_list((ufbx_dom_node*)System.Runtime.CompilerServices.Unsafe.AsPointer(ref this));
} }
// From: ufbx_dom_as_real_list(ufbx_dom_node*) /// <summary>
public ufbx_real_list dom_as_real_list() /// From: <see cref="Api.ufbx_dom_as_real_list(ufbx_dom_node*)" />
/// </summary>
[System.Runtime.CompilerServices.MethodImpl(System.Runtime.CompilerServices.MethodImplOptions.AggressiveInlining)]
public ufbx_real_list DomAsRealList()
{ {
return Api.ufbx_dom_as_real_list((ufbx_dom_node*)System.Runtime.CompilerServices.Unsafe.AsPointer(ref this)); return Api.ufbx_dom_as_real_list((ufbx_dom_node*)System.Runtime.CompilerServices.Unsafe.AsPointer(ref this));
} }
// From: ufbx_dom_as_blob_list(ufbx_dom_node*) /// <summary>
public ufbx_blob_list dom_as_blob_list() /// From: <see cref="Api.ufbx_dom_as_blob_list(ufbx_dom_node*)" />
/// </summary>
[System.Runtime.CompilerServices.MethodImpl(System.Runtime.CompilerServices.MethodImplOptions.AggressiveInlining)]
public ufbx_blob_list DomAsBlobList()
{ {
return Api.ufbx_dom_as_blob_list((ufbx_dom_node*)System.Runtime.CompilerServices.Unsafe.AsPointer(ref this)); return Api.ufbx_dom_as_blob_list((ufbx_dom_node*)System.Runtime.CompilerServices.Unsafe.AsPointer(ref this));
} }

View File

@@ -2,14 +2,15 @@
// This file is generated by Ghost.NativeWrapperGen. Do not edit manually. // This file is generated by Ghost.NativeWrapperGen. Do not edit manually.
// </auto-generated> // </auto-generated>
using System.Runtime.CompilerServices;
namespace Ghost.Ufbx; namespace Ghost.Ufbx;
public unsafe partial struct ufbx_element public unsafe partial struct ufbx_element
{ {
// From: ufbx_get_prop_element(ufbx_element*, ufbx_prop*, ufbx_element_type) /// <summary>
public ufbx_element* get_prop(ufbx_prop* prop, ufbx_element_type type) /// From: <see cref="Api.ufbx_get_prop_element(ufbx_element*, ufbx_prop*, ufbx_element_type)" />
/// </summary>
[System.Runtime.CompilerServices.MethodImpl(System.Runtime.CompilerServices.MethodImplOptions.AggressiveInlining)]
public ufbx_element* GetProp(ufbx_prop* prop, ufbx_element_type type)
{ {
return Api.ufbx_get_prop_element( return Api.ufbx_get_prop_element(
(ufbx_element*)System.Runtime.CompilerServices.Unsafe.AsPointer(ref this), (ufbx_element*)System.Runtime.CompilerServices.Unsafe.AsPointer(ref this),
@@ -17,8 +18,11 @@ public unsafe partial struct ufbx_element
type); type);
} }
// From: ufbx_find_prop_element_len(ufbx_element*, sbyte*, nuint, ufbx_element_type) /// <summary>
public ufbx_element* find_prop_element_len(ReadOnlySpan<byte> name, ufbx_element_type type) /// From: <see cref="Api.ufbx_find_prop_element_len(ufbx_element*, sbyte*, nuint, ufbx_element_type)" />
/// </summary>
[System.Runtime.CompilerServices.MethodImpl(System.Runtime.CompilerServices.MethodImplOptions.AggressiveInlining)]
public ufbx_element* FindPropLen(ReadOnlySpan<byte> name, ufbx_element_type type)
{ {
fixed (byte* pname = name) fixed (byte* pname = name)
{ {
@@ -30,8 +34,11 @@ public unsafe partial struct ufbx_element
} }
} }
// From: ufbx_find_prop_element(ufbx_element*, sbyte*, ufbx_element_type) /// <summary>
public ufbx_element* find_prop(sbyte* name, ufbx_element_type type) /// From: <see cref="Api.ufbx_find_prop_element(ufbx_element*, sbyte*, ufbx_element_type)" />
/// </summary>
[System.Runtime.CompilerServices.MethodImpl(System.Runtime.CompilerServices.MethodImplOptions.AggressiveInlining)]
public ufbx_element* FindProp(sbyte* name, ufbx_element_type type)
{ {
return Api.ufbx_find_prop_element( return Api.ufbx_find_prop_element(
(ufbx_element*)System.Runtime.CompilerServices.Unsafe.AsPointer(ref this), (ufbx_element*)System.Runtime.CompilerServices.Unsafe.AsPointer(ref this),
@@ -39,254 +46,380 @@ public unsafe partial struct ufbx_element
type); type);
} }
// From: ufbx_as_unknown(ufbx_element*) /// <summary>
public ufbx_unknown* as_unknown() /// From: <see cref="Api.ufbx_as_unknown(ufbx_element*)" />
/// </summary>
[System.Runtime.CompilerServices.MethodImpl(System.Runtime.CompilerServices.MethodImplOptions.AggressiveInlining)]
public ufbx_unknown* AsUnknown()
{ {
return Api.ufbx_as_unknown((ufbx_element*)System.Runtime.CompilerServices.Unsafe.AsPointer(ref this)); return Api.ufbx_as_unknown((ufbx_element*)System.Runtime.CompilerServices.Unsafe.AsPointer(ref this));
} }
// From: ufbx_as_node(ufbx_element*) /// <summary>
public ufbx_node* as_node() /// From: <see cref="Api.ufbx_as_node(ufbx_element*)" />
/// </summary>
[System.Runtime.CompilerServices.MethodImpl(System.Runtime.CompilerServices.MethodImplOptions.AggressiveInlining)]
public ufbx_node* AsNode()
{ {
return Api.ufbx_as_node((ufbx_element*)System.Runtime.CompilerServices.Unsafe.AsPointer(ref this)); return Api.ufbx_as_node((ufbx_element*)System.Runtime.CompilerServices.Unsafe.AsPointer(ref this));
} }
// From: ufbx_as_mesh(ufbx_element*) /// <summary>
public ufbx_mesh* as_mesh() /// From: <see cref="Api.ufbx_as_mesh(ufbx_element*)" />
/// </summary>
[System.Runtime.CompilerServices.MethodImpl(System.Runtime.CompilerServices.MethodImplOptions.AggressiveInlining)]
public ufbx_mesh* AsMesh()
{ {
return Api.ufbx_as_mesh((ufbx_element*)System.Runtime.CompilerServices.Unsafe.AsPointer(ref this)); return Api.ufbx_as_mesh((ufbx_element*)System.Runtime.CompilerServices.Unsafe.AsPointer(ref this));
} }
// From: ufbx_as_light(ufbx_element*) /// <summary>
public ufbx_light* as_light() /// From: <see cref="Api.ufbx_as_light(ufbx_element*)" />
/// </summary>
[System.Runtime.CompilerServices.MethodImpl(System.Runtime.CompilerServices.MethodImplOptions.AggressiveInlining)]
public ufbx_light* AsLight()
{ {
return Api.ufbx_as_light((ufbx_element*)System.Runtime.CompilerServices.Unsafe.AsPointer(ref this)); return Api.ufbx_as_light((ufbx_element*)System.Runtime.CompilerServices.Unsafe.AsPointer(ref this));
} }
// From: ufbx_as_camera(ufbx_element*) /// <summary>
public ufbx_camera* as_camera() /// From: <see cref="Api.ufbx_as_camera(ufbx_element*)" />
/// </summary>
[System.Runtime.CompilerServices.MethodImpl(System.Runtime.CompilerServices.MethodImplOptions.AggressiveInlining)]
public ufbx_camera* AsCamera()
{ {
return Api.ufbx_as_camera((ufbx_element*)System.Runtime.CompilerServices.Unsafe.AsPointer(ref this)); return Api.ufbx_as_camera((ufbx_element*)System.Runtime.CompilerServices.Unsafe.AsPointer(ref this));
} }
// From: ufbx_as_bone(ufbx_element*) /// <summary>
public ufbx_bone* as_bone() /// From: <see cref="Api.ufbx_as_bone(ufbx_element*)" />
/// </summary>
[System.Runtime.CompilerServices.MethodImpl(System.Runtime.CompilerServices.MethodImplOptions.AggressiveInlining)]
public ufbx_bone* AsBone()
{ {
return Api.ufbx_as_bone((ufbx_element*)System.Runtime.CompilerServices.Unsafe.AsPointer(ref this)); return Api.ufbx_as_bone((ufbx_element*)System.Runtime.CompilerServices.Unsafe.AsPointer(ref this));
} }
// From: ufbx_as_empty(ufbx_element*) /// <summary>
public ufbx_empty* as_empty() /// From: <see cref="Api.ufbx_as_empty(ufbx_element*)" />
/// </summary>
[System.Runtime.CompilerServices.MethodImpl(System.Runtime.CompilerServices.MethodImplOptions.AggressiveInlining)]
public ufbx_empty* AsEmpty()
{ {
return Api.ufbx_as_empty((ufbx_element*)System.Runtime.CompilerServices.Unsafe.AsPointer(ref this)); return Api.ufbx_as_empty((ufbx_element*)System.Runtime.CompilerServices.Unsafe.AsPointer(ref this));
} }
// From: ufbx_as_line_curve(ufbx_element*) /// <summary>
public ufbx_line_curve* as_line_curve() /// From: <see cref="Api.ufbx_as_line_curve(ufbx_element*)" />
/// </summary>
[System.Runtime.CompilerServices.MethodImpl(System.Runtime.CompilerServices.MethodImplOptions.AggressiveInlining)]
public ufbx_line_curve* AsLineCurve()
{ {
return Api.ufbx_as_line_curve((ufbx_element*)System.Runtime.CompilerServices.Unsafe.AsPointer(ref this)); return Api.ufbx_as_line_curve((ufbx_element*)System.Runtime.CompilerServices.Unsafe.AsPointer(ref this));
} }
// From: ufbx_as_nurbs_curve(ufbx_element*) /// <summary>
public ufbx_nurbs_curve* as_nurbs_curve() /// From: <see cref="Api.ufbx_as_nurbs_curve(ufbx_element*)" />
/// </summary>
[System.Runtime.CompilerServices.MethodImpl(System.Runtime.CompilerServices.MethodImplOptions.AggressiveInlining)]
public ufbx_nurbs_curve* AsNurbsCurve()
{ {
return Api.ufbx_as_nurbs_curve((ufbx_element*)System.Runtime.CompilerServices.Unsafe.AsPointer(ref this)); return Api.ufbx_as_nurbs_curve((ufbx_element*)System.Runtime.CompilerServices.Unsafe.AsPointer(ref this));
} }
// From: ufbx_as_nurbs_surface(ufbx_element*) /// <summary>
public ufbx_nurbs_surface* as_nurbs_surface() /// From: <see cref="Api.ufbx_as_nurbs_surface(ufbx_element*)" />
/// </summary>
[System.Runtime.CompilerServices.MethodImpl(System.Runtime.CompilerServices.MethodImplOptions.AggressiveInlining)]
public ufbx_nurbs_surface* AsNurbsSurface()
{ {
return Api.ufbx_as_nurbs_surface((ufbx_element*)System.Runtime.CompilerServices.Unsafe.AsPointer(ref this)); return Api.ufbx_as_nurbs_surface((ufbx_element*)System.Runtime.CompilerServices.Unsafe.AsPointer(ref this));
} }
// From: ufbx_as_nurbs_trim_surface(ufbx_element*) /// <summary>
public ufbx_nurbs_trim_surface* as_nurbs_trim_surface() /// From: <see cref="Api.ufbx_as_nurbs_trim_surface(ufbx_element*)" />
/// </summary>
[System.Runtime.CompilerServices.MethodImpl(System.Runtime.CompilerServices.MethodImplOptions.AggressiveInlining)]
public ufbx_nurbs_trim_surface* AsNurbsTrimSurface()
{ {
return Api.ufbx_as_nurbs_trim_surface((ufbx_element*)System.Runtime.CompilerServices.Unsafe.AsPointer(ref this)); return Api.ufbx_as_nurbs_trim_surface((ufbx_element*)System.Runtime.CompilerServices.Unsafe.AsPointer(ref this));
} }
// From: ufbx_as_nurbs_trim_boundary(ufbx_element*) /// <summary>
public ufbx_nurbs_trim_boundary* as_nurbs_trim_boundary() /// From: <see cref="Api.ufbx_as_nurbs_trim_boundary(ufbx_element*)" />
/// </summary>
[System.Runtime.CompilerServices.MethodImpl(System.Runtime.CompilerServices.MethodImplOptions.AggressiveInlining)]
public ufbx_nurbs_trim_boundary* AsNurbsTrimBoundary()
{ {
return Api.ufbx_as_nurbs_trim_boundary((ufbx_element*)System.Runtime.CompilerServices.Unsafe.AsPointer(ref this)); return Api.ufbx_as_nurbs_trim_boundary((ufbx_element*)System.Runtime.CompilerServices.Unsafe.AsPointer(ref this));
} }
// From: ufbx_as_procedural_geometry(ufbx_element*) /// <summary>
public ufbx_procedural_geometry* as_procedural_geometry() /// From: <see cref="Api.ufbx_as_procedural_geometry(ufbx_element*)" />
/// </summary>
[System.Runtime.CompilerServices.MethodImpl(System.Runtime.CompilerServices.MethodImplOptions.AggressiveInlining)]
public ufbx_procedural_geometry* AsProceduralGeometry()
{ {
return Api.ufbx_as_procedural_geometry((ufbx_element*)System.Runtime.CompilerServices.Unsafe.AsPointer(ref this)); return Api.ufbx_as_procedural_geometry((ufbx_element*)System.Runtime.CompilerServices.Unsafe.AsPointer(ref this));
} }
// From: ufbx_as_stereo_camera(ufbx_element*) /// <summary>
public ufbx_stereo_camera* as_stereo_camera() /// From: <see cref="Api.ufbx_as_stereo_camera(ufbx_element*)" />
/// </summary>
[System.Runtime.CompilerServices.MethodImpl(System.Runtime.CompilerServices.MethodImplOptions.AggressiveInlining)]
public ufbx_stereo_camera* AsStereoCamera()
{ {
return Api.ufbx_as_stereo_camera((ufbx_element*)System.Runtime.CompilerServices.Unsafe.AsPointer(ref this)); return Api.ufbx_as_stereo_camera((ufbx_element*)System.Runtime.CompilerServices.Unsafe.AsPointer(ref this));
} }
// From: ufbx_as_camera_switcher(ufbx_element*) /// <summary>
public ufbx_camera_switcher* as_camera_switcher() /// From: <see cref="Api.ufbx_as_camera_switcher(ufbx_element*)" />
/// </summary>
[System.Runtime.CompilerServices.MethodImpl(System.Runtime.CompilerServices.MethodImplOptions.AggressiveInlining)]
public ufbx_camera_switcher* AsCameraSwitcher()
{ {
return Api.ufbx_as_camera_switcher((ufbx_element*)System.Runtime.CompilerServices.Unsafe.AsPointer(ref this)); return Api.ufbx_as_camera_switcher((ufbx_element*)System.Runtime.CompilerServices.Unsafe.AsPointer(ref this));
} }
// From: ufbx_as_marker(ufbx_element*) /// <summary>
public ufbx_marker* as_marker() /// From: <see cref="Api.ufbx_as_marker(ufbx_element*)" />
/// </summary>
[System.Runtime.CompilerServices.MethodImpl(System.Runtime.CompilerServices.MethodImplOptions.AggressiveInlining)]
public ufbx_marker* AsMarker()
{ {
return Api.ufbx_as_marker((ufbx_element*)System.Runtime.CompilerServices.Unsafe.AsPointer(ref this)); return Api.ufbx_as_marker((ufbx_element*)System.Runtime.CompilerServices.Unsafe.AsPointer(ref this));
} }
// From: ufbx_as_lod_group(ufbx_element*) /// <summary>
public ufbx_lod_group* as_lod_group() /// From: <see cref="Api.ufbx_as_lod_group(ufbx_element*)" />
/// </summary>
[System.Runtime.CompilerServices.MethodImpl(System.Runtime.CompilerServices.MethodImplOptions.AggressiveInlining)]
public ufbx_lod_group* AsLodGroup()
{ {
return Api.ufbx_as_lod_group((ufbx_element*)System.Runtime.CompilerServices.Unsafe.AsPointer(ref this)); return Api.ufbx_as_lod_group((ufbx_element*)System.Runtime.CompilerServices.Unsafe.AsPointer(ref this));
} }
// From: ufbx_as_skin_deformer(ufbx_element*) /// <summary>
public ufbx_skin_deformer* as_skin_deformer() /// From: <see cref="Api.ufbx_as_skin_deformer(ufbx_element*)" />
/// </summary>
[System.Runtime.CompilerServices.MethodImpl(System.Runtime.CompilerServices.MethodImplOptions.AggressiveInlining)]
public ufbx_skin_deformer* AsSkinDeformer()
{ {
return Api.ufbx_as_skin_deformer((ufbx_element*)System.Runtime.CompilerServices.Unsafe.AsPointer(ref this)); return Api.ufbx_as_skin_deformer((ufbx_element*)System.Runtime.CompilerServices.Unsafe.AsPointer(ref this));
} }
// From: ufbx_as_skin_cluster(ufbx_element*) /// <summary>
public ufbx_skin_cluster* as_skin_cluster() /// From: <see cref="Api.ufbx_as_skin_cluster(ufbx_element*)" />
/// </summary>
[System.Runtime.CompilerServices.MethodImpl(System.Runtime.CompilerServices.MethodImplOptions.AggressiveInlining)]
public ufbx_skin_cluster* AsSkinCluster()
{ {
return Api.ufbx_as_skin_cluster((ufbx_element*)System.Runtime.CompilerServices.Unsafe.AsPointer(ref this)); return Api.ufbx_as_skin_cluster((ufbx_element*)System.Runtime.CompilerServices.Unsafe.AsPointer(ref this));
} }
// From: ufbx_as_blend_deformer(ufbx_element*) /// <summary>
public ufbx_blend_deformer* as_blend_deformer() /// From: <see cref="Api.ufbx_as_blend_deformer(ufbx_element*)" />
/// </summary>
[System.Runtime.CompilerServices.MethodImpl(System.Runtime.CompilerServices.MethodImplOptions.AggressiveInlining)]
public ufbx_blend_deformer* AsBlendDeformer()
{ {
return Api.ufbx_as_blend_deformer((ufbx_element*)System.Runtime.CompilerServices.Unsafe.AsPointer(ref this)); return Api.ufbx_as_blend_deformer((ufbx_element*)System.Runtime.CompilerServices.Unsafe.AsPointer(ref this));
} }
// From: ufbx_as_blend_channel(ufbx_element*) /// <summary>
public ufbx_blend_channel* as_blend_channel() /// From: <see cref="Api.ufbx_as_blend_channel(ufbx_element*)" />
/// </summary>
[System.Runtime.CompilerServices.MethodImpl(System.Runtime.CompilerServices.MethodImplOptions.AggressiveInlining)]
public ufbx_blend_channel* AsBlendChannel()
{ {
return Api.ufbx_as_blend_channel((ufbx_element*)System.Runtime.CompilerServices.Unsafe.AsPointer(ref this)); return Api.ufbx_as_blend_channel((ufbx_element*)System.Runtime.CompilerServices.Unsafe.AsPointer(ref this));
} }
// From: ufbx_as_blend_shape(ufbx_element*) /// <summary>
public ufbx_blend_shape* as_blend_shape() /// From: <see cref="Api.ufbx_as_blend_shape(ufbx_element*)" />
/// </summary>
[System.Runtime.CompilerServices.MethodImpl(System.Runtime.CompilerServices.MethodImplOptions.AggressiveInlining)]
public ufbx_blend_shape* AsBlendShape()
{ {
return Api.ufbx_as_blend_shape((ufbx_element*)System.Runtime.CompilerServices.Unsafe.AsPointer(ref this)); return Api.ufbx_as_blend_shape((ufbx_element*)System.Runtime.CompilerServices.Unsafe.AsPointer(ref this));
} }
// From: ufbx_as_cache_deformer(ufbx_element*) /// <summary>
public ufbx_cache_deformer* as_cache_deformer() /// From: <see cref="Api.ufbx_as_cache_deformer(ufbx_element*)" />
/// </summary>
[System.Runtime.CompilerServices.MethodImpl(System.Runtime.CompilerServices.MethodImplOptions.AggressiveInlining)]
public ufbx_cache_deformer* AsCacheDeformer()
{ {
return Api.ufbx_as_cache_deformer((ufbx_element*)System.Runtime.CompilerServices.Unsafe.AsPointer(ref this)); return Api.ufbx_as_cache_deformer((ufbx_element*)System.Runtime.CompilerServices.Unsafe.AsPointer(ref this));
} }
// From: ufbx_as_cache_file(ufbx_element*) /// <summary>
public ufbx_cache_file* as_cache_file() /// From: <see cref="Api.ufbx_as_cache_file(ufbx_element*)" />
/// </summary>
[System.Runtime.CompilerServices.MethodImpl(System.Runtime.CompilerServices.MethodImplOptions.AggressiveInlining)]
public ufbx_cache_file* AsCacheFile()
{ {
return Api.ufbx_as_cache_file((ufbx_element*)System.Runtime.CompilerServices.Unsafe.AsPointer(ref this)); return Api.ufbx_as_cache_file((ufbx_element*)System.Runtime.CompilerServices.Unsafe.AsPointer(ref this));
} }
// From: ufbx_as_material(ufbx_element*) /// <summary>
public ufbx_material* as_material() /// From: <see cref="Api.ufbx_as_material(ufbx_element*)" />
/// </summary>
[System.Runtime.CompilerServices.MethodImpl(System.Runtime.CompilerServices.MethodImplOptions.AggressiveInlining)]
public ufbx_material* AsMaterial()
{ {
return Api.ufbx_as_material((ufbx_element*)System.Runtime.CompilerServices.Unsafe.AsPointer(ref this)); return Api.ufbx_as_material((ufbx_element*)System.Runtime.CompilerServices.Unsafe.AsPointer(ref this));
} }
// From: ufbx_as_texture(ufbx_element*) /// <summary>
public ufbx_texture* as_texture() /// From: <see cref="Api.ufbx_as_texture(ufbx_element*)" />
/// </summary>
[System.Runtime.CompilerServices.MethodImpl(System.Runtime.CompilerServices.MethodImplOptions.AggressiveInlining)]
public ufbx_texture* AsTexture()
{ {
return Api.ufbx_as_texture((ufbx_element*)System.Runtime.CompilerServices.Unsafe.AsPointer(ref this)); return Api.ufbx_as_texture((ufbx_element*)System.Runtime.CompilerServices.Unsafe.AsPointer(ref this));
} }
// From: ufbx_as_video(ufbx_element*) /// <summary>
public ufbx_video* as_video() /// From: <see cref="Api.ufbx_as_video(ufbx_element*)" />
/// </summary>
[System.Runtime.CompilerServices.MethodImpl(System.Runtime.CompilerServices.MethodImplOptions.AggressiveInlining)]
public ufbx_video* AsVideo()
{ {
return Api.ufbx_as_video((ufbx_element*)System.Runtime.CompilerServices.Unsafe.AsPointer(ref this)); return Api.ufbx_as_video((ufbx_element*)System.Runtime.CompilerServices.Unsafe.AsPointer(ref this));
} }
// From: ufbx_as_shader(ufbx_element*) /// <summary>
public ufbx_shader* as_shader() /// From: <see cref="Api.ufbx_as_shader(ufbx_element*)" />
/// </summary>
[System.Runtime.CompilerServices.MethodImpl(System.Runtime.CompilerServices.MethodImplOptions.AggressiveInlining)]
public ufbx_shader* AsShader()
{ {
return Api.ufbx_as_shader((ufbx_element*)System.Runtime.CompilerServices.Unsafe.AsPointer(ref this)); return Api.ufbx_as_shader((ufbx_element*)System.Runtime.CompilerServices.Unsafe.AsPointer(ref this));
} }
// From: ufbx_as_shader_binding(ufbx_element*) /// <summary>
public ufbx_shader_binding* as_shader_binding() /// From: <see cref="Api.ufbx_as_shader_binding(ufbx_element*)" />
/// </summary>
[System.Runtime.CompilerServices.MethodImpl(System.Runtime.CompilerServices.MethodImplOptions.AggressiveInlining)]
public ufbx_shader_binding* AsShaderBinding()
{ {
return Api.ufbx_as_shader_binding((ufbx_element*)System.Runtime.CompilerServices.Unsafe.AsPointer(ref this)); return Api.ufbx_as_shader_binding((ufbx_element*)System.Runtime.CompilerServices.Unsafe.AsPointer(ref this));
} }
// From: ufbx_as_anim_stack(ufbx_element*) /// <summary>
public ufbx_anim_stack* as_anim_stack() /// From: <see cref="Api.ufbx_as_anim_stack(ufbx_element*)" />
/// </summary>
[System.Runtime.CompilerServices.MethodImpl(System.Runtime.CompilerServices.MethodImplOptions.AggressiveInlining)]
public ufbx_anim_stack* AsAnimStack()
{ {
return Api.ufbx_as_anim_stack((ufbx_element*)System.Runtime.CompilerServices.Unsafe.AsPointer(ref this)); return Api.ufbx_as_anim_stack((ufbx_element*)System.Runtime.CompilerServices.Unsafe.AsPointer(ref this));
} }
// From: ufbx_as_anim_layer(ufbx_element*) /// <summary>
public ufbx_anim_layer* as_anim_layer() /// From: <see cref="Api.ufbx_as_anim_layer(ufbx_element*)" />
/// </summary>
[System.Runtime.CompilerServices.MethodImpl(System.Runtime.CompilerServices.MethodImplOptions.AggressiveInlining)]
public ufbx_anim_layer* AsAnimLayer()
{ {
return Api.ufbx_as_anim_layer((ufbx_element*)System.Runtime.CompilerServices.Unsafe.AsPointer(ref this)); return Api.ufbx_as_anim_layer((ufbx_element*)System.Runtime.CompilerServices.Unsafe.AsPointer(ref this));
} }
// From: ufbx_as_anim_value(ufbx_element*) /// <summary>
public ufbx_anim_value* as_anim_value() /// From: <see cref="Api.ufbx_as_anim_value(ufbx_element*)" />
/// </summary>
[System.Runtime.CompilerServices.MethodImpl(System.Runtime.CompilerServices.MethodImplOptions.AggressiveInlining)]
public ufbx_anim_value* AsAnimValue()
{ {
return Api.ufbx_as_anim_value((ufbx_element*)System.Runtime.CompilerServices.Unsafe.AsPointer(ref this)); return Api.ufbx_as_anim_value((ufbx_element*)System.Runtime.CompilerServices.Unsafe.AsPointer(ref this));
} }
// From: ufbx_as_anim_curve(ufbx_element*) /// <summary>
public ufbx_anim_curve* as_anim_curve() /// From: <see cref="Api.ufbx_as_anim_curve(ufbx_element*)" />
/// </summary>
[System.Runtime.CompilerServices.MethodImpl(System.Runtime.CompilerServices.MethodImplOptions.AggressiveInlining)]
public ufbx_anim_curve* AsAnimCurve()
{ {
return Api.ufbx_as_anim_curve((ufbx_element*)System.Runtime.CompilerServices.Unsafe.AsPointer(ref this)); return Api.ufbx_as_anim_curve((ufbx_element*)System.Runtime.CompilerServices.Unsafe.AsPointer(ref this));
} }
// From: ufbx_as_display_layer(ufbx_element*) /// <summary>
public ufbx_display_layer* as_display_layer() /// From: <see cref="Api.ufbx_as_display_layer(ufbx_element*)" />
/// </summary>
[System.Runtime.CompilerServices.MethodImpl(System.Runtime.CompilerServices.MethodImplOptions.AggressiveInlining)]
public ufbx_display_layer* AsDisplayLayer()
{ {
return Api.ufbx_as_display_layer((ufbx_element*)System.Runtime.CompilerServices.Unsafe.AsPointer(ref this)); return Api.ufbx_as_display_layer((ufbx_element*)System.Runtime.CompilerServices.Unsafe.AsPointer(ref this));
} }
// From: ufbx_as_selection_set(ufbx_element*) /// <summary>
public ufbx_selection_set* as_selection_set() /// From: <see cref="Api.ufbx_as_selection_set(ufbx_element*)" />
/// </summary>
[System.Runtime.CompilerServices.MethodImpl(System.Runtime.CompilerServices.MethodImplOptions.AggressiveInlining)]
public ufbx_selection_set* AsSelectionSet()
{ {
return Api.ufbx_as_selection_set((ufbx_element*)System.Runtime.CompilerServices.Unsafe.AsPointer(ref this)); return Api.ufbx_as_selection_set((ufbx_element*)System.Runtime.CompilerServices.Unsafe.AsPointer(ref this));
} }
// From: ufbx_as_selection_node(ufbx_element*) /// <summary>
public ufbx_selection_node* as_selection_node() /// From: <see cref="Api.ufbx_as_selection_node(ufbx_element*)" />
/// </summary>
[System.Runtime.CompilerServices.MethodImpl(System.Runtime.CompilerServices.MethodImplOptions.AggressiveInlining)]
public ufbx_selection_node* AsSelectionNode()
{ {
return Api.ufbx_as_selection_node((ufbx_element*)System.Runtime.CompilerServices.Unsafe.AsPointer(ref this)); return Api.ufbx_as_selection_node((ufbx_element*)System.Runtime.CompilerServices.Unsafe.AsPointer(ref this));
} }
// From: ufbx_as_character(ufbx_element*) /// <summary>
public ufbx_character* as_character() /// From: <see cref="Api.ufbx_as_character(ufbx_element*)" />
/// </summary>
[System.Runtime.CompilerServices.MethodImpl(System.Runtime.CompilerServices.MethodImplOptions.AggressiveInlining)]
public ufbx_character* AsCharacter()
{ {
return Api.ufbx_as_character((ufbx_element*)System.Runtime.CompilerServices.Unsafe.AsPointer(ref this)); return Api.ufbx_as_character((ufbx_element*)System.Runtime.CompilerServices.Unsafe.AsPointer(ref this));
} }
// From: ufbx_as_constraint(ufbx_element*) /// <summary>
public ufbx_constraint* as_constraint() /// From: <see cref="Api.ufbx_as_constraint(ufbx_element*)" />
/// </summary>
[System.Runtime.CompilerServices.MethodImpl(System.Runtime.CompilerServices.MethodImplOptions.AggressiveInlining)]
public ufbx_constraint* AsConstraint()
{ {
return Api.ufbx_as_constraint((ufbx_element*)System.Runtime.CompilerServices.Unsafe.AsPointer(ref this)); return Api.ufbx_as_constraint((ufbx_element*)System.Runtime.CompilerServices.Unsafe.AsPointer(ref this));
} }
// From: ufbx_as_audio_layer(ufbx_element*) /// <summary>
public ufbx_audio_layer* as_audio_layer() /// From: <see cref="Api.ufbx_as_audio_layer(ufbx_element*)" />
/// </summary>
[System.Runtime.CompilerServices.MethodImpl(System.Runtime.CompilerServices.MethodImplOptions.AggressiveInlining)]
public ufbx_audio_layer* AsAudioLayer()
{ {
return Api.ufbx_as_audio_layer((ufbx_element*)System.Runtime.CompilerServices.Unsafe.AsPointer(ref this)); return Api.ufbx_as_audio_layer((ufbx_element*)System.Runtime.CompilerServices.Unsafe.AsPointer(ref this));
} }
// From: ufbx_as_audio_clip(ufbx_element*) /// <summary>
public ufbx_audio_clip* as_audio_clip() /// From: <see cref="Api.ufbx_as_audio_clip(ufbx_element*)" />
/// </summary>
[System.Runtime.CompilerServices.MethodImpl(System.Runtime.CompilerServices.MethodImplOptions.AggressiveInlining)]
public ufbx_audio_clip* AsAudioClip()
{ {
return Api.ufbx_as_audio_clip((ufbx_element*)System.Runtime.CompilerServices.Unsafe.AsPointer(ref this)); return Api.ufbx_as_audio_clip((ufbx_element*)System.Runtime.CompilerServices.Unsafe.AsPointer(ref this));
} }
// From: ufbx_as_pose(ufbx_element*) /// <summary>
public ufbx_pose* as_pose() /// From: <see cref="Api.ufbx_as_pose(ufbx_element*)" />
/// </summary>
[System.Runtime.CompilerServices.MethodImpl(System.Runtime.CompilerServices.MethodImplOptions.AggressiveInlining)]
public ufbx_pose* AsPose()
{ {
return Api.ufbx_as_pose((ufbx_element*)System.Runtime.CompilerServices.Unsafe.AsPointer(ref this)); return Api.ufbx_as_pose((ufbx_element*)System.Runtime.CompilerServices.Unsafe.AsPointer(ref this));
} }
// From: ufbx_as_metadata_object(ufbx_element*) /// <summary>
public ufbx_metadata_object* as_metadata_object() /// From: <see cref="Api.ufbx_as_metadata_object(ufbx_element*)" />
/// </summary>
[System.Runtime.CompilerServices.MethodImpl(System.Runtime.CompilerServices.MethodImplOptions.AggressiveInlining)]
public ufbx_metadata_object* AsMetadataObject()
{ {
return Api.ufbx_as_metadata_object((ufbx_element*)System.Runtime.CompilerServices.Unsafe.AsPointer(ref this)); return Api.ufbx_as_metadata_object((ufbx_element*)System.Runtime.CompilerServices.Unsafe.AsPointer(ref this));
} }

View File

@@ -2,14 +2,15 @@
// This file is generated by Ghost.NativeWrapperGen. Do not edit manually. // This file is generated by Ghost.NativeWrapperGen. Do not edit manually.
// </auto-generated> // </auto-generated>
using System.Runtime.CompilerServices;
namespace Ghost.Ufbx; namespace Ghost.Ufbx;
public unsafe partial struct ufbx_geometry_cache public unsafe partial struct ufbx_geometry_cache : System.IDisposable
{ {
// From: ufbx_load_geometry_cache(sbyte*, ufbx_geometry_cache_opts*, ufbx_error*) /// <summary>
public static ufbx_geometry_cache* load(sbyte* filename, ufbx_geometry_cache_opts* opts, ufbx_error* error) /// From: <see cref="Api.ufbx_load_geometry_cache(sbyte*, ufbx_geometry_cache_opts*, ufbx_error*)" />
/// </summary>
[System.Runtime.CompilerServices.MethodImpl(System.Runtime.CompilerServices.MethodImplOptions.AggressiveInlining)]
public static ufbx_geometry_cache* Load(sbyte* filename, ufbx_geometry_cache_opts* opts, ufbx_error* error)
{ {
return Api.ufbx_load_geometry_cache( return Api.ufbx_load_geometry_cache(
filename, filename,
@@ -17,8 +18,11 @@ public unsafe partial struct ufbx_geometry_cache
error); error);
} }
// From: ufbx_load_geometry_cache_len(sbyte*, nuint, ufbx_geometry_cache_opts*, ufbx_error*) /// <summary>
public static ufbx_geometry_cache* load_geometry_cache_len(ReadOnlySpan<byte> filename, ufbx_geometry_cache_opts* opts, ufbx_error* error) /// From: <see cref="Api.ufbx_load_geometry_cache_len(sbyte*, nuint, ufbx_geometry_cache_opts*, ufbx_error*)" />
/// </summary>
[System.Runtime.CompilerServices.MethodImpl(System.Runtime.CompilerServices.MethodImplOptions.AggressiveInlining)]
public static ufbx_geometry_cache* LoadLen(ReadOnlySpan<byte> filename, ufbx_geometry_cache_opts* opts, ufbx_error* error)
{ {
fixed (byte* pfilename = filename) fixed (byte* pfilename = filename)
{ {
@@ -30,14 +34,20 @@ public unsafe partial struct ufbx_geometry_cache
} }
} }
// From: ufbx_free_geometry_cache(ufbx_geometry_cache*) /// <summary>
public void free() /// From: <see cref="Api.ufbx_free_geometry_cache(ufbx_geometry_cache*)" />
/// </summary>
[System.Runtime.CompilerServices.MethodImpl(System.Runtime.CompilerServices.MethodImplOptions.AggressiveInlining)]
public void Dispose()
{ {
Api.ufbx_free_geometry_cache((ufbx_geometry_cache*)System.Runtime.CompilerServices.Unsafe.AsPointer(ref this)); Api.ufbx_free_geometry_cache((ufbx_geometry_cache*)System.Runtime.CompilerServices.Unsafe.AsPointer(ref this));
} }
// From: ufbx_retain_geometry_cache(ufbx_geometry_cache*) /// <summary>
public void retain() /// From: <see cref="Api.ufbx_retain_geometry_cache(ufbx_geometry_cache*)" />
/// </summary>
[System.Runtime.CompilerServices.MethodImpl(System.Runtime.CompilerServices.MethodImplOptions.AggressiveInlining)]
public void Retain()
{ {
Api.ufbx_retain_geometry_cache((ufbx_geometry_cache*)System.Runtime.CompilerServices.Unsafe.AsPointer(ref this)); Api.ufbx_retain_geometry_cache((ufbx_geometry_cache*)System.Runtime.CompilerServices.Unsafe.AsPointer(ref this));
} }

View File

@@ -2,20 +2,24 @@
// This file is generated by Ghost.NativeWrapperGen. Do not edit manually. // This file is generated by Ghost.NativeWrapperGen. Do not edit manually.
// </auto-generated> // </auto-generated>
using System.Runtime.CompilerServices;
namespace Ghost.Ufbx; namespace Ghost.Ufbx;
public unsafe partial struct ufbx_line_curve public unsafe partial struct ufbx_line_curve : System.IDisposable
{ {
// From: ufbx_free_line_curve(ufbx_line_curve*) /// <summary>
public void free() /// From: <see cref="Api.ufbx_free_line_curve(ufbx_line_curve*)" />
/// </summary>
[System.Runtime.CompilerServices.MethodImpl(System.Runtime.CompilerServices.MethodImplOptions.AggressiveInlining)]
public void Dispose()
{ {
Api.ufbx_free_line_curve((ufbx_line_curve*)System.Runtime.CompilerServices.Unsafe.AsPointer(ref this)); Api.ufbx_free_line_curve((ufbx_line_curve*)System.Runtime.CompilerServices.Unsafe.AsPointer(ref this));
} }
// From: ufbx_retain_line_curve(ufbx_line_curve*) /// <summary>
public void retain() /// From: <see cref="Api.ufbx_retain_line_curve(ufbx_line_curve*)" />
/// </summary>
[System.Runtime.CompilerServices.MethodImpl(System.Runtime.CompilerServices.MethodImplOptions.AggressiveInlining)]
public void Retain()
{ {
Api.ufbx_retain_line_curve((ufbx_line_curve*)System.Runtime.CompilerServices.Unsafe.AsPointer(ref this)); Api.ufbx_retain_line_curve((ufbx_line_curve*)System.Runtime.CompilerServices.Unsafe.AsPointer(ref this));
} }

View File

@@ -2,14 +2,15 @@
// This file is generated by Ghost.NativeWrapperGen. Do not edit manually. // This file is generated by Ghost.NativeWrapperGen. Do not edit manually.
// </auto-generated> // </auto-generated>
using System.Runtime.CompilerServices;
namespace Ghost.Ufbx; namespace Ghost.Ufbx;
public unsafe partial struct ufbx_material public unsafe partial struct ufbx_material
{ {
// From: ufbx_find_prop_texture_len(ufbx_material*, sbyte*, nuint) /// <summary>
public ufbx_texture* find_prop_texture_len(ReadOnlySpan<byte> name) /// From: <see cref="Api.ufbx_find_prop_texture_len(ufbx_material*, sbyte*, nuint)" />
/// </summary>
[System.Runtime.CompilerServices.MethodImpl(System.Runtime.CompilerServices.MethodImplOptions.AggressiveInlining)]
public ufbx_texture* FindPropTextureLen(ReadOnlySpan<byte> name)
{ {
fixed (byte* pname = name) fixed (byte* pname = name)
{ {
@@ -20,8 +21,11 @@ public unsafe partial struct ufbx_material
} }
} }
// From: ufbx_find_prop_texture(ufbx_material*, sbyte*) /// <summary>
public ufbx_texture* find_prop_texture(sbyte* name) /// From: <see cref="Api.ufbx_find_prop_texture(ufbx_material*, sbyte*)" />
/// </summary>
[System.Runtime.CompilerServices.MethodImpl(System.Runtime.CompilerServices.MethodImplOptions.AggressiveInlining)]
public ufbx_texture* FindPropTexture(sbyte* name)
{ {
return Api.ufbx_find_prop_texture( return Api.ufbx_find_prop_texture(
(ufbx_material*)System.Runtime.CompilerServices.Unsafe.AsPointer(ref this), (ufbx_material*)System.Runtime.CompilerServices.Unsafe.AsPointer(ref this),

View File

@@ -2,22 +2,26 @@
// This file is generated by Ghost.NativeWrapperGen. Do not edit manually. // This file is generated by Ghost.NativeWrapperGen. Do not edit manually.
// </auto-generated> // </auto-generated>
using System.Runtime.CompilerServices;
namespace Ghost.Ufbx; namespace Ghost.Ufbx;
public unsafe partial struct ufbx_mesh public unsafe partial struct ufbx_mesh : System.IDisposable
{ {
// From: ufbx_find_face_index(ufbx_mesh*, nuint) /// <summary>
public uint find_face_index(nuint index) /// From: <see cref="Api.ufbx_find_face_index(ufbx_mesh*, nuint)" />
/// </summary>
[System.Runtime.CompilerServices.MethodImpl(System.Runtime.CompilerServices.MethodImplOptions.AggressiveInlining)]
public uint FindFaceIndex(nuint index)
{ {
return Api.ufbx_find_face_index( return Api.ufbx_find_face_index(
(ufbx_mesh*)System.Runtime.CompilerServices.Unsafe.AsPointer(ref this), (ufbx_mesh*)System.Runtime.CompilerServices.Unsafe.AsPointer(ref this),
index); index);
} }
// From: ufbx_compute_topology(ufbx_mesh*, ufbx_topo_edge*, nuint) /// <summary>
public void compute_topology(ufbx_topo_edge* topo, nuint num_topo) /// From: <see cref="Api.ufbx_compute_topology(ufbx_mesh*, ufbx_topo_edge*, nuint)" />
/// </summary>
[System.Runtime.CompilerServices.MethodImpl(System.Runtime.CompilerServices.MethodImplOptions.AggressiveInlining)]
public void ComputeTopology(ufbx_topo_edge* topo, nuint num_topo)
{ {
Api.ufbx_compute_topology( Api.ufbx_compute_topology(
(ufbx_mesh*)System.Runtime.CompilerServices.Unsafe.AsPointer(ref this), (ufbx_mesh*)System.Runtime.CompilerServices.Unsafe.AsPointer(ref this),
@@ -25,8 +29,11 @@ public unsafe partial struct ufbx_mesh
num_topo); num_topo);
} }
// From: ufbx_generate_normal_mapping(ufbx_mesh*, ufbx_topo_edge*, nuint, uint*, nuint, bool) /// <summary>
public nuint generate_normal_mapping(ufbx_topo_edge* topo, nuint num_topo, uint* normal_indices, nuint num_normal_indices, bool assume_smooth) /// From: <see cref="Api.ufbx_generate_normal_mapping(ufbx_mesh*, ufbx_topo_edge*, nuint, uint*, nuint, bool)" />
/// </summary>
[System.Runtime.CompilerServices.MethodImpl(System.Runtime.CompilerServices.MethodImplOptions.AggressiveInlining)]
public nuint GenerateNormalMapping(ufbx_topo_edge* topo, nuint num_topo, uint* normal_indices, nuint num_normal_indices, bool assume_smooth)
{ {
return Api.ufbx_generate_normal_mapping( return Api.ufbx_generate_normal_mapping(
(ufbx_mesh*)System.Runtime.CompilerServices.Unsafe.AsPointer(ref this), (ufbx_mesh*)System.Runtime.CompilerServices.Unsafe.AsPointer(ref this),
@@ -37,8 +44,11 @@ public unsafe partial struct ufbx_mesh
assume_smooth); assume_smooth);
} }
// From: ufbx_compute_normals(ufbx_mesh*, ufbx_vertex_vec3*, uint*, nuint, Misaki.HighPerformance.Mathematics.float3*, nuint) /// <summary>
public void compute_normals(ufbx_vertex_vec3* positions, uint* normal_indices, nuint num_normal_indices, Misaki.HighPerformance.Mathematics.float3* normals, nuint num_normals) /// From: <see cref="Api.ufbx_compute_normals(ufbx_mesh*, ufbx_vertex_vec3*, uint*, nuint, Misaki.HighPerformance.Mathematics.float3*, nuint)" />
/// </summary>
[System.Runtime.CompilerServices.MethodImpl(System.Runtime.CompilerServices.MethodImplOptions.AggressiveInlining)]
public void ComputeNormals(ufbx_vertex_vec3* positions, uint* normal_indices, nuint num_normal_indices, Misaki.HighPerformance.Mathematics.float3* normals, nuint num_normals)
{ {
Api.ufbx_compute_normals( Api.ufbx_compute_normals(
(ufbx_mesh*)System.Runtime.CompilerServices.Unsafe.AsPointer(ref this), (ufbx_mesh*)System.Runtime.CompilerServices.Unsafe.AsPointer(ref this),
@@ -49,8 +59,11 @@ public unsafe partial struct ufbx_mesh
num_normals); num_normals);
} }
// From: ufbx_subdivide_mesh(ufbx_mesh*, nuint, ufbx_subdivide_opts*, ufbx_error*) /// <summary>
public ufbx_mesh* subdivide(nuint level, ufbx_subdivide_opts* opts, ufbx_error* error) /// From: <see cref="Api.ufbx_subdivide_mesh(ufbx_mesh*, nuint, ufbx_subdivide_opts*, ufbx_error*)" />
/// </summary>
[System.Runtime.CompilerServices.MethodImpl(System.Runtime.CompilerServices.MethodImplOptions.AggressiveInlining)]
public ufbx_mesh* Subdivide(nuint level, ufbx_subdivide_opts* opts, ufbx_error* error)
{ {
return Api.ufbx_subdivide_mesh( return Api.ufbx_subdivide_mesh(
(ufbx_mesh*)System.Runtime.CompilerServices.Unsafe.AsPointer(ref this), (ufbx_mesh*)System.Runtime.CompilerServices.Unsafe.AsPointer(ref this),
@@ -59,14 +72,20 @@ public unsafe partial struct ufbx_mesh
error); error);
} }
// From: ufbx_free_mesh(ufbx_mesh*) /// <summary>
public void free() /// From: <see cref="Api.ufbx_free_mesh(ufbx_mesh*)" />
/// </summary>
[System.Runtime.CompilerServices.MethodImpl(System.Runtime.CompilerServices.MethodImplOptions.AggressiveInlining)]
public void Dispose()
{ {
Api.ufbx_free_mesh((ufbx_mesh*)System.Runtime.CompilerServices.Unsafe.AsPointer(ref this)); Api.ufbx_free_mesh((ufbx_mesh*)System.Runtime.CompilerServices.Unsafe.AsPointer(ref this));
} }
// From: ufbx_retain_mesh(ufbx_mesh*) /// <summary>
public void retain() /// From: <see cref="Api.ufbx_retain_mesh(ufbx_mesh*)" />
/// </summary>
[System.Runtime.CompilerServices.MethodImpl(System.Runtime.CompilerServices.MethodImplOptions.AggressiveInlining)]
public void Retain()
{ {
Api.ufbx_retain_mesh((ufbx_mesh*)System.Runtime.CompilerServices.Unsafe.AsPointer(ref this)); Api.ufbx_retain_mesh((ufbx_mesh*)System.Runtime.CompilerServices.Unsafe.AsPointer(ref this));
} }

View File

@@ -2,14 +2,15 @@
// This file is generated by Ghost.NativeWrapperGen. Do not edit manually. // This file is generated by Ghost.NativeWrapperGen. Do not edit manually.
// </auto-generated> // </auto-generated>
using System.Runtime.CompilerServices;
namespace Ghost.Ufbx; namespace Ghost.Ufbx;
public unsafe partial struct ufbx_node public unsafe partial struct ufbx_node
{ {
// From: ufbx_get_compatible_matrix_for_normals(ufbx_node*) /// <summary>
public Misaki.HighPerformance.Mathematics.float3x4 get_compatible_matrix_for_normals() /// From: <see cref="Api.ufbx_get_compatible_matrix_for_normals(ufbx_node*)" />
/// </summary>
[System.Runtime.CompilerServices.MethodImpl(System.Runtime.CompilerServices.MethodImplOptions.AggressiveInlining)]
public Misaki.HighPerformance.Mathematics.float3x4 GetCompatibleMatrixForNormals()
{ {
return Api.ufbx_get_compatible_matrix_for_normals((ufbx_node*)System.Runtime.CompilerServices.Unsafe.AsPointer(ref this)); return Api.ufbx_get_compatible_matrix_for_normals((ufbx_node*)System.Runtime.CompilerServices.Unsafe.AsPointer(ref this));
} }

View File

@@ -2,14 +2,15 @@
// This file is generated by Ghost.NativeWrapperGen. Do not edit manually. // This file is generated by Ghost.NativeWrapperGen. Do not edit manually.
// </auto-generated> // </auto-generated>
using System.Runtime.CompilerServices;
namespace Ghost.Ufbx; namespace Ghost.Ufbx;
public unsafe partial struct ufbx_nurbs_basis public unsafe partial struct ufbx_nurbs_basis
{ {
// From: ufbx_evaluate_nurbs_basis(ufbx_nurbs_basis*, float, float*, nuint, float*, nuint) /// <summary>
public nuint evaluate(float u, float* weights, nuint num_weights, float* derivatives, nuint num_derivatives) /// From: <see cref="Api.ufbx_evaluate_nurbs_basis(ufbx_nurbs_basis*, float, float*, nuint, float*, nuint)" />
/// </summary>
[System.Runtime.CompilerServices.MethodImpl(System.Runtime.CompilerServices.MethodImplOptions.AggressiveInlining)]
public nuint Evaluate(float u, float* weights, nuint num_weights, float* derivatives, nuint num_derivatives)
{ {
return Api.ufbx_evaluate_nurbs_basis( return Api.ufbx_evaluate_nurbs_basis(
(ufbx_nurbs_basis*)System.Runtime.CompilerServices.Unsafe.AsPointer(ref this), (ufbx_nurbs_basis*)System.Runtime.CompilerServices.Unsafe.AsPointer(ref this),

View File

@@ -2,22 +2,26 @@
// This file is generated by Ghost.NativeWrapperGen. Do not edit manually. // This file is generated by Ghost.NativeWrapperGen. Do not edit manually.
// </auto-generated> // </auto-generated>
using System.Runtime.CompilerServices;
namespace Ghost.Ufbx; namespace Ghost.Ufbx;
public unsafe partial struct ufbx_nurbs_curve public unsafe partial struct ufbx_nurbs_curve
{ {
// From: ufbx_evaluate_nurbs_curve(ufbx_nurbs_curve*, float) /// <summary>
public ufbx_curve_point evaluate(float u) /// From: <see cref="Api.ufbx_evaluate_nurbs_curve(ufbx_nurbs_curve*, float)" />
/// </summary>
[System.Runtime.CompilerServices.MethodImpl(System.Runtime.CompilerServices.MethodImplOptions.AggressiveInlining)]
public ufbx_curve_point Evaluate(float u)
{ {
return Api.ufbx_evaluate_nurbs_curve( return Api.ufbx_evaluate_nurbs_curve(
(ufbx_nurbs_curve*)System.Runtime.CompilerServices.Unsafe.AsPointer(ref this), (ufbx_nurbs_curve*)System.Runtime.CompilerServices.Unsafe.AsPointer(ref this),
u); u);
} }
// From: ufbx_tessellate_nurbs_curve(ufbx_nurbs_curve*, ufbx_tessellate_curve_opts*, ufbx_error*) /// <summary>
public ufbx_line_curve* tessellate(ufbx_tessellate_curve_opts* opts, ufbx_error* error) /// From: <see cref="Api.ufbx_tessellate_nurbs_curve(ufbx_nurbs_curve*, ufbx_tessellate_curve_opts*, ufbx_error*)" />
/// </summary>
[System.Runtime.CompilerServices.MethodImpl(System.Runtime.CompilerServices.MethodImplOptions.AggressiveInlining)]
public ufbx_line_curve* Tessellate(ufbx_tessellate_curve_opts* opts, ufbx_error* error)
{ {
return Api.ufbx_tessellate_nurbs_curve( return Api.ufbx_tessellate_nurbs_curve(
(ufbx_nurbs_curve*)System.Runtime.CompilerServices.Unsafe.AsPointer(ref this), (ufbx_nurbs_curve*)System.Runtime.CompilerServices.Unsafe.AsPointer(ref this),

View File

@@ -2,14 +2,15 @@
// This file is generated by Ghost.NativeWrapperGen. Do not edit manually. // This file is generated by Ghost.NativeWrapperGen. Do not edit manually.
// </auto-generated> // </auto-generated>
using System.Runtime.CompilerServices;
namespace Ghost.Ufbx; namespace Ghost.Ufbx;
public unsafe partial struct ufbx_nurbs_surface public unsafe partial struct ufbx_nurbs_surface
{ {
// From: ufbx_evaluate_nurbs_surface(ufbx_nurbs_surface*, float, float) /// <summary>
public ufbx_surface_point evaluate(float u, float v) /// From: <see cref="Api.ufbx_evaluate_nurbs_surface(ufbx_nurbs_surface*, float, float)" />
/// </summary>
[System.Runtime.CompilerServices.MethodImpl(System.Runtime.CompilerServices.MethodImplOptions.AggressiveInlining)]
public ufbx_surface_point Evaluate(float u, float v)
{ {
return Api.ufbx_evaluate_nurbs_surface( return Api.ufbx_evaluate_nurbs_surface(
(ufbx_nurbs_surface*)System.Runtime.CompilerServices.Unsafe.AsPointer(ref this), (ufbx_nurbs_surface*)System.Runtime.CompilerServices.Unsafe.AsPointer(ref this),
@@ -17,8 +18,11 @@ public unsafe partial struct ufbx_nurbs_surface
v); v);
} }
// From: ufbx_tessellate_nurbs_surface(ufbx_nurbs_surface*, ufbx_tessellate_surface_opts*, ufbx_error*) /// <summary>
public ufbx_mesh* tessellate(ufbx_tessellate_surface_opts* opts, ufbx_error* error) /// From: <see cref="Api.ufbx_tessellate_nurbs_surface(ufbx_nurbs_surface*, ufbx_tessellate_surface_opts*, ufbx_error*)" />
/// </summary>
[System.Runtime.CompilerServices.MethodImpl(System.Runtime.CompilerServices.MethodImplOptions.AggressiveInlining)]
public ufbx_mesh* Tessellate(ufbx_tessellate_surface_opts* opts, ufbx_error* error)
{ {
return Api.ufbx_tessellate_nurbs_surface( return Api.ufbx_tessellate_nurbs_surface(
(ufbx_nurbs_surface*)System.Runtime.CompilerServices.Unsafe.AsPointer(ref this), (ufbx_nurbs_surface*)System.Runtime.CompilerServices.Unsafe.AsPointer(ref this),

View File

@@ -2,14 +2,15 @@
// This file is generated by Ghost.NativeWrapperGen. Do not edit manually. // This file is generated by Ghost.NativeWrapperGen. Do not edit manually.
// </auto-generated> // </auto-generated>
using System.Runtime.CompilerServices;
namespace Ghost.Ufbx; namespace Ghost.Ufbx;
public unsafe partial struct ufbx_panic public unsafe partial struct ufbx_panic
{ {
// From: ufbx_catch_get_skin_vertex_matrix(ufbx_panic*, ufbx_skin_deformer*, nuint, Misaki.HighPerformance.Mathematics.float3x4*) /// <summary>
public Misaki.HighPerformance.Mathematics.float3x4 catch_get_skin_vertex_matrix(ufbx_skin_deformer* skin, nuint vertex, Misaki.HighPerformance.Mathematics.float3x4* fallback) /// From: <see cref="Api.ufbx_catch_get_skin_vertex_matrix(ufbx_panic*, ufbx_skin_deformer*, nuint, Misaki.HighPerformance.Mathematics.float3x4*)" />
/// </summary>
[System.Runtime.CompilerServices.MethodImpl(System.Runtime.CompilerServices.MethodImplOptions.AggressiveInlining)]
public Misaki.HighPerformance.Mathematics.float3x4 CatchGetSkinVertexMatrix(ufbx_skin_deformer* skin, nuint vertex, Misaki.HighPerformance.Mathematics.float3x4* fallback)
{ {
return Api.ufbx_catch_get_skin_vertex_matrix( return Api.ufbx_catch_get_skin_vertex_matrix(
(ufbx_panic*)System.Runtime.CompilerServices.Unsafe.AsPointer(ref this), (ufbx_panic*)System.Runtime.CompilerServices.Unsafe.AsPointer(ref this),
@@ -18,8 +19,11 @@ public unsafe partial struct ufbx_panic
fallback); fallback);
} }
// From: ufbx_catch_triangulate_face(ufbx_panic*, uint*, nuint, ufbx_mesh*, ufbx_face) /// <summary>
public uint catch_triangulate_face(uint* indices, nuint num_indices, ufbx_mesh* mesh, ufbx_face face) /// From: <see cref="Api.ufbx_catch_triangulate_face(ufbx_panic*, uint*, nuint, ufbx_mesh*, ufbx_face)" />
/// </summary>
[System.Runtime.CompilerServices.MethodImpl(System.Runtime.CompilerServices.MethodImplOptions.AggressiveInlining)]
public uint CatchTriangulateFace(uint* indices, nuint num_indices, ufbx_mesh* mesh, ufbx_face face)
{ {
return Api.ufbx_catch_triangulate_face( return Api.ufbx_catch_triangulate_face(
(ufbx_panic*)System.Runtime.CompilerServices.Unsafe.AsPointer(ref this), (ufbx_panic*)System.Runtime.CompilerServices.Unsafe.AsPointer(ref this),
@@ -29,8 +33,11 @@ public unsafe partial struct ufbx_panic
face); face);
} }
// From: ufbx_catch_compute_topology(ufbx_panic*, ufbx_mesh*, ufbx_topo_edge*, nuint) /// <summary>
public void catch_compute_topology(ufbx_mesh* mesh, ufbx_topo_edge* topo, nuint num_topo) /// From: <see cref="Api.ufbx_catch_compute_topology(ufbx_panic*, ufbx_mesh*, ufbx_topo_edge*, nuint)" />
/// </summary>
[System.Runtime.CompilerServices.MethodImpl(System.Runtime.CompilerServices.MethodImplOptions.AggressiveInlining)]
public void CatchComputeTopology(ufbx_mesh* mesh, ufbx_topo_edge* topo, nuint num_topo)
{ {
Api.ufbx_catch_compute_topology( Api.ufbx_catch_compute_topology(
(ufbx_panic*)System.Runtime.CompilerServices.Unsafe.AsPointer(ref this), (ufbx_panic*)System.Runtime.CompilerServices.Unsafe.AsPointer(ref this),
@@ -39,8 +46,11 @@ public unsafe partial struct ufbx_panic
num_topo); num_topo);
} }
// From: ufbx_catch_topo_next_vertex_edge(ufbx_panic*, ufbx_topo_edge*, nuint, uint) /// <summary>
public uint catch_topo_next_vertex_edge(ufbx_topo_edge* topo, nuint num_topo, uint index) /// From: <see cref="Api.ufbx_catch_topo_next_vertex_edge(ufbx_panic*, ufbx_topo_edge*, nuint, uint)" />
/// </summary>
[System.Runtime.CompilerServices.MethodImpl(System.Runtime.CompilerServices.MethodImplOptions.AggressiveInlining)]
public uint CatchTopoNextVertexEdge(ufbx_topo_edge* topo, nuint num_topo, uint index)
{ {
return Api.ufbx_catch_topo_next_vertex_edge( return Api.ufbx_catch_topo_next_vertex_edge(
(ufbx_panic*)System.Runtime.CompilerServices.Unsafe.AsPointer(ref this), (ufbx_panic*)System.Runtime.CompilerServices.Unsafe.AsPointer(ref this),
@@ -49,8 +59,11 @@ public unsafe partial struct ufbx_panic
index); index);
} }
// From: ufbx_catch_topo_prev_vertex_edge(ufbx_panic*, ufbx_topo_edge*, nuint, uint) /// <summary>
public uint catch_topo_prev_vertex_edge(ufbx_topo_edge* topo, nuint num_topo, uint index) /// From: <see cref="Api.ufbx_catch_topo_prev_vertex_edge(ufbx_panic*, ufbx_topo_edge*, nuint, uint)" />
/// </summary>
[System.Runtime.CompilerServices.MethodImpl(System.Runtime.CompilerServices.MethodImplOptions.AggressiveInlining)]
public uint CatchTopoPrevVertexEdge(ufbx_topo_edge* topo, nuint num_topo, uint index)
{ {
return Api.ufbx_catch_topo_prev_vertex_edge( return Api.ufbx_catch_topo_prev_vertex_edge(
(ufbx_panic*)System.Runtime.CompilerServices.Unsafe.AsPointer(ref this), (ufbx_panic*)System.Runtime.CompilerServices.Unsafe.AsPointer(ref this),
@@ -59,8 +72,11 @@ public unsafe partial struct ufbx_panic
index); index);
} }
// From: ufbx_catch_get_weighted_face_normal(ufbx_panic*, ufbx_vertex_vec3*, ufbx_face) /// <summary>
public Misaki.HighPerformance.Mathematics.float3 catch_get_weighted_face_normal(ufbx_vertex_vec3* positions, ufbx_face face) /// From: <see cref="Api.ufbx_catch_get_weighted_face_normal(ufbx_panic*, ufbx_vertex_vec3*, ufbx_face)" />
/// </summary>
[System.Runtime.CompilerServices.MethodImpl(System.Runtime.CompilerServices.MethodImplOptions.AggressiveInlining)]
public Misaki.HighPerformance.Mathematics.float3 CatchGetWeightedFaceNormal(ufbx_vertex_vec3* positions, ufbx_face face)
{ {
return Api.ufbx_catch_get_weighted_face_normal( return Api.ufbx_catch_get_weighted_face_normal(
(ufbx_panic*)System.Runtime.CompilerServices.Unsafe.AsPointer(ref this), (ufbx_panic*)System.Runtime.CompilerServices.Unsafe.AsPointer(ref this),
@@ -68,8 +84,11 @@ public unsafe partial struct ufbx_panic
face); face);
} }
// From: ufbx_catch_generate_normal_mapping(ufbx_panic*, ufbx_mesh*, ufbx_topo_edge*, nuint, uint*, nuint, bool) /// <summary>
public nuint catch_generate_normal_mapping(ufbx_mesh* mesh, ufbx_topo_edge* topo, nuint num_topo, uint* normal_indices, nuint num_normal_indices, bool assume_smooth) /// From: <see cref="Api.ufbx_catch_generate_normal_mapping(ufbx_panic*, ufbx_mesh*, ufbx_topo_edge*, nuint, uint*, nuint, bool)" />
/// </summary>
[System.Runtime.CompilerServices.MethodImpl(System.Runtime.CompilerServices.MethodImplOptions.AggressiveInlining)]
public nuint CatchGenerateNormalMapping(ufbx_mesh* mesh, ufbx_topo_edge* topo, nuint num_topo, uint* normal_indices, nuint num_normal_indices, bool assume_smooth)
{ {
return Api.ufbx_catch_generate_normal_mapping( return Api.ufbx_catch_generate_normal_mapping(
(ufbx_panic*)System.Runtime.CompilerServices.Unsafe.AsPointer(ref this), (ufbx_panic*)System.Runtime.CompilerServices.Unsafe.AsPointer(ref this),
@@ -81,8 +100,11 @@ public unsafe partial struct ufbx_panic
assume_smooth); assume_smooth);
} }
// From: ufbx_catch_compute_normals(ufbx_panic*, ufbx_mesh*, ufbx_vertex_vec3*, uint*, nuint, Misaki.HighPerformance.Mathematics.float3*, nuint) /// <summary>
public void catch_compute_normals(ufbx_mesh* mesh, ufbx_vertex_vec3* positions, uint* normal_indices, nuint num_normal_indices, Misaki.HighPerformance.Mathematics.float3* normals, nuint num_normals) /// From: <see cref="Api.ufbx_catch_compute_normals(ufbx_panic*, ufbx_mesh*, ufbx_vertex_vec3*, uint*, nuint, Misaki.HighPerformance.Mathematics.float3*, nuint)" />
/// </summary>
[System.Runtime.CompilerServices.MethodImpl(System.Runtime.CompilerServices.MethodImplOptions.AggressiveInlining)]
public void CatchComputeNormals(ufbx_mesh* mesh, ufbx_vertex_vec3* positions, uint* normal_indices, nuint num_normal_indices, Misaki.HighPerformance.Mathematics.float3* normals, nuint num_normals)
{ {
Api.ufbx_catch_compute_normals( Api.ufbx_catch_compute_normals(
(ufbx_panic*)System.Runtime.CompilerServices.Unsafe.AsPointer(ref this), (ufbx_panic*)System.Runtime.CompilerServices.Unsafe.AsPointer(ref this),
@@ -94,8 +116,11 @@ public unsafe partial struct ufbx_panic
num_normals); num_normals);
} }
// From: ufbx_catch_get_vertex_real(ufbx_panic*, ufbx_vertex_real*, nuint) /// <summary>
public float catch_get_vertex_real(ufbx_vertex_real* v, nuint index) /// From: <see cref="Api.ufbx_catch_get_vertex_real(ufbx_panic*, ufbx_vertex_real*, nuint)" />
/// </summary>
[System.Runtime.CompilerServices.MethodImpl(System.Runtime.CompilerServices.MethodImplOptions.AggressiveInlining)]
public float CatchGetVertexReal(ufbx_vertex_real* v, nuint index)
{ {
return Api.ufbx_catch_get_vertex_real( return Api.ufbx_catch_get_vertex_real(
(ufbx_panic*)System.Runtime.CompilerServices.Unsafe.AsPointer(ref this), (ufbx_panic*)System.Runtime.CompilerServices.Unsafe.AsPointer(ref this),
@@ -103,8 +128,11 @@ public unsafe partial struct ufbx_panic
index); index);
} }
// From: ufbx_catch_get_vertex_vec2(ufbx_panic*, ufbx_vertex_vec2*, nuint) /// <summary>
public Misaki.HighPerformance.Mathematics.float2 catch_get_vertex_vec2(ufbx_vertex_vec2* v, nuint index) /// From: <see cref="Api.ufbx_catch_get_vertex_vec2(ufbx_panic*, ufbx_vertex_vec2*, nuint)" />
/// </summary>
[System.Runtime.CompilerServices.MethodImpl(System.Runtime.CompilerServices.MethodImplOptions.AggressiveInlining)]
public Misaki.HighPerformance.Mathematics.float2 CatchGetVertexVec2(ufbx_vertex_vec2* v, nuint index)
{ {
return Api.ufbx_catch_get_vertex_vec2( return Api.ufbx_catch_get_vertex_vec2(
(ufbx_panic*)System.Runtime.CompilerServices.Unsafe.AsPointer(ref this), (ufbx_panic*)System.Runtime.CompilerServices.Unsafe.AsPointer(ref this),
@@ -112,8 +140,11 @@ public unsafe partial struct ufbx_panic
index); index);
} }
// From: ufbx_catch_get_vertex_vec3(ufbx_panic*, ufbx_vertex_vec3*, nuint) /// <summary>
public Misaki.HighPerformance.Mathematics.float3 catch_get_vertex_vec3(ufbx_vertex_vec3* v, nuint index) /// From: <see cref="Api.ufbx_catch_get_vertex_vec3(ufbx_panic*, ufbx_vertex_vec3*, nuint)" />
/// </summary>
[System.Runtime.CompilerServices.MethodImpl(System.Runtime.CompilerServices.MethodImplOptions.AggressiveInlining)]
public Misaki.HighPerformance.Mathematics.float3 CatchGetVertexVec3(ufbx_vertex_vec3* v, nuint index)
{ {
return Api.ufbx_catch_get_vertex_vec3( return Api.ufbx_catch_get_vertex_vec3(
(ufbx_panic*)System.Runtime.CompilerServices.Unsafe.AsPointer(ref this), (ufbx_panic*)System.Runtime.CompilerServices.Unsafe.AsPointer(ref this),
@@ -121,8 +152,11 @@ public unsafe partial struct ufbx_panic
index); index);
} }
// From: ufbx_catch_get_vertex_vec4(ufbx_panic*, ufbx_vertex_vec4*, nuint) /// <summary>
public Misaki.HighPerformance.Mathematics.float4 catch_get_vertex_vec4(ufbx_vertex_vec4* v, nuint index) /// From: <see cref="Api.ufbx_catch_get_vertex_vec4(ufbx_panic*, ufbx_vertex_vec4*, nuint)" />
/// </summary>
[System.Runtime.CompilerServices.MethodImpl(System.Runtime.CompilerServices.MethodImplOptions.AggressiveInlining)]
public Misaki.HighPerformance.Mathematics.float4 CatchGetVertexVec4(ufbx_vertex_vec4* v, nuint index)
{ {
return Api.ufbx_catch_get_vertex_vec4( return Api.ufbx_catch_get_vertex_vec4(
(ufbx_panic*)System.Runtime.CompilerServices.Unsafe.AsPointer(ref this), (ufbx_panic*)System.Runtime.CompilerServices.Unsafe.AsPointer(ref this),
@@ -130,8 +164,11 @@ public unsafe partial struct ufbx_panic
index); index);
} }
// From: ufbx_catch_get_vertex_w_vec3(ufbx_panic*, ufbx_vertex_vec3*, nuint) /// <summary>
public float catch_get_vertex_w_vec3(ufbx_vertex_vec3* v, nuint index) /// From: <see cref="Api.ufbx_catch_get_vertex_w_vec3(ufbx_panic*, ufbx_vertex_vec3*, nuint)" />
/// </summary>
[System.Runtime.CompilerServices.MethodImpl(System.Runtime.CompilerServices.MethodImplOptions.AggressiveInlining)]
public float CatchGetVertexWVec3(ufbx_vertex_vec3* v, nuint index)
{ {
return Api.ufbx_catch_get_vertex_w_vec3( return Api.ufbx_catch_get_vertex_w_vec3(
(ufbx_panic*)System.Runtime.CompilerServices.Unsafe.AsPointer(ref this), (ufbx_panic*)System.Runtime.CompilerServices.Unsafe.AsPointer(ref this),

View File

@@ -2,14 +2,15 @@
// This file is generated by Ghost.NativeWrapperGen. Do not edit manually. // This file is generated by Ghost.NativeWrapperGen. Do not edit manually.
// </auto-generated> // </auto-generated>
using System.Runtime.CompilerServices;
namespace Ghost.Ufbx; namespace Ghost.Ufbx;
public unsafe partial struct ufbx_pose public unsafe partial struct ufbx_pose
{ {
// From: ufbx_get_bone_pose(ufbx_pose*, ufbx_node*) /// <summary>
public ufbx_bone_pose* get_bone(ufbx_node* node) /// From: <see cref="Api.ufbx_get_bone_pose(ufbx_pose*, ufbx_node*)" />
/// </summary>
[System.Runtime.CompilerServices.MethodImpl(System.Runtime.CompilerServices.MethodImplOptions.AggressiveInlining)]
public ufbx_bone_pose* GetBone(ufbx_node* node)
{ {
return Api.ufbx_get_bone_pose( return Api.ufbx_get_bone_pose(
(ufbx_pose*)System.Runtime.CompilerServices.Unsafe.AsPointer(ref this), (ufbx_pose*)System.Runtime.CompilerServices.Unsafe.AsPointer(ref this),

View File

@@ -2,14 +2,15 @@
// This file is generated by Ghost.NativeWrapperGen. Do not edit manually. // This file is generated by Ghost.NativeWrapperGen. Do not edit manually.
// </auto-generated> // </auto-generated>
using System.Runtime.CompilerServices;
namespace Ghost.Ufbx; namespace Ghost.Ufbx;
public unsafe partial struct ufbx_props public unsafe partial struct ufbx_props
{ {
// From: ufbx_find_prop_len(ufbx_props*, sbyte*, nuint) /// <summary>
public ufbx_prop* find_prop_len(ReadOnlySpan<byte> name) /// From: <see cref="Api.ufbx_find_prop_len(ufbx_props*, sbyte*, nuint)" />
/// </summary>
[System.Runtime.CompilerServices.MethodImpl(System.Runtime.CompilerServices.MethodImplOptions.AggressiveInlining)]
public ufbx_prop* FindPropLen(ReadOnlySpan<byte> name)
{ {
fixed (byte* pname = name) fixed (byte* pname = name)
{ {
@@ -20,16 +21,22 @@ public unsafe partial struct ufbx_props
} }
} }
// From: ufbx_find_prop(ufbx_props*, sbyte*) /// <summary>
public ufbx_prop* find_prop(sbyte* name) /// From: <see cref="Api.ufbx_find_prop(ufbx_props*, sbyte*)" />
/// </summary>
[System.Runtime.CompilerServices.MethodImpl(System.Runtime.CompilerServices.MethodImplOptions.AggressiveInlining)]
public ufbx_prop* FindProp(sbyte* name)
{ {
return Api.ufbx_find_prop( return Api.ufbx_find_prop(
(ufbx_props*)System.Runtime.CompilerServices.Unsafe.AsPointer(ref this), (ufbx_props*)System.Runtime.CompilerServices.Unsafe.AsPointer(ref this),
name); name);
} }
// From: ufbx_find_real_len(ufbx_props*, sbyte*, nuint, float) /// <summary>
public float find_real_len(ReadOnlySpan<byte> name, float def) /// From: <see cref="Api.ufbx_find_real_len(ufbx_props*, sbyte*, nuint, float)" />
/// </summary>
[System.Runtime.CompilerServices.MethodImpl(System.Runtime.CompilerServices.MethodImplOptions.AggressiveInlining)]
public float FindRealLen(ReadOnlySpan<byte> name, float def)
{ {
fixed (byte* pname = name) fixed (byte* pname = name)
{ {
@@ -41,8 +48,11 @@ public unsafe partial struct ufbx_props
} }
} }
// From: ufbx_find_real(ufbx_props*, sbyte*, float) /// <summary>
public float find_real(sbyte* name, float def) /// From: <see cref="Api.ufbx_find_real(ufbx_props*, sbyte*, float)" />
/// </summary>
[System.Runtime.CompilerServices.MethodImpl(System.Runtime.CompilerServices.MethodImplOptions.AggressiveInlining)]
public float FindReal(sbyte* name, float def)
{ {
return Api.ufbx_find_real( return Api.ufbx_find_real(
(ufbx_props*)System.Runtime.CompilerServices.Unsafe.AsPointer(ref this), (ufbx_props*)System.Runtime.CompilerServices.Unsafe.AsPointer(ref this),
@@ -50,8 +60,11 @@ public unsafe partial struct ufbx_props
def); def);
} }
// From: ufbx_find_vec3_len(ufbx_props*, sbyte*, nuint, Misaki.HighPerformance.Mathematics.float3) /// <summary>
public Misaki.HighPerformance.Mathematics.float3 find_vec3_len(ReadOnlySpan<byte> name, Misaki.HighPerformance.Mathematics.float3 def) /// From: <see cref="Api.ufbx_find_vec3_len(ufbx_props*, sbyte*, nuint, Misaki.HighPerformance.Mathematics.float3)" />
/// </summary>
[System.Runtime.CompilerServices.MethodImpl(System.Runtime.CompilerServices.MethodImplOptions.AggressiveInlining)]
public Misaki.HighPerformance.Mathematics.float3 FindVec3Len(ReadOnlySpan<byte> name, Misaki.HighPerformance.Mathematics.float3 def)
{ {
fixed (byte* pname = name) fixed (byte* pname = name)
{ {
@@ -63,8 +76,11 @@ public unsafe partial struct ufbx_props
} }
} }
// From: ufbx_find_vec3(ufbx_props*, sbyte*, Misaki.HighPerformance.Mathematics.float3) /// <summary>
public Misaki.HighPerformance.Mathematics.float3 find_vec3(sbyte* name, Misaki.HighPerformance.Mathematics.float3 def) /// From: <see cref="Api.ufbx_find_vec3(ufbx_props*, sbyte*, Misaki.HighPerformance.Mathematics.float3)" />
/// </summary>
[System.Runtime.CompilerServices.MethodImpl(System.Runtime.CompilerServices.MethodImplOptions.AggressiveInlining)]
public Misaki.HighPerformance.Mathematics.float3 FindVec3(sbyte* name, Misaki.HighPerformance.Mathematics.float3 def)
{ {
return Api.ufbx_find_vec3( return Api.ufbx_find_vec3(
(ufbx_props*)System.Runtime.CompilerServices.Unsafe.AsPointer(ref this), (ufbx_props*)System.Runtime.CompilerServices.Unsafe.AsPointer(ref this),
@@ -72,8 +88,11 @@ public unsafe partial struct ufbx_props
def); def);
} }
// From: ufbx_find_int_len(ufbx_props*, sbyte*, nuint, long) /// <summary>
public long find_int_len(ReadOnlySpan<byte> name, long def) /// From: <see cref="Api.ufbx_find_int_len(ufbx_props*, sbyte*, nuint, long)" />
/// </summary>
[System.Runtime.CompilerServices.MethodImpl(System.Runtime.CompilerServices.MethodImplOptions.AggressiveInlining)]
public long FindIntLen(ReadOnlySpan<byte> name, long def)
{ {
fixed (byte* pname = name) fixed (byte* pname = name)
{ {
@@ -85,8 +104,11 @@ public unsafe partial struct ufbx_props
} }
} }
// From: ufbx_find_int(ufbx_props*, sbyte*, long) /// <summary>
public long find_int(sbyte* name, long def) /// From: <see cref="Api.ufbx_find_int(ufbx_props*, sbyte*, long)" />
/// </summary>
[System.Runtime.CompilerServices.MethodImpl(System.Runtime.CompilerServices.MethodImplOptions.AggressiveInlining)]
public long FindInt(sbyte* name, long def)
{ {
return Api.ufbx_find_int( return Api.ufbx_find_int(
(ufbx_props*)System.Runtime.CompilerServices.Unsafe.AsPointer(ref this), (ufbx_props*)System.Runtime.CompilerServices.Unsafe.AsPointer(ref this),
@@ -94,8 +116,11 @@ public unsafe partial struct ufbx_props
def); def);
} }
// From: ufbx_find_bool_len(ufbx_props*, sbyte*, nuint, bool) /// <summary>
public bool find_bool_len(ReadOnlySpan<byte> name, bool def) /// From: <see cref="Api.ufbx_find_bool_len(ufbx_props*, sbyte*, nuint, bool)" />
/// </summary>
[System.Runtime.CompilerServices.MethodImpl(System.Runtime.CompilerServices.MethodImplOptions.AggressiveInlining)]
public bool FindBoolLen(ReadOnlySpan<byte> name, bool def)
{ {
fixed (byte* pname = name) fixed (byte* pname = name)
{ {
@@ -107,8 +132,11 @@ public unsafe partial struct ufbx_props
} }
} }
// From: ufbx_find_bool(ufbx_props*, sbyte*, bool) /// <summary>
public bool find_bool(sbyte* name, bool def) /// From: <see cref="Api.ufbx_find_bool(ufbx_props*, sbyte*, bool)" />
/// </summary>
[System.Runtime.CompilerServices.MethodImpl(System.Runtime.CompilerServices.MethodImplOptions.AggressiveInlining)]
public bool FindBool(sbyte* name, bool def)
{ {
return Api.ufbx_find_bool( return Api.ufbx_find_bool(
(ufbx_props*)System.Runtime.CompilerServices.Unsafe.AsPointer(ref this), (ufbx_props*)System.Runtime.CompilerServices.Unsafe.AsPointer(ref this),
@@ -116,8 +144,11 @@ public unsafe partial struct ufbx_props
def); def);
} }
// From: ufbx_find_string_len(ufbx_props*, sbyte*, nuint, ufbx_string) /// <summary>
public ufbx_string find_string_len(ReadOnlySpan<byte> name, ufbx_string def) /// From: <see cref="Api.ufbx_find_string_len(ufbx_props*, sbyte*, nuint, ufbx_string)" />
/// </summary>
[System.Runtime.CompilerServices.MethodImpl(System.Runtime.CompilerServices.MethodImplOptions.AggressiveInlining)]
public ufbx_string FindStringLen(ReadOnlySpan<byte> name, ufbx_string def)
{ {
fixed (byte* pname = name) fixed (byte* pname = name)
{ {
@@ -129,8 +160,11 @@ public unsafe partial struct ufbx_props
} }
} }
// From: ufbx_find_string(ufbx_props*, sbyte*, ufbx_string) /// <summary>
public ufbx_string find_string(sbyte* name, ufbx_string def) /// From: <see cref="Api.ufbx_find_string(ufbx_props*, sbyte*, ufbx_string)" />
/// </summary>
[System.Runtime.CompilerServices.MethodImpl(System.Runtime.CompilerServices.MethodImplOptions.AggressiveInlining)]
public ufbx_string FindString(sbyte* name, ufbx_string def)
{ {
return Api.ufbx_find_string( return Api.ufbx_find_string(
(ufbx_props*)System.Runtime.CompilerServices.Unsafe.AsPointer(ref this), (ufbx_props*)System.Runtime.CompilerServices.Unsafe.AsPointer(ref this),
@@ -138,8 +172,11 @@ public unsafe partial struct ufbx_props
def); def);
} }
// From: ufbx_find_blob_len(ufbx_props*, sbyte*, nuint, ufbx_blob) /// <summary>
public ufbx_blob find_blob_len(ReadOnlySpan<byte> name, ufbx_blob def) /// From: <see cref="Api.ufbx_find_blob_len(ufbx_props*, sbyte*, nuint, ufbx_blob)" />
/// </summary>
[System.Runtime.CompilerServices.MethodImpl(System.Runtime.CompilerServices.MethodImplOptions.AggressiveInlining)]
public ufbx_blob FindBlobLen(ReadOnlySpan<byte> name, ufbx_blob def)
{ {
fixed (byte* pname = name) fixed (byte* pname = name)
{ {
@@ -151,8 +188,11 @@ public unsafe partial struct ufbx_props
} }
} }
// From: ufbx_find_blob(ufbx_props*, sbyte*, ufbx_blob) /// <summary>
public ufbx_blob find_blob(sbyte* name, ufbx_blob def) /// From: <see cref="Api.ufbx_find_blob(ufbx_props*, sbyte*, ufbx_blob)" />
/// </summary>
[System.Runtime.CompilerServices.MethodImpl(System.Runtime.CompilerServices.MethodImplOptions.AggressiveInlining)]
public ufbx_blob FindBlob(sbyte* name, ufbx_blob def)
{ {
return Api.ufbx_find_blob( return Api.ufbx_find_blob(
(ufbx_props*)System.Runtime.CompilerServices.Unsafe.AsPointer(ref this), (ufbx_props*)System.Runtime.CompilerServices.Unsafe.AsPointer(ref this),
@@ -160,8 +200,11 @@ public unsafe partial struct ufbx_props
def); def);
} }
// From: ufbx_find_prop_concat(ufbx_props*, ufbx_string*, nuint) /// <summary>
public ufbx_prop* find_prop_concat(ufbx_string* parts, nuint num_parts) /// From: <see cref="Api.ufbx_find_prop_concat(ufbx_props*, ufbx_string*, nuint)" />
/// </summary>
[System.Runtime.CompilerServices.MethodImpl(System.Runtime.CompilerServices.MethodImplOptions.AggressiveInlining)]
public ufbx_prop* FindPropConcat(ufbx_string* parts, nuint num_parts)
{ {
return Api.ufbx_find_prop_concat( return Api.ufbx_find_prop_concat(
(ufbx_props*)System.Runtime.CompilerServices.Unsafe.AsPointer(ref this), (ufbx_props*)System.Runtime.CompilerServices.Unsafe.AsPointer(ref this),

View File

@@ -2,14 +2,15 @@
// This file is generated by Ghost.NativeWrapperGen. Do not edit manually. // This file is generated by Ghost.NativeWrapperGen. Do not edit manually.
// </auto-generated> // </auto-generated>
using System.Runtime.CompilerServices;
namespace Ghost.Ufbx; namespace Ghost.Ufbx;
public unsafe partial struct ufbx_scene public unsafe partial struct ufbx_scene : System.IDisposable
{ {
// From: ufbx_load_memory(void*, nuint, ufbx_load_opts*, ufbx_error*) /// <summary>
public static ufbx_scene* load_memory(void* data, nuint data_size, ufbx_load_opts* opts, ufbx_error* error) /// From: <see cref="Api.ufbx_load_memory(void*, nuint, ufbx_load_opts*, ufbx_error*)" />
/// </summary>
[System.Runtime.CompilerServices.MethodImpl(System.Runtime.CompilerServices.MethodImplOptions.AggressiveInlining)]
public static ufbx_scene* LoadMemory(void* data, nuint data_size, ufbx_load_opts* opts, ufbx_error* error)
{ {
return Api.ufbx_load_memory( return Api.ufbx_load_memory(
data, data,
@@ -18,8 +19,11 @@ public unsafe partial struct ufbx_scene
error); error);
} }
// From: ufbx_load_file(sbyte*, ufbx_load_opts*, ufbx_error*) /// <summary>
public static ufbx_scene* load_file(sbyte* filename, ufbx_load_opts* opts, ufbx_error* error) /// From: <see cref="Api.ufbx_load_file(sbyte*, ufbx_load_opts*, ufbx_error*)" />
/// </summary>
[System.Runtime.CompilerServices.MethodImpl(System.Runtime.CompilerServices.MethodImplOptions.AggressiveInlining)]
public static ufbx_scene* LoadFile(sbyte* filename, ufbx_load_opts* opts, ufbx_error* error)
{ {
return Api.ufbx_load_file( return Api.ufbx_load_file(
filename, filename,
@@ -27,8 +31,11 @@ public unsafe partial struct ufbx_scene
error); error);
} }
// From: ufbx_load_file_len(sbyte*, nuint, ufbx_load_opts*, ufbx_error*) /// <summary>
public static ufbx_scene* load_file_len(ReadOnlySpan<byte> filename, ufbx_load_opts* opts, ufbx_error* error) /// From: <see cref="Api.ufbx_load_file_len(sbyte*, nuint, ufbx_load_opts*, ufbx_error*)" />
/// </summary>
[System.Runtime.CompilerServices.MethodImpl(System.Runtime.CompilerServices.MethodImplOptions.AggressiveInlining)]
public static ufbx_scene* LoadFileLen(ReadOnlySpan<byte> filename, ufbx_load_opts* opts, ufbx_error* error)
{ {
fixed (byte* pfilename = filename) fixed (byte* pfilename = filename)
{ {
@@ -40,8 +47,11 @@ public unsafe partial struct ufbx_scene
} }
} }
// From: ufbx_load_stdio(void*, ufbx_load_opts*, ufbx_error*) /// <summary>
public static ufbx_scene* load_stdio(void* file, ufbx_load_opts* opts, ufbx_error* error) /// From: <see cref="Api.ufbx_load_stdio(void*, ufbx_load_opts*, ufbx_error*)" />
/// </summary>
[System.Runtime.CompilerServices.MethodImpl(System.Runtime.CompilerServices.MethodImplOptions.AggressiveInlining)]
public static ufbx_scene* LoadStdio(void* file, ufbx_load_opts* opts, ufbx_error* error)
{ {
return Api.ufbx_load_stdio( return Api.ufbx_load_stdio(
file, file,
@@ -49,8 +59,11 @@ public unsafe partial struct ufbx_scene
error); error);
} }
// From: ufbx_load_stdio_prefix(void*, void*, nuint, ufbx_load_opts*, ufbx_error*) /// <summary>
public static ufbx_scene* load_stdio_prefix(void* file, void* prefix, nuint prefix_size, ufbx_load_opts* opts, ufbx_error* error) /// From: <see cref="Api.ufbx_load_stdio_prefix(void*, void*, nuint, ufbx_load_opts*, ufbx_error*)" />
/// </summary>
[System.Runtime.CompilerServices.MethodImpl(System.Runtime.CompilerServices.MethodImplOptions.AggressiveInlining)]
public static ufbx_scene* LoadStdioPrefix(void* file, void* prefix, nuint prefix_size, ufbx_load_opts* opts, ufbx_error* error)
{ {
return Api.ufbx_load_stdio_prefix( return Api.ufbx_load_stdio_prefix(
file, file,
@@ -60,20 +73,29 @@ public unsafe partial struct ufbx_scene
error); error);
} }
// From: ufbx_free_scene(ufbx_scene*) /// <summary>
public void free() /// From: <see cref="Api.ufbx_free_scene(ufbx_scene*)" />
/// </summary>
[System.Runtime.CompilerServices.MethodImpl(System.Runtime.CompilerServices.MethodImplOptions.AggressiveInlining)]
public void Dispose()
{ {
Api.ufbx_free_scene((ufbx_scene*)System.Runtime.CompilerServices.Unsafe.AsPointer(ref this)); Api.ufbx_free_scene((ufbx_scene*)System.Runtime.CompilerServices.Unsafe.AsPointer(ref this));
} }
// From: ufbx_retain_scene(ufbx_scene*) /// <summary>
public void retain() /// From: <see cref="Api.ufbx_retain_scene(ufbx_scene*)" />
/// </summary>
[System.Runtime.CompilerServices.MethodImpl(System.Runtime.CompilerServices.MethodImplOptions.AggressiveInlining)]
public void Retain()
{ {
Api.ufbx_retain_scene((ufbx_scene*)System.Runtime.CompilerServices.Unsafe.AsPointer(ref this)); Api.ufbx_retain_scene((ufbx_scene*)System.Runtime.CompilerServices.Unsafe.AsPointer(ref this));
} }
// From: ufbx_find_element_len(ufbx_scene*, ufbx_element_type, sbyte*, nuint) /// <summary>
public ufbx_element* find_element_len(ufbx_element_type type, ReadOnlySpan<byte> name) /// From: <see cref="Api.ufbx_find_element_len(ufbx_scene*, ufbx_element_type, sbyte*, nuint)" />
/// </summary>
[System.Runtime.CompilerServices.MethodImpl(System.Runtime.CompilerServices.MethodImplOptions.AggressiveInlining)]
public ufbx_element* FindElementLen(ufbx_element_type type, ReadOnlySpan<byte> name)
{ {
fixed (byte* pname = name) fixed (byte* pname = name)
{ {
@@ -85,8 +107,11 @@ public unsafe partial struct ufbx_scene
} }
} }
// From: ufbx_find_element(ufbx_scene*, ufbx_element_type, sbyte*) /// <summary>
public ufbx_element* find_element(ufbx_element_type type, sbyte* name) /// From: <see cref="Api.ufbx_find_element(ufbx_scene*, ufbx_element_type, sbyte*)" />
/// </summary>
[System.Runtime.CompilerServices.MethodImpl(System.Runtime.CompilerServices.MethodImplOptions.AggressiveInlining)]
public ufbx_element* FindElement(ufbx_element_type type, sbyte* name)
{ {
return Api.ufbx_find_element( return Api.ufbx_find_element(
(ufbx_scene*)System.Runtime.CompilerServices.Unsafe.AsPointer(ref this), (ufbx_scene*)System.Runtime.CompilerServices.Unsafe.AsPointer(ref this),
@@ -94,8 +119,11 @@ public unsafe partial struct ufbx_scene
name); name);
} }
// From: ufbx_find_node_len(ufbx_scene*, sbyte*, nuint) /// <summary>
public ufbx_node* find_node_len(ReadOnlySpan<byte> name) /// From: <see cref="Api.ufbx_find_node_len(ufbx_scene*, sbyte*, nuint)" />
/// </summary>
[System.Runtime.CompilerServices.MethodImpl(System.Runtime.CompilerServices.MethodImplOptions.AggressiveInlining)]
public ufbx_node* FindNodeLen(ReadOnlySpan<byte> name)
{ {
fixed (byte* pname = name) fixed (byte* pname = name)
{ {
@@ -106,16 +134,22 @@ public unsafe partial struct ufbx_scene
} }
} }
// From: ufbx_find_node(ufbx_scene*, sbyte*) /// <summary>
public ufbx_node* find_node(sbyte* name) /// From: <see cref="Api.ufbx_find_node(ufbx_scene*, sbyte*)" />
/// </summary>
[System.Runtime.CompilerServices.MethodImpl(System.Runtime.CompilerServices.MethodImplOptions.AggressiveInlining)]
public ufbx_node* FindNode(sbyte* name)
{ {
return Api.ufbx_find_node( return Api.ufbx_find_node(
(ufbx_scene*)System.Runtime.CompilerServices.Unsafe.AsPointer(ref this), (ufbx_scene*)System.Runtime.CompilerServices.Unsafe.AsPointer(ref this),
name); name);
} }
// From: ufbx_find_anim_stack_len(ufbx_scene*, sbyte*, nuint) /// <summary>
public ufbx_anim_stack* find_anim_stack_len(ReadOnlySpan<byte> name) /// From: <see cref="Api.ufbx_find_anim_stack_len(ufbx_scene*, sbyte*, nuint)" />
/// </summary>
[System.Runtime.CompilerServices.MethodImpl(System.Runtime.CompilerServices.MethodImplOptions.AggressiveInlining)]
public ufbx_anim_stack* FindAnimStackLen(ReadOnlySpan<byte> name)
{ {
fixed (byte* pname = name) fixed (byte* pname = name)
{ {
@@ -126,16 +160,22 @@ public unsafe partial struct ufbx_scene
} }
} }
// From: ufbx_find_anim_stack(ufbx_scene*, sbyte*) /// <summary>
public ufbx_anim_stack* find_anim_stack(sbyte* name) /// From: <see cref="Api.ufbx_find_anim_stack(ufbx_scene*, sbyte*)" />
/// </summary>
[System.Runtime.CompilerServices.MethodImpl(System.Runtime.CompilerServices.MethodImplOptions.AggressiveInlining)]
public ufbx_anim_stack* FindAnimStack(sbyte* name)
{ {
return Api.ufbx_find_anim_stack( return Api.ufbx_find_anim_stack(
(ufbx_scene*)System.Runtime.CompilerServices.Unsafe.AsPointer(ref this), (ufbx_scene*)System.Runtime.CompilerServices.Unsafe.AsPointer(ref this),
name); name);
} }
// From: ufbx_find_material_len(ufbx_scene*, sbyte*, nuint) /// <summary>
public ufbx_material* find_material_len(ReadOnlySpan<byte> name) /// From: <see cref="Api.ufbx_find_material_len(ufbx_scene*, sbyte*, nuint)" />
/// </summary>
[System.Runtime.CompilerServices.MethodImpl(System.Runtime.CompilerServices.MethodImplOptions.AggressiveInlining)]
public ufbx_material* FindMaterialLen(ReadOnlySpan<byte> name)
{ {
fixed (byte* pname = name) fixed (byte* pname = name)
{ {
@@ -146,16 +186,22 @@ public unsafe partial struct ufbx_scene
} }
} }
// From: ufbx_find_material(ufbx_scene*, sbyte*) /// <summary>
public ufbx_material* find_material(sbyte* name) /// From: <see cref="Api.ufbx_find_material(ufbx_scene*, sbyte*)" />
/// </summary>
[System.Runtime.CompilerServices.MethodImpl(System.Runtime.CompilerServices.MethodImplOptions.AggressiveInlining)]
public ufbx_material* FindMaterial(sbyte* name)
{ {
return Api.ufbx_find_material( return Api.ufbx_find_material(
(ufbx_scene*)System.Runtime.CompilerServices.Unsafe.AsPointer(ref this), (ufbx_scene*)System.Runtime.CompilerServices.Unsafe.AsPointer(ref this),
name); name);
} }
// From: ufbx_evaluate_scene(ufbx_scene*, ufbx_anim*, double, ufbx_evaluate_opts*, ufbx_error*) /// <summary>
public ufbx_scene* evaluate(ufbx_anim* anim, double time, ufbx_evaluate_opts* opts, ufbx_error* error) /// From: <see cref="Api.ufbx_evaluate_scene(ufbx_scene*, ufbx_anim*, double, ufbx_evaluate_opts*, ufbx_error*)" />
/// </summary>
[System.Runtime.CompilerServices.MethodImpl(System.Runtime.CompilerServices.MethodImplOptions.AggressiveInlining)]
public ufbx_scene* Evaluate(ufbx_anim* anim, double time, ufbx_evaluate_opts* opts, ufbx_error* error)
{ {
return Api.ufbx_evaluate_scene( return Api.ufbx_evaluate_scene(
(ufbx_scene*)System.Runtime.CompilerServices.Unsafe.AsPointer(ref this), (ufbx_scene*)System.Runtime.CompilerServices.Unsafe.AsPointer(ref this),
@@ -165,8 +211,11 @@ public unsafe partial struct ufbx_scene
error); error);
} }
// From: ufbx_create_anim(ufbx_scene*, ufbx_anim_opts*, ufbx_error*) /// <summary>
public ufbx_anim* create_anim(ufbx_anim_opts* opts, ufbx_error* error) /// From: <see cref="Api.ufbx_create_anim(ufbx_scene*, ufbx_anim_opts*, ufbx_error*)" />
/// </summary>
[System.Runtime.CompilerServices.MethodImpl(System.Runtime.CompilerServices.MethodImplOptions.AggressiveInlining)]
public ufbx_anim* CreateAnim(ufbx_anim_opts* opts, ufbx_error* error)
{ {
return Api.ufbx_create_anim( return Api.ufbx_create_anim(
(ufbx_scene*)System.Runtime.CompilerServices.Unsafe.AsPointer(ref this), (ufbx_scene*)System.Runtime.CompilerServices.Unsafe.AsPointer(ref this),
@@ -174,8 +223,11 @@ public unsafe partial struct ufbx_scene
error); error);
} }
// From: ufbx_bake_anim(ufbx_scene*, ufbx_anim*, ufbx_bake_opts*, ufbx_error*) /// <summary>
public ufbx_baked_anim* bake_anim(ufbx_anim* anim, ufbx_bake_opts* opts, ufbx_error* error) /// From: <see cref="Api.ufbx_bake_anim(ufbx_scene*, ufbx_anim*, ufbx_bake_opts*, ufbx_error*)" />
/// </summary>
[System.Runtime.CompilerServices.MethodImpl(System.Runtime.CompilerServices.MethodImplOptions.AggressiveInlining)]
public ufbx_baked_anim* BakeAnim(ufbx_anim* anim, ufbx_bake_opts* opts, ufbx_error* error)
{ {
return Api.ufbx_bake_anim( return Api.ufbx_bake_anim(
(ufbx_scene*)System.Runtime.CompilerServices.Unsafe.AsPointer(ref this), (ufbx_scene*)System.Runtime.CompilerServices.Unsafe.AsPointer(ref this),

View File

@@ -2,14 +2,15 @@
// This file is generated by Ghost.NativeWrapperGen. Do not edit manually. // This file is generated by Ghost.NativeWrapperGen. Do not edit manually.
// </auto-generated> // </auto-generated>
using System.Runtime.CompilerServices;
namespace Ghost.Ufbx; namespace Ghost.Ufbx;
public unsafe partial struct ufbx_shader public unsafe partial struct ufbx_shader
{ {
// From: ufbx_find_shader_prop_len(ufbx_shader*, sbyte*, nuint) /// <summary>
public ufbx_string find_shader_prop_len(ReadOnlySpan<byte> name) /// From: <see cref="Api.ufbx_find_shader_prop_len(ufbx_shader*, sbyte*, nuint)" />
/// </summary>
[System.Runtime.CompilerServices.MethodImpl(System.Runtime.CompilerServices.MethodImplOptions.AggressiveInlining)]
public ufbx_string FindPropLen(ReadOnlySpan<byte> name)
{ {
fixed (byte* pname = name) fixed (byte* pname = name)
{ {
@@ -20,16 +21,22 @@ public unsafe partial struct ufbx_shader
} }
} }
// From: ufbx_find_shader_prop(ufbx_shader*, sbyte*) /// <summary>
public ufbx_string find_shader_prop(sbyte* name) /// From: <see cref="Api.ufbx_find_shader_prop(ufbx_shader*, sbyte*)" />
/// </summary>
[System.Runtime.CompilerServices.MethodImpl(System.Runtime.CompilerServices.MethodImplOptions.AggressiveInlining)]
public ufbx_string FindProp(sbyte* name)
{ {
return Api.ufbx_find_shader_prop( return Api.ufbx_find_shader_prop(
(ufbx_shader*)System.Runtime.CompilerServices.Unsafe.AsPointer(ref this), (ufbx_shader*)System.Runtime.CompilerServices.Unsafe.AsPointer(ref this),
name); name);
} }
// From: ufbx_find_shader_prop_bindings_len(ufbx_shader*, sbyte*, nuint) /// <summary>
public ufbx_shader_prop_binding_list find_shader_prop_bindings_len(ReadOnlySpan<byte> name) /// From: <see cref="Api.ufbx_find_shader_prop_bindings_len(ufbx_shader*, sbyte*, nuint)" />
/// </summary>
[System.Runtime.CompilerServices.MethodImpl(System.Runtime.CompilerServices.MethodImplOptions.AggressiveInlining)]
public ufbx_shader_prop_binding_list FindPropBindingsLen(ReadOnlySpan<byte> name)
{ {
fixed (byte* pname = name) fixed (byte* pname = name)
{ {
@@ -40,8 +47,11 @@ public unsafe partial struct ufbx_shader
} }
} }
// From: ufbx_find_shader_prop_bindings(ufbx_shader*, sbyte*) /// <summary>
public ufbx_shader_prop_binding_list find_shader_prop_bindings(sbyte* name) /// From: <see cref="Api.ufbx_find_shader_prop_bindings(ufbx_shader*, sbyte*)" />
/// </summary>
[System.Runtime.CompilerServices.MethodImpl(System.Runtime.CompilerServices.MethodImplOptions.AggressiveInlining)]
public ufbx_shader_prop_binding_list FindPropBindings(sbyte* name)
{ {
return Api.ufbx_find_shader_prop_bindings( return Api.ufbx_find_shader_prop_bindings(
(ufbx_shader*)System.Runtime.CompilerServices.Unsafe.AsPointer(ref this), (ufbx_shader*)System.Runtime.CompilerServices.Unsafe.AsPointer(ref this),

View File

@@ -2,14 +2,15 @@
// This file is generated by Ghost.NativeWrapperGen. Do not edit manually. // This file is generated by Ghost.NativeWrapperGen. Do not edit manually.
// </auto-generated> // </auto-generated>
using System.Runtime.CompilerServices;
namespace Ghost.Ufbx; namespace Ghost.Ufbx;
public unsafe partial struct ufbx_shader_texture public unsafe partial struct ufbx_shader_texture
{ {
// From: ufbx_find_shader_texture_input_len(ufbx_shader_texture*, sbyte*, nuint) /// <summary>
public ufbx_shader_texture_input* find_shader_texture_input_len(ReadOnlySpan<byte> name) /// From: <see cref="Api.ufbx_find_shader_texture_input_len(ufbx_shader_texture*, sbyte*, nuint)" />
/// </summary>
[System.Runtime.CompilerServices.MethodImpl(System.Runtime.CompilerServices.MethodImplOptions.AggressiveInlining)]
public ufbx_shader_texture_input* FindInputLen(ReadOnlySpan<byte> name)
{ {
fixed (byte* pname = name) fixed (byte* pname = name)
{ {
@@ -20,8 +21,11 @@ public unsafe partial struct ufbx_shader_texture
} }
} }
// From: ufbx_find_shader_texture_input(ufbx_shader_texture*, sbyte*) /// <summary>
public ufbx_shader_texture_input* find_shader_texture_input(sbyte* name) /// From: <see cref="Api.ufbx_find_shader_texture_input(ufbx_shader_texture*, sbyte*)" />
/// </summary>
[System.Runtime.CompilerServices.MethodImpl(System.Runtime.CompilerServices.MethodImplOptions.AggressiveInlining)]
public ufbx_shader_texture_input* FindInput(sbyte* name)
{ {
return Api.ufbx_find_shader_texture_input( return Api.ufbx_find_shader_texture_input(
(ufbx_shader_texture*)System.Runtime.CompilerServices.Unsafe.AsPointer(ref this), (ufbx_shader_texture*)System.Runtime.CompilerServices.Unsafe.AsPointer(ref this),

View File

@@ -2,14 +2,15 @@
// This file is generated by Ghost.NativeWrapperGen. Do not edit manually. // This file is generated by Ghost.NativeWrapperGen. Do not edit manually.
// </auto-generated> // </auto-generated>
using System.Runtime.CompilerServices;
namespace Ghost.Ufbx; namespace Ghost.Ufbx;
public unsafe partial struct ufbx_stream public unsafe partial struct ufbx_stream
{ {
// From: ufbx_load_stream(ufbx_stream*, ufbx_load_opts*, ufbx_error*) /// <summary>
public ufbx_scene* load(ufbx_load_opts* opts, ufbx_error* error) /// From: <see cref="Api.ufbx_load_stream(ufbx_stream*, ufbx_load_opts*, ufbx_error*)" />
/// </summary>
[System.Runtime.CompilerServices.MethodImpl(System.Runtime.CompilerServices.MethodImplOptions.AggressiveInlining)]
public ufbx_scene* Load(ufbx_load_opts* opts, ufbx_error* error)
{ {
return Api.ufbx_load_stream( return Api.ufbx_load_stream(
(ufbx_stream*)System.Runtime.CompilerServices.Unsafe.AsPointer(ref this), (ufbx_stream*)System.Runtime.CompilerServices.Unsafe.AsPointer(ref this),
@@ -17,8 +18,11 @@ public unsafe partial struct ufbx_stream
error); error);
} }
// From: ufbx_load_stream_prefix(ufbx_stream*, void*, nuint, ufbx_load_opts*, ufbx_error*) /// <summary>
public ufbx_scene* load_stream_prefix(void* prefix, nuint prefix_size, ufbx_load_opts* opts, ufbx_error* error) /// From: <see cref="Api.ufbx_load_stream_prefix(ufbx_stream*, void*, nuint, ufbx_load_opts*, ufbx_error*)" />
/// </summary>
[System.Runtime.CompilerServices.MethodImpl(System.Runtime.CompilerServices.MethodImplOptions.AggressiveInlining)]
public ufbx_scene* LoadPrefix(void* prefix, nuint prefix_size, ufbx_load_opts* opts, ufbx_error* error)
{ {
return Api.ufbx_load_stream_prefix( return Api.ufbx_load_stream_prefix(
(ufbx_stream*)System.Runtime.CompilerServices.Unsafe.AsPointer(ref this), (ufbx_stream*)System.Runtime.CompilerServices.Unsafe.AsPointer(ref this),
@@ -28,8 +32,11 @@ public unsafe partial struct ufbx_stream
error); error);
} }
// From: ufbx_open_file(ufbx_stream*, sbyte*, nuint, ufbx_open_file_opts*, ufbx_error*) /// <summary>
public bool open_file(ReadOnlySpan<byte> path, ufbx_open_file_opts* opts, ufbx_error* error) /// From: <see cref="Api.ufbx_open_file(ufbx_stream*, sbyte*, nuint, ufbx_open_file_opts*, ufbx_error*)" />
/// </summary>
[System.Runtime.CompilerServices.MethodImpl(System.Runtime.CompilerServices.MethodImplOptions.AggressiveInlining)]
public bool OpenFile(ReadOnlySpan<byte> path, ufbx_open_file_opts* opts, ufbx_error* error)
{ {
fixed (byte* ppath = path) fixed (byte* ppath = path)
{ {
@@ -42,8 +49,11 @@ public unsafe partial struct ufbx_stream
} }
} }
// From: ufbx_open_file_ctx(ufbx_stream*, nuint, sbyte*, nuint, ufbx_open_file_opts*, ufbx_error*) /// <summary>
public bool open_file_ctx(nuint ctx, ReadOnlySpan<byte> path, ufbx_open_file_opts* opts, ufbx_error* error) /// From: <see cref="Api.ufbx_open_file_ctx(ufbx_stream*, nuint, sbyte*, nuint, ufbx_open_file_opts*, ufbx_error*)" />
/// </summary>
[System.Runtime.CompilerServices.MethodImpl(System.Runtime.CompilerServices.MethodImplOptions.AggressiveInlining)]
public bool OpenFileCtx(nuint ctx, ReadOnlySpan<byte> path, ufbx_open_file_opts* opts, ufbx_error* error)
{ {
fixed (byte* ppath = path) fixed (byte* ppath = path)
{ {
@@ -57,8 +67,11 @@ public unsafe partial struct ufbx_stream
} }
} }
// From: ufbx_open_memory(ufbx_stream*, void*, nuint, ufbx_open_memory_opts*, ufbx_error*) /// <summary>
public bool open_memory(void* data, nuint data_size, ufbx_open_memory_opts* opts, ufbx_error* error) /// From: <see cref="Api.ufbx_open_memory(ufbx_stream*, void*, nuint, ufbx_open_memory_opts*, ufbx_error*)" />
/// </summary>
[System.Runtime.CompilerServices.MethodImpl(System.Runtime.CompilerServices.MethodImplOptions.AggressiveInlining)]
public bool OpenMemory(void* data, nuint data_size, ufbx_open_memory_opts* opts, ufbx_error* error)
{ {
return Api.ufbx_open_memory( return Api.ufbx_open_memory(
(ufbx_stream*)System.Runtime.CompilerServices.Unsafe.AsPointer(ref this), (ufbx_stream*)System.Runtime.CompilerServices.Unsafe.AsPointer(ref this),
@@ -68,8 +81,11 @@ public unsafe partial struct ufbx_stream
error); error);
} }
// From: ufbx_open_memory_ctx(ufbx_stream*, nuint, void*, nuint, ufbx_open_memory_opts*, ufbx_error*) /// <summary>
public bool open_memory_ctx(nuint ctx, void* data, nuint data_size, ufbx_open_memory_opts* opts, ufbx_error* error) /// From: <see cref="Api.ufbx_open_memory_ctx(ufbx_stream*, nuint, void*, nuint, ufbx_open_memory_opts*, ufbx_error*)" />
/// </summary>
[System.Runtime.CompilerServices.MethodImpl(System.Runtime.CompilerServices.MethodImplOptions.AggressiveInlining)]
public bool OpenMemoryCtx(nuint ctx, void* data, nuint data_size, ufbx_open_memory_opts* opts, ufbx_error* error)
{ {
return Api.ufbx_open_memory_ctx( return Api.ufbx_open_memory_ctx(
(ufbx_stream*)System.Runtime.CompilerServices.Unsafe.AsPointer(ref this), (ufbx_stream*)System.Runtime.CompilerServices.Unsafe.AsPointer(ref this),

View File

@@ -2,14 +2,15 @@
// This file is generated by Ghost.NativeWrapperGen. Do not edit manually. // This file is generated by Ghost.NativeWrapperGen. Do not edit manually.
// </auto-generated> // </auto-generated>
using System.Runtime.CompilerServices;
namespace Ghost.Ufbx; namespace Ghost.Ufbx;
public unsafe partial struct ufbx_topo_edge public unsafe partial struct ufbx_topo_edge
{ {
// From: ufbx_topo_next_vertex_edge(ufbx_topo_edge*, nuint, uint) /// <summary>
public uint topo_next_vertex_edge(nuint num_topo, uint index) /// From: <see cref="Api.ufbx_topo_next_vertex_edge(ufbx_topo_edge*, nuint, uint)" />
/// </summary>
[System.Runtime.CompilerServices.MethodImpl(System.Runtime.CompilerServices.MethodImplOptions.AggressiveInlining)]
public uint TopoNextVertexEdge(nuint num_topo, uint index)
{ {
return Api.ufbx_topo_next_vertex_edge( return Api.ufbx_topo_next_vertex_edge(
(ufbx_topo_edge*)System.Runtime.CompilerServices.Unsafe.AsPointer(ref this), (ufbx_topo_edge*)System.Runtime.CompilerServices.Unsafe.AsPointer(ref this),
@@ -17,8 +18,11 @@ public unsafe partial struct ufbx_topo_edge
index); index);
} }
// From: ufbx_topo_prev_vertex_edge(ufbx_topo_edge*, nuint, uint) /// <summary>
public uint topo_prev_vertex_edge(nuint num_topo, uint index) /// From: <see cref="Api.ufbx_topo_prev_vertex_edge(ufbx_topo_edge*, nuint, uint)" />
/// </summary>
[System.Runtime.CompilerServices.MethodImpl(System.Runtime.CompilerServices.MethodImplOptions.AggressiveInlining)]
public uint TopoPrevVertexEdge(nuint num_topo, uint index)
{ {
return Api.ufbx_topo_prev_vertex_edge( return Api.ufbx_topo_prev_vertex_edge(
(ufbx_topo_edge*)System.Runtime.CompilerServices.Unsafe.AsPointer(ref this), (ufbx_topo_edge*)System.Runtime.CompilerServices.Unsafe.AsPointer(ref this),

View File

@@ -2,14 +2,15 @@
// This file is generated by Ghost.NativeWrapperGen. Do not edit manually. // This file is generated by Ghost.NativeWrapperGen. Do not edit manually.
// </auto-generated> // </auto-generated>
using System.Runtime.CompilerServices;
namespace Ghost.Ufbx; namespace Ghost.Ufbx;
public unsafe partial struct ufbx_transform public unsafe partial struct ufbx_transform
{ {
// From: ufbx_transform_to_matrix(ufbx_transform*) /// <summary>
public Misaki.HighPerformance.Mathematics.float3x4 to_matrix() /// From: <see cref="Api.ufbx_transform_to_matrix(ufbx_transform*)" />
/// </summary>
[System.Runtime.CompilerServices.MethodImpl(System.Runtime.CompilerServices.MethodImplOptions.AggressiveInlining)]
public Misaki.HighPerformance.Mathematics.float3x4 ToMatrix()
{ {
return Api.ufbx_transform_to_matrix((ufbx_transform*)System.Runtime.CompilerServices.Unsafe.AsPointer(ref this)); return Api.ufbx_transform_to_matrix((ufbx_transform*)System.Runtime.CompilerServices.Unsafe.AsPointer(ref this));
} }

View File

@@ -2,14 +2,15 @@
// This file is generated by Ghost.NativeWrapperGen. Do not edit manually. // This file is generated by Ghost.NativeWrapperGen. Do not edit manually.
// </auto-generated> // </auto-generated>
using System.Runtime.CompilerServices;
namespace Ghost.Ufbx; namespace Ghost.Ufbx;
public unsafe partial struct ufbx_vertex_stream public unsafe partial struct ufbx_vertex_stream
{ {
// From: ufbx_generate_indices(ufbx_vertex_stream*, nuint, uint*, nuint, ufbx_allocator_opts*, ufbx_error*) /// <summary>
public nuint generate_indices(nuint num_streams, uint* indices, nuint num_indices, ufbx_allocator_opts* allocator, ufbx_error* error) /// From: <see cref="Api.ufbx_generate_indices(ufbx_vertex_stream*, nuint, uint*, nuint, ufbx_allocator_opts*, ufbx_error*)" />
/// </summary>
[System.Runtime.CompilerServices.MethodImpl(System.Runtime.CompilerServices.MethodImplOptions.AggressiveInlining)]
public nuint GenerateIndices(nuint num_streams, uint* indices, nuint num_indices, ufbx_allocator_opts* allocator, ufbx_error* error)
{ {
return Api.ufbx_generate_indices( return Api.ufbx_generate_indices(
(ufbx_vertex_stream*)System.Runtime.CompilerServices.Unsafe.AsPointer(ref this), (ufbx_vertex_stream*)System.Runtime.CompilerServices.Unsafe.AsPointer(ref this),

View File

@@ -2,14 +2,15 @@
// This file is generated by Ghost.NativeWrapperGen. Do not edit manually. // This file is generated by Ghost.NativeWrapperGen. Do not edit manually.
// </auto-generated> // </auto-generated>
using System.Runtime.CompilerServices;
namespace Ghost.Ufbx; namespace Ghost.Ufbx;
public unsafe partial struct ufbx_vertex_vec3 public unsafe partial struct ufbx_vertex_vec3
{ {
// From: ufbx_get_weighted_face_normal(ufbx_vertex_vec3*, ufbx_face) /// <summary>
public Misaki.HighPerformance.Mathematics.float3 get_weighted_face_normal(ufbx_face face) /// From: <see cref="Api.ufbx_get_weighted_face_normal(ufbx_vertex_vec3*, ufbx_face)" />
/// </summary>
[System.Runtime.CompilerServices.MethodImpl(System.Runtime.CompilerServices.MethodImplOptions.AggressiveInlining)]
public Misaki.HighPerformance.Mathematics.float3 GetWeightedFaceNormal(ufbx_face face)
{ {
return Api.ufbx_get_weighted_face_normal( return Api.ufbx_get_weighted_face_normal(
(ufbx_vertex_vec3*)System.Runtime.CompilerServices.Unsafe.AsPointer(ref this), (ufbx_vertex_vec3*)System.Runtime.CompilerServices.Unsafe.AsPointer(ref this),

View File

@@ -215,7 +215,7 @@ public sealed class WrapperGeneratorEmitter
resolver.TryGetBindingStructName(func.Parameters[0].TypeName), resolver.TryGetBindingStructName(func.Parameters[0].TypeName),
"RETURN_TYPE" => "RETURN_TYPE" =>
resolver.TryGetBindingStructName(func.ReturnType), resolver.TryGetBindingStructName(func.ReturnType),
_ => null, _ => targetTypeRule,
}; };
} }
@@ -283,7 +283,11 @@ public sealed class WrapperGeneratorEmitter
var plan = BuildParameterPlan(func, config, routed); var plan = BuildParameterPlan(func, config, routed);
// Comment showing the source function. // Comment showing the source function.
writer.WriteLine($"// From: {func.Name}({string.Join(", ", func.Parameters.Select(static p => p.TypeName))})"); writer.WriteLine("/// <summary>");
writer.WriteLine($"/// From: <see cref=\"Api.{func.Name}({string.Join(", ", func.Parameters.Select(static p => p.TypeName))})\" />");
writer.WriteLine("/// </summary>");
writer.WriteLine("[System.Runtime.CompilerServices.MethodImpl(System.Runtime.CompilerServices.MethodImplOptions.AggressiveInlining)]");
// Signature // Signature
var staticModifier = routed.IsInstance ? "" : "static "; var staticModifier = routed.IsInstance ? "" : "static ";

View File

@@ -63,6 +63,45 @@ public sealed class NamingConventions
name = TrimUnderscores(name); name = TrimUnderscores(name);
} }
var style = nameOpts.style as string;
if (!string.IsNullOrEmpty(style))
{
if (string.Equals(style, "PascalCase", StringComparison.OrdinalIgnoreCase))
{
int counter = 0;
Span<char> nameSpan = stackalloc char[name.Length];
for (int i = 0; i < name.Length; i++)
{
if (i == 0)
{
nameSpan[counter] = char.ToUpperInvariant(name[i]);
counter++;
continue;
}
if (name[i] == '_')
{
while (name[i] == '_' && i < name.Length)
{
i++;
}
nameSpan[counter] = char.ToUpperInvariant(name[i]);
counter++;
continue;
}
nameSpan[counter] = name[i];
counter++;
}
name = nameSpan[..counter].ToString();
}
}
return name; return name;
} }

View File

@@ -0,0 +1,69 @@
{
"libraryName": "meshoptimizer",
"nativeNamespace": "Ghost.MeshOptimizer",
"outputNamespace": "Ghost.MeshOptimizer",
"nativeTypePrefix": "meshopt_",
"skipTypes": [
"NativeAnnotationAttribute",
"NativeTypeNameAttribute"
],
"skipFunctions": [],
"actions": [
{
// Instance method: first param is T* of a known binding struct → method on T
"comment": "First param is T* of a known binding struct → instance method on T",
"filter": "EXTERN_API",
"conditions": [ "SELF_PTR" ],
"targetType": "FIRST_PARAM_TYPE",
"apply": {
"type": "INSTANCE_METHOD",
"opts": {
"removeFirstParam": true,
"passAs": "($TSelf*)System.Runtime.CompilerServices.Unsafe.AsPointer(ref this)",
// Change "nvttCreateSurface" to "Create"
"name": {
"remove": [
"PREFIX",
"NO_PREFIX($TSelf)" // NO_PREFIX(NvttSurface) will change "NvttSurface" to "Surface", the prefix is determined by the "nativeTypePrefix" field at the top level of this config
],
"style": "PascalCase"
}
}
}
},
{
// Static method: first param is NOT a known struct pointer, but return type is T* → static on T
"comment": "Return type is T* of a known binding struct → static method on T",
"filter": "EXTERN_API",
"conditions": [ "FIRST_PARAM_OTHER_TYPE", "RETURN_BINDING_TYPE" ],
"targetType": "RETURN_TYPE",
"apply": {
"type": "STATIC_METHOD",
"opts": {
"name": {
"remove": [
"PREFIX",
"NO_PREFIX($TSelf)"
],
"style": "PascalCase"
}
}
}
},
{
"filter": "EXTERN_API",
"targetType": "NvttApi",
"apply": {
"type": "STATIC_METHOD",
"opts": {
"name": {
"remove": [
"PREFIX"
],
"style": "PascalCase"
}
}
}
}
]
}

View File

@@ -91,6 +91,20 @@
} }
} }
} }
},
{
"filter": "EXTERN_API",
"targetType": "NvttApi",
"apply": {
"type": "STATIC_METHOD",
"opts": {
"name": {
"remove": [
"PREFIX"
]
}
}
}
} }
] ]
} }

View File

@@ -28,6 +28,31 @@
], ],
"actions": [ "actions": [
{
// Dispose pattern: void return + T* param + name matches .*free_<Struct> → IDisposable.Dispose on T
"comment": "Dispose pattern: void return + T* param → Dispose method on T",
"filter": "EXTERN_API",
"conditions": [ "VOID_RETURN", "SELF_PTR", "NAME_CONDITION(ufbx_free_$TBare)" ],
"targetType": "FIRST_PARAM_TYPE",
"apply": [
{
"type": "INSTANCE_METHOD",
"opts": {
"removeFirstParam": true,
"passAs": "($TSelf*)System.Runtime.CompilerServices.Unsafe.AsPointer(ref this)",
"name": {
"set": "Dispose"
}
}
},
{
"type": "INHERITANCE",
"opts": {
"baseType": [ "System.IDisposable" ]
}
}
]
},
{ {
// Instance method: first param is T* of a known binding struct → method on T // Instance method: first param is T* of a known binding struct → method on T
"comment": "First param is T* of a known binding struct → instance method on T", "comment": "First param is T* of a known binding struct → instance method on T",
@@ -44,7 +69,8 @@
"remove": [ "remove": [
"PREFIX", "PREFIX",
"NO_PREFIX($TSelf)" // NO_PREFIX(ufbx_scene) will output "scene" change "free_scene" to "free", the prefix is determined by the "nativeTypePrefix" field at the top level of this config "NO_PREFIX($TSelf)" // NO_PREFIX(ufbx_scene) will output "scene" change "free_scene" to "free", the prefix is determined by the "nativeTypePrefix" field at the top level of this config
] ],
"style": "PascalCase"
} }
} }
} }
@@ -62,7 +88,23 @@
"remove": [ "remove": [
"PREFIX", "PREFIX",
"NO_PREFIX($TSelf)" "NO_PREFIX($TSelf)"
] ],
"style": "PascalCase"
}
}
}
},
{
"filter": "EXTERN_API",
"targetType": "UfbxApi",
"apply": {
"type": "STATIC_METHOD",
"opts": {
"name": {
"remove": [
"PREFIX"
],
"style": "PascalCase"
} }
} }
} }