From 0fc449bc783e58ec2ed0cd40554a53939a448604 Mon Sep 17 00:00:00 2001 From: Misaki Date: Tue, 7 Apr 2026 23:50:55 +0900 Subject: [PATCH] feat(ufbx): switch to native ufbx_vec/quat/matrix types Replaces all Misaki.HighPerformance.Mathematics vector, quaternion, and matrix types in Ghost.Ufbx bindings with new native ufbx_vec2, ufbx_vec3, ufbx_vec4, ufbx_quat, and ufbx_matrix structs. Updates all interop code, struct fields, and API signatures accordingly. Adds struct definitions for the new types and provides matrix operations as struct methods. Removes unnecessary math package reference. Also includes minor fixes to system attributes, meshlet LOD logic, and mesh utility. BREAKING CHANGE: All Ufbx-related APIs now use ufbx_* types instead of Misaki.HighPerformance.Mathematics types. Existing code using the old types will require updates. --- src/Runtime/Ghost.Core/Ghost.Core.csproj | 2 +- .../Ghost.Engine/Utilities/MathUtility.cs | 10 +- src/Runtime/Ghost.Entities/System.cs | 26 ++-- .../Ghost.Graphics.D3D12.csproj | 2 +- src/Runtime/Ghost.Graphics/Core/Mesh.cs | 6 +- .../Shaders/Includes/Common.hlsl | 2 + src/Runtime/Ghost.Graphics/test.gshdr | 51 ++++++- .../RenderPipeline/TestRenderPipeline.cs | 2 +- .../Systems/CameraMovingSystem.cs | 50 +++++++ .../Systems/RenderExtractionSystem.cs | 1 + .../Utilities/MeshUtility.cs | 21 ++- .../Windows/GraphicsTestWindow.xaml.cs | 2 + src/ThridParty/Ghost.MeshOptimizer/Api.cs | 30 ++++ .../Ghost.MeshOptimizer/Generated/Api.cs | 23 --- src/ThridParty/Ghost.Ufbx/Api.cs | 30 ++++ src/ThridParty/Ghost.Ufbx/Generated/Api.cs | 141 ++++++------------ .../Ghost.Ufbx/Generated/ufbx_anim_value.cs | 3 +- .../Ghost.Ufbx/Generated/ufbx_baked_quat.cs | 3 +- .../Ghost.Ufbx/Generated/ufbx_baked_vec3.cs | 3 +- .../Ghost.Ufbx/Generated/ufbx_bone_pose.cs | 6 +- .../Ghost.Ufbx/Generated/ufbx_camera.cs | 21 +-- .../Ghost.Ufbx/Generated/ufbx_constraint.cs | 9 +- .../Ghost.Ufbx/Generated/ufbx_curve_point.cs | 6 +- .../Generated/ufbx_display_layer.cs | 3 +- .../Ghost.Ufbx/Generated/ufbx_light.cs | 6 +- .../Ghost.Ufbx/Generated/ufbx_line_curve.cs | 3 +- .../Ghost.Ufbx/Generated/ufbx_material_map.cs | 15 +- .../Ghost.Ufbx/Generated/ufbx_matrix.cs | 5 +- .../Ghost.Ufbx/Generated/ufbx_metadata.cs | 3 +- .../Ghost.Ufbx/Generated/ufbx_node.cs | 30 ++-- .../Ghost.Ufbx/Generated/ufbx_prop.cs | 15 +- .../Generated/ufbx_prop_override.cs | 3 +- .../Generated/ufbx_prop_override_desc.cs | 3 +- .../Ghost.Ufbx/Generated/ufbx_quat.cs | 1 + .../Generated/ufbx_scene_settings.cs | 3 +- .../Generated/ufbx_shader_texture_input.cs | 15 +- .../Ghost.Ufbx/Generated/ufbx_skin_cluster.cs | 12 +- .../Generated/ufbx_surface_point.cs | 9 +- .../Ghost.Ufbx/Generated/ufbx_texture.cs | 6 +- .../Ghost.Ufbx/Generated/ufbx_transform.cs | 9 +- .../Ghost.Ufbx/Generated/ufbx_vec2.cs | 67 +++++++++ .../Ghost.Ufbx/Generated/ufbx_vec2_list.cs | 3 +- .../Ghost.Ufbx/Generated/ufbx_vec3.cs | 79 ++++++++++ .../Ghost.Ufbx/Generated/ufbx_vec3_list.cs | 3 +- .../Ghost.Ufbx/Generated/ufbx_vec4.cs | 91 +++++++++++ .../Ghost.Ufbx/Generated/ufbx_vec4_list.cs | 3 +- src/ThridParty/Ghost.Ufbx/Ghost.Ufbx.csproj | 4 - .../Ghost.Ufbx/Wrapper/UfbxApi.nativegen.cs | 109 +++----------- .../Wrapper/ufbx_anim_value.nativegen.cs | 4 +- .../Wrapper/ufbx_blend_deformer.nativegen.cs | 10 +- .../Wrapper/ufbx_blend_shape.nativegen.cs | 10 +- .../Wrapper/ufbx_cache_channel.nativegen.cs | 8 +- .../Wrapper/ufbx_cache_frame.nativegen.cs | 8 +- .../Wrapper/ufbx_matrix.nativegen.cs | 77 ++++++++++ .../Ghost.Ufbx/Wrapper/ufbx_mesh.nativegen.cs | 8 +- .../Ghost.Ufbx/Wrapper/ufbx_node.nativegen.cs | 2 +- .../Wrapper/ufbx_panic.nativegen.cs | 20 +-- .../Wrapper/ufbx_props.nativegen.cs | 8 +- .../Wrapper/ufbx_transform.nativegen.cs | 2 +- .../Wrapper/ufbx_vertex_vec3.nativegen.cs | 2 +- 60 files changed, 694 insertions(+), 415 deletions(-) create mode 100644 src/Test/Ghost.Graphics.Test/Systems/CameraMovingSystem.cs create mode 100644 src/ThridParty/Ghost.MeshOptimizer/Api.cs create mode 100644 src/ThridParty/Ghost.Ufbx/Api.cs create mode 100644 src/ThridParty/Ghost.Ufbx/Generated/ufbx_vec2.cs create mode 100644 src/ThridParty/Ghost.Ufbx/Generated/ufbx_vec3.cs create mode 100644 src/ThridParty/Ghost.Ufbx/Generated/ufbx_vec4.cs create mode 100644 src/ThridParty/Ghost.Ufbx/Wrapper/ufbx_matrix.nativegen.cs diff --git a/src/Runtime/Ghost.Core/Ghost.Core.csproj b/src/Runtime/Ghost.Core/Ghost.Core.csproj index 65e3f33..8a91248 100644 --- a/src/Runtime/Ghost.Core/Ghost.Core.csproj +++ b/src/Runtime/Ghost.Core/Ghost.Core.csproj @@ -25,7 +25,7 @@ all runtime; build; native; contentfiles; analyzers; buildtransitive - + diff --git a/src/Runtime/Ghost.Engine/Utilities/MathUtility.cs b/src/Runtime/Ghost.Engine/Utilities/MathUtility.cs index 5edce1a..720ca2e 100644 --- a/src/Runtime/Ghost.Engine/Utilities/MathUtility.cs +++ b/src/Runtime/Ghost.Engine/Utilities/MathUtility.cs @@ -19,9 +19,13 @@ public static class MathUtility { var R = new float3x3(rotation); return new float4x4( - R[0][0] * scale.x, R[0][1] * scale.y, R[0][2] * scale.z, position.x, - R[1][0] * scale.x, R[1][1] * scale.y, R[1][2] * scale.z, position.y, - R[2][0] * scale.x, R[2][1] * scale.y, R[2][2] * scale.z, position.z, + // Row 0: Right.x, Up.x, Forward.x, Pos.x + R[0][0] * scale.x, R[1][0] * scale.y, R[2][0] * scale.z, position.x, + // Row 1: Right.y, Up.y, Forward.y, Pos.y + R[0][1] * scale.x, R[1][1] * scale.y, R[2][1] * scale.z, position.y, + // Row 2: Right.z, Up.z, Forward.z, Pos.z + R[0][2] * scale.x, R[1][2] * scale.y, R[2][2] * scale.z, position.z, + // Row 3: 0, 0, 0, 1 0f, 0f, 0f, 1f ); } diff --git a/src/Runtime/Ghost.Entities/System.cs b/src/Runtime/Ghost.Entities/System.cs index 882631b..1cf8a72 100644 --- a/src/Runtime/Ghost.Entities/System.cs +++ b/src/Runtime/Ghost.Entities/System.cs @@ -113,26 +113,26 @@ public abstract class SystemBase : ISystem } } -[AttributeUsage(AttributeTargets.Class | AttributeTargets.Struct, AllowMultiple = true)] -public class UpdateAfterAttribute : Attribute +public abstract class UpdateAfterAttribute : Attribute { - public Type SystemType { get; } + public abstract Type SystemType { get; } +} - public UpdateAfterAttribute(Type systemType) - { - SystemType = systemType; - } +public abstract class UpdateBeforeAttribute : Attribute +{ + public abstract Type SystemType { get; } } [AttributeUsage(AttributeTargets.Class | AttributeTargets.Struct, AllowMultiple = true)] -public class UpdateBeforeAttribute : Attribute +public class UpdateAfterAttribute : UpdateAfterAttribute { - public Type SystemType { get; } + public override Type SystemType => typeof(T); +} - public UpdateBeforeAttribute(Type systemType) - { - SystemType = systemType; - } +[AttributeUsage(AttributeTargets.Class | AttributeTargets.Struct, AllowMultiple = true)] +public class UpdateBeforeAttribute : UpdateBeforeAttribute +{ + public override Type SystemType => typeof(T); } [AttributeUsage(AttributeTargets.Class | AttributeTargets.Struct, AllowMultiple = false)] diff --git a/src/Runtime/Ghost.Graphics.D3D12/Ghost.Graphics.D3D12.csproj b/src/Runtime/Ghost.Graphics.D3D12/Ghost.Graphics.D3D12.csproj index 8fd03e3..2c8709b 100644 --- a/src/Runtime/Ghost.Graphics.D3D12/Ghost.Graphics.D3D12.csproj +++ b/src/Runtime/Ghost.Graphics.D3D12/Ghost.Graphics.D3D12.csproj @@ -26,7 +26,7 @@ - + diff --git a/src/Runtime/Ghost.Graphics/Core/Mesh.cs b/src/Runtime/Ghost.Graphics/Core/Mesh.cs index 7dbf8c3..63c48b1 100644 --- a/src/Runtime/Ghost.Graphics/Core/Mesh.cs +++ b/src/Runtime/Ghost.Graphics/Core/Mesh.cs @@ -15,10 +15,12 @@ namespace Ghost.Graphics.Core; public struct Meshlet { public SphereBounds boundingSphere; // 16 bytes + public SphereBounds parentBoundingSphere; // 16 bytes public AABB boundingBox; // 24 bytes public uint vertexOffset; // offset into meshlet vertex index array public uint triangleOffset; // offset into packed triangle array public uint groupIndex; // owning group + public float clusterError; // geometric error of this meshlet/cluster public float parentError; // geometric refinement error carried into runtime LOD tests public byte vertexCount; // max 64 public byte triangleCount; // max 124 @@ -319,13 +321,15 @@ public struct Mesh : IResourceReleasable var meshlet = new Meshlet { boundingSphere = new SphereBounds(cluster.bounds.center, cluster.bounds.radius), + parentBoundingSphere = new SphereBounds(group.simplified.center, group.simplified.radius), boundingBox = new AABB(cluster.bounds.center - cluster.bounds.radius, cluster.bounds.center + cluster.bounds.radius), vertexCount = (byte)cluster.vertexCount, triangleCount = (byte)(cluster.localIndexCount / 3), vertexOffset = (uint)data.meshletVertices.Count, triangleOffset = (uint)data.meshletTriangles.Count, groupIndex = (uint)data.groups.Count - 1, - parentError = cluster.bounds.error, + clusterError = cluster.bounds.error, + parentError = group.simplified.error, localMaterialIndex = 0, // TODO: support multiple materials lodLevel = (byte)group.depth, }; diff --git a/src/Runtime/Ghost.Graphics/Shaders/Includes/Common.hlsl b/src/Runtime/Ghost.Graphics/Shaders/Includes/Common.hlsl index 8b6bddb..c988551 100644 --- a/src/Runtime/Ghost.Graphics/Shaders/Includes/Common.hlsl +++ b/src/Runtime/Ghost.Graphics/Shaders/Includes/Common.hlsl @@ -13,11 +13,13 @@ struct Vertex struct Meshlet { float4 boundingSphere; + float4 parentBoundingSphere; float3 boundingBoxMin; float3 boundingBoxMax; uint vertexOffset; uint triangleOffset; uint groupIndex; + float clusterError; float parentError; uint packedCounts; // byte vertexCount, byte triangleCount, byte localMaterialIndex, byte lodLevel }; diff --git a/src/Runtime/Ghost.Graphics/test.gshdr b/src/Runtime/Ghost.Graphics/test.gshdr index eee097b..4e2c2da 100644 --- a/src/Runtime/Ghost.Graphics/test.gshdr +++ b/src/Runtime/Ghost.Graphics/test.gshdr @@ -46,19 +46,59 @@ shader "MyShader/Standard" groupshared ASPayload s_Payload; + // computes approximate (perspective) projection error of a cluster in screen space + float BoundsError(float3 center, float radius, float error, float3 cameraPos, float cameraProj, float cameraZNear) + { + float d = length(center - cameraPos) - radius; + return error / max(d, cameraZNear) * (cameraProj * 0.5f); + } + [numthreads(1, 1, 1)] void ASMain(uint3 groupID : SV_GroupID) { InstanceData instanceData = LoadData(g_PushConstantData.instanceBuffer, g_PushConstantData.instanceIndex); MeshData meshData = LoadData(instanceData.meshBuffer, 0); - ByteAddressBuffer meshletBuffer = GET_BUFFER(meshData.meshletBuffer); - Meshlet meshlet = meshletBuffer.Load(groupID.x * sizeof(Meshlet)); - + uint meshletIndex = groupID.x; s_Payload.meshletIndex = groupID.x; + ByteAddressBuffer meshletBuffer = GET_BUFFER(meshData.meshletBuffer); + Meshlet meshlet = meshletBuffer.Load(meshletIndex * sizeof(Meshlet)); + + ViewData viewData = LoadData(g_PushConstantData.viewBuffer, 0); + + // Assume uniform scale + float scale = length(float3(instanceData.localToWorld[0][0], instanceData.localToWorld[1][0], instanceData.localToWorld[2][0])); + + // Nanite projection metric: cot(fovy / 2) -> projectionMatrix[1][1] + // Multiply by screenSize.y to get error in pixels. + float cameraProj = viewData.projectionMatrix[1][1] * viewData.screenSize.y; + + float threshold = 1.0f; + + // Calculate THIS cluster's error using ITS OWN bounding sphere + float3 clusterCenter = mul(instanceData.localToWorld, float4(meshlet.boundingSphere.xyz, 1.0f)).xyz; + float clusterRadius = meshlet.boundingSphere.w * scale; + float clusterError = meshlet.clusterError * scale; + float clusterProjError = BoundsError(clusterCenter, clusterRadius, clusterError, viewData.cameraPosition, cameraProj, viewData.nearClip); + + // Calculate the PARENT'S error using the PARENT'S bounding sphere + float3 parentCenter = mul(instanceData.localToWorld, float4(meshlet.parentBoundingSphere.xyz, 1.0f)).xyz; + float parentRadius = meshlet.parentBoundingSphere.w * scale; + float parentError = meshlet.parentError * scale; + float parentProjError = BoundsError(parentCenter, parentRadius, parentError, viewData.cameraPosition, cameraProj, viewData.nearClip); + + bool isRoot = meshlet.parentError >= 3.402823466e+38F; // FLT_MAX + uint emitMeshlet = ((parentProjError > threshold || isRoot) && clusterProjError <= threshold) ? 1u : 0u; + + // Failsafe: if we are at the finest LOD (LOD 0) and the error is STILL too high, + // we must render it anyway because there is no more detailed geometry to fall back on. uint lodLevel = (meshlet.packedCounts >> 24) & 0xFFu; - uint emitMeshlet = lodLevel == 0u ? 1u : 0u; + if (lodLevel == 0u && parentProjError > threshold) + { + emitMeshlet = 1u; + } + DispatchMesh(emitMeshlet, 1u, 1u, s_Payload); } @@ -140,6 +180,9 @@ shader "MyShader/Standard" float b = float((hash & 0x0000FFu)) / 255.0; return float4(r, g, b, 1.0); + + // InstanceData instanceData = LoadData(g_PushConstantData.instanceBuffer, g_PushConstantData.instanceIndex); + // return mul(instanceData.localToWorld, float4(input.normal, 1.0f)); } } diff --git a/src/Test/Ghost.Graphics.Test/RenderPipeline/TestRenderPipeline.cs b/src/Test/Ghost.Graphics.Test/RenderPipeline/TestRenderPipeline.cs index 2ec3172..6f72e40 100644 --- a/src/Test/Ghost.Graphics.Test/RenderPipeline/TestRenderPipeline.cs +++ b/src/Test/Ghost.Graphics.Test/RenderPipeline/TestRenderPipeline.cs @@ -268,7 +268,7 @@ public unsafe partial class TestRenderPipeline : IRenderPipeline nearClip = request.view.nearClipPlane, cameraDirection = viewMatrix.c2.xyz, // check if that's correct orientation farClip = request.view.farClipPlane, - screenSize = new float4(request.view.sensorSize.x, request.view.sensorSize.y, 1.0f / request.view.sensorSize.x, 1.0f / request.view.sensorSize.y) + screenSize = new float4(rtSize.x, rtSize.y, 1.0f / rtSize.x, 1.0f / rtSize.y) }; ctx.CommandBuffer.Barrier(BarrierDesc.Buffer(viewBufferResource, BarrierSync.Copy, BarrierAccess.CopyDest)); diff --git a/src/Test/Ghost.Graphics.Test/Systems/CameraMovingSystem.cs b/src/Test/Ghost.Graphics.Test/Systems/CameraMovingSystem.cs new file mode 100644 index 0000000..1536aeb --- /dev/null +++ b/src/Test/Ghost.Graphics.Test/Systems/CameraMovingSystem.cs @@ -0,0 +1,50 @@ +using Ghost.Core; +using Ghost.Engine.Components; +using Ghost.Engine.Utilities; +using Ghost.Entities; +using Misaki.HighPerformance.Mathematics; + +namespace Ghost.Graphics.Test.Systems; + +internal class CameraMovingSystem : ISystem +{ + private Identifier _cameraQueryID; + + private random _random; + private float3 _target; + + public void Initialize(ref readonly SystemAPI systemAPI) + { + _cameraQueryID = QueryBuilder.Create() + .WithAll() + .Build(systemAPI.World, true); + + _random = new random(123456); + _target = _random.NextFloat3(-20, 20); + } + + public void Update(ref readonly SystemAPI systemAPI) + { + ref var cameraQuery = ref systemAPI.World.ComponentManager.GetEntityQueryReference(_cameraQueryID); + + foreach (ref var ltw in cameraQuery.GetComponentIterator()) + { + var position = ltw.matrix.c3.xyz; + if (math.distance(position, _target) < 0.1f) + { + _target = _random.NextFloat3(-20, 20); + } + + var newPosition = math.lerp(position, _target, 0.025f); + var forward = math.normalize(new float3(0f, 0.5f, 0f) - newPosition); + + var rotation = quaternion.LookRotation(forward, math.up()); + var matrix = float4x4.TRS(newPosition, rotation, float3.one); + ltw.matrix = matrix; + } + } + + public void Cleanup(ref readonly SystemAPI systemAPI) + { + } +} diff --git a/src/Test/Ghost.Graphics.Test/Systems/RenderExtractionSystem.cs b/src/Test/Ghost.Graphics.Test/Systems/RenderExtractionSystem.cs index 5c2125d..9ffb64a 100644 --- a/src/Test/Ghost.Graphics.Test/Systems/RenderExtractionSystem.cs +++ b/src/Test/Ghost.Graphics.Test/Systems/RenderExtractionSystem.cs @@ -11,6 +11,7 @@ using Misaki.HighPerformance.Mathematics; namespace Ghost.Graphics.Test.Systems; [RenderPipelineSystem] +[UpdateAfter] public class RenderExtractionSystem : ISystem { private RenderSystem _renderSystem = null!; diff --git a/src/Test/Ghost.Graphics.Test/Utilities/MeshUtility.cs b/src/Test/Ghost.Graphics.Test/Utilities/MeshUtility.cs index 3c2048b..e4a945f 100644 --- a/src/Test/Ghost.Graphics.Test/Utilities/MeshUtility.cs +++ b/src/Test/Ghost.Graphics.Test/Utilities/MeshUtility.cs @@ -66,6 +66,7 @@ internal static class MeshUtility for (var i = 0u; i < scene.Get()->nodes.count; i++) { + var data = scene.Get()->nodes.data; var node = scene.Get()->nodes.data[i]; if (node->is_root) { @@ -102,19 +103,27 @@ internal static class MeshUtility var colIdx = pMesh->vertex_color.exists ? pMesh->vertex_color.indices.data[ufbxTopologyIndex] : uint.MaxValue; var btanIdx = pMesh->vertex_bitangent.exists ? pMesh->vertex_bitangent.indices.data[ufbxTopologyIndex] : uint.MaxValue; + var position = pMesh->vertex_position.values.data[posIdx]; + var normal = normIdx != uint.MaxValue ? pMesh->vertex_normal.values.data[normIdx] : default; + var uv = uvIdx != uint.MaxValue ? pMesh->vertex_uv.values.data[uvIdx] : default; + var color = colIdx != uint.MaxValue ? pMesh->vertex_color.values.data[colIdx] : default; + var vertex = new Vertex { - position = pMesh->vertex_position.values.data[posIdx], - normal = normIdx != uint.MaxValue ? pMesh->vertex_normal.values.data[normIdx] : default, - uv = uvIdx != uint.MaxValue ? pMesh->vertex_uv.values.data[uvIdx] : default, - color = colIdx != uint.MaxValue ? new Color128(pMesh->vertex_color.values.data[colIdx]) : default, + position = new float3(position.x, position.y, position.z), + normal = new float3(normal.x, normal.y, normal.z), + uv = new float2(uv.x, uv.y), + color = new Color128(color.x, color.y, color.z, color.w) }; if (tanIdx != uint.MaxValue) { - var t = pMesh->vertex_tangent.values.data[tanIdx]; + var mt = pMesh->vertex_tangent.values.data[tanIdx]; + var mb = btanIdx != uint.MaxValue ? pMesh->vertex_bitangent.values.data[btanIdx] : default; + + var t = new float3(mt.x, mt.y, mt.z); var n = vertex.normal; - var b = btanIdx != uint.MaxValue ? pMesh->vertex_bitangent.values.data[btanIdx] : math.cross(n, t); + var b = btanIdx != uint.MaxValue ? new float3(mb.x, mb.y, mb.z) : math.cross(n, t); vertex.tangent = ComputeTangent(t, n, b); } diff --git a/src/Test/Ghost.Graphics.Test/Windows/GraphicsTestWindow.xaml.cs b/src/Test/Ghost.Graphics.Test/Windows/GraphicsTestWindow.xaml.cs index 1236733..59af0e2 100644 --- a/src/Test/Ghost.Graphics.Test/Windows/GraphicsTestWindow.xaml.cs +++ b/src/Test/Ghost.Graphics.Test/Windows/GraphicsTestWindow.xaml.cs @@ -10,6 +10,7 @@ using Microsoft.UI.Xaml.Controls; using Microsoft.UI.Xaml.Media; using Misaki.HighPerformance.LowLevel.Buffer; using Misaki.HighPerformance.Mathematics; +using Windows.Devices.Geolocation; namespace Ghost.Graphics.Test.Windows; @@ -75,6 +76,7 @@ public sealed partial class GraphicsTestWindow : Window // Add Systems var group = _world.SystemManager.GetSystem(); group.AddSystem(); + group.AddSystem(); group.SortSystems(); _world.SystemManager.InitializeAll(default); diff --git a/src/ThridParty/Ghost.MeshOptimizer/Api.cs b/src/ThridParty/Ghost.MeshOptimizer/Api.cs new file mode 100644 index 0000000..808c975 --- /dev/null +++ b/src/ThridParty/Ghost.MeshOptimizer/Api.cs @@ -0,0 +1,30 @@ +using System.Reflection; +using System.Runtime.InteropServices; + +namespace Ghost.MeshOptimizer; + +public partial class Api +{ + static Api() + { + NativeLibrary.SetDllImportResolver(Assembly.GetExecutingAssembly(), (libraryName, assembly, searchPath) => + { + if (libraryName != "meshoptimizer") + { + return IntPtr.Zero; + } + + var platform = OperatingSystem.IsWindows() ? "win" : + OperatingSystem.IsLinux() ? "linux" : + OperatingSystem.IsMacOS() ? "osx" : "unknown"; + var ext = OperatingSystem.IsWindows() ? ".dll" : + OperatingSystem.IsLinux() ? ".so" : + OperatingSystem.IsMacOS() ? ".dylib" : ""; + + var arch = Environment.Is64BitProcess ? "x64" : "x86"; + var nativeDllDir = Path.Combine("./runtimes", platform + "-" + arch, "native"); + + return NativeLibrary.Load(Path.Combine(nativeDllDir, libraryName + ext)); + }); + } +} diff --git a/src/ThridParty/Ghost.MeshOptimizer/Generated/Api.cs b/src/ThridParty/Ghost.MeshOptimizer/Generated/Api.cs index 3c4d2e2..256afad 100644 --- a/src/ThridParty/Ghost.MeshOptimizer/Generated/Api.cs +++ b/src/ThridParty/Ghost.MeshOptimizer/Generated/Api.cs @@ -5,29 +5,6 @@ namespace Ghost.MeshOptimizer { public static unsafe partial class Api { - static Api() - { - NativeLibrary.SetDllImportResolver(Assembly.GetExecutingAssembly(), (libraryName, assembly, searchPath) => - { - if (libraryName != "meshoptimizer") - { - return IntPtr.Zero; - } - - var platform = OperatingSystem.IsWindows() ? "win" : - OperatingSystem.IsLinux() ? "linux" : - OperatingSystem.IsMacOS() ? "osx" : "unknown"; - var ext = OperatingSystem.IsWindows() ? ".dll" : - OperatingSystem.IsLinux() ? ".so" : - OperatingSystem.IsMacOS() ? ".dylib" : ""; - - var arch = Environment.Is64BitProcess ? "x64" : "x86"; - var nativeDllDir = Path.Combine("./runtimes", platform + "-" + arch, "native"); - - return NativeLibrary.Load(Path.Combine(nativeDllDir, libraryName + ext)); - }); - } - [DllImport("meshoptimizer", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)] [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); diff --git a/src/ThridParty/Ghost.Ufbx/Api.cs b/src/ThridParty/Ghost.Ufbx/Api.cs new file mode 100644 index 0000000..d1a981b --- /dev/null +++ b/src/ThridParty/Ghost.Ufbx/Api.cs @@ -0,0 +1,30 @@ +using System.Reflection; +using System.Runtime.InteropServices; + +namespace Ghost.Ufbx; + +public partial class Api +{ + static Api() + { + NativeLibrary.SetDllImportResolver(Assembly.GetExecutingAssembly(), (libraryName, assembly, searchPath) => + { + if (libraryName != "ufbx") + { + return IntPtr.Zero; + } + + var platform = OperatingSystem.IsWindows() ? "win" : + OperatingSystem.IsLinux() ? "linux" : + OperatingSystem.IsMacOS() ? "osx" : "unknown"; + var ext = OperatingSystem.IsWindows() ? ".dll" : + OperatingSystem.IsLinux() ? ".so" : + OperatingSystem.IsMacOS() ? ".dylib" : ""; + + var arch = Environment.Is64BitProcess ? "x64" : "x86"; + var nativeDllDir = Path.Combine("./runtimes", platform + "-" + arch, "native"); + + return NativeLibrary.Load(Path.Combine(nativeDllDir, libraryName + ext)); + }); + } +} diff --git a/src/ThridParty/Ghost.Ufbx/Generated/Api.cs b/src/ThridParty/Ghost.Ufbx/Generated/Api.cs index cc66cf6..cffc2dc 100644 --- a/src/ThridParty/Ghost.Ufbx/Generated/Api.cs +++ b/src/ThridParty/Ghost.Ufbx/Generated/Api.cs @@ -1,5 +1,4 @@ using System; -using System.Reflection; using System.Runtime.InteropServices; using static Ghost.Ufbx.ufbx_aperture_format; using static Ghost.Ufbx.ufbx_aperture_mode; @@ -168,29 +167,6 @@ namespace Ghost.Ufbx public const int UFBX_BAKE_STEP_HANDLING_COUNT = (int)(UFBX_BAKE_STEP_HANDLING_IGNORE + 1); - static Api() - { - NativeLibrary.SetDllImportResolver(Assembly.GetExecutingAssembly(), (libraryName, assembly, searchPath) => - { - if (libraryName != "ufbx") - { - return IntPtr.Zero; - } - - var platform = OperatingSystem.IsWindows() ? "win" : - OperatingSystem.IsLinux() ? "linux" : - OperatingSystem.IsMacOS() ? "osx" : "unknown"; - var ext = OperatingSystem.IsWindows() ? ".dll" : - OperatingSystem.IsLinux() ? ".so" : - OperatingSystem.IsMacOS() ? ".dylib" : ""; - - var arch = Environment.Is64BitProcess ? "x64" : "x86"; - var nativeDllDir = Path.Combine("./runtimes", platform + "-" + arch, "native"); - - return NativeLibrary.Load(Path.Combine(nativeDllDir, libraryName + ext)); - }); - } - [DllImport("ufbx", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)] [return: NativeTypeName("_Bool")] public static extern bool ufbx_is_thread_safe(); @@ -241,12 +217,10 @@ namespace Ghost.Ufbx public static extern float ufbx_find_real([NativeTypeName("const ufbx_props *")] ufbx_props* props, [NativeTypeName("const char *")] sbyte* name, [NativeTypeName("ufbx_real")] float def); [DllImport("ufbx", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)] - [return: NativeTypeName("ufbx_vec3")] - public static extern Misaki.HighPerformance.Mathematics.float3 ufbx_find_vec3_len([NativeTypeName("const ufbx_props *")] ufbx_props* props, [NativeTypeName("const char *")] sbyte* name, [NativeTypeName("size_t")] nuint name_len, [NativeTypeName("ufbx_vec3")] Misaki.HighPerformance.Mathematics.float3 def); + public static extern ufbx_vec3 ufbx_find_vec3_len([NativeTypeName("const ufbx_props *")] ufbx_props* props, [NativeTypeName("const char *")] sbyte* name, [NativeTypeName("size_t")] nuint name_len, ufbx_vec3 def); [DllImport("ufbx", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)] - [return: NativeTypeName("ufbx_vec3")] - public static extern Misaki.HighPerformance.Mathematics.float3 ufbx_find_vec3([NativeTypeName("const ufbx_props *")] ufbx_props* props, [NativeTypeName("const char *")] sbyte* name, [NativeTypeName("ufbx_vec3")] Misaki.HighPerformance.Mathematics.float3 def); + public static extern ufbx_vec3 ufbx_find_vec3([NativeTypeName("const ufbx_props *")] ufbx_props* props, [NativeTypeName("const char *")] sbyte* name, ufbx_vec3 def); [DllImport("ufbx", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)] [return: NativeTypeName("int64_t")] @@ -322,8 +296,7 @@ namespace Ghost.Ufbx public static extern ufbx_anim_prop_list ufbx_find_anim_props([NativeTypeName("const ufbx_anim_layer *")] ufbx_anim_layer* layer, [NativeTypeName("const ufbx_element *")] ufbx_element* element); [DllImport("ufbx", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)] - [return: NativeTypeName("ufbx_matrix")] - public static extern Misaki.HighPerformance.Mathematics.float3x4 ufbx_get_compatible_matrix_for_normals([NativeTypeName("const ufbx_node *")] ufbx_node* node); + public static extern ufbx_matrix ufbx_get_compatible_matrix_for_normals([NativeTypeName("const ufbx_node *")] ufbx_node* node); [DllImport("ufbx", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)] [return: NativeTypeName("ptrdiff_t")] @@ -362,16 +335,14 @@ namespace Ghost.Ufbx public static extern float ufbx_evaluate_anim_value_real([NativeTypeName("const ufbx_anim_value *")] ufbx_anim_value* anim_value, double time); [DllImport("ufbx", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)] - [return: NativeTypeName("ufbx_vec3")] - public static extern Misaki.HighPerformance.Mathematics.float3 ufbx_evaluate_anim_value_vec3([NativeTypeName("const ufbx_anim_value *")] ufbx_anim_value* anim_value, double time); + public static extern ufbx_vec3 ufbx_evaluate_anim_value_vec3([NativeTypeName("const ufbx_anim_value *")] ufbx_anim_value* anim_value, double time); [DllImport("ufbx", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)] [return: NativeTypeName("ufbx_real")] public static extern float ufbx_evaluate_anim_value_real_flags([NativeTypeName("const ufbx_anim_value *")] ufbx_anim_value* anim_value, double time, [NativeTypeName("uint32_t")] uint flags); [DllImport("ufbx", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)] - [return: NativeTypeName("ufbx_vec3")] - public static extern Misaki.HighPerformance.Mathematics.float3 ufbx_evaluate_anim_value_vec3_flags([NativeTypeName("const ufbx_anim_value *")] ufbx_anim_value* anim_value, double time, [NativeTypeName("uint32_t")] uint flags); + public static extern ufbx_vec3 ufbx_evaluate_anim_value_vec3_flags([NativeTypeName("const ufbx_anim_value *")] ufbx_anim_value* anim_value, double time, [NativeTypeName("uint32_t")] uint flags); [DllImport("ufbx", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)] public static extern ufbx_prop ufbx_evaluate_prop_len([NativeTypeName("const ufbx_anim *")] ufbx_anim* anim, [NativeTypeName("const ufbx_element *")] ufbx_element* element, [NativeTypeName("const char *")] sbyte* name, [NativeTypeName("size_t")] nuint name_len, double time); @@ -439,12 +410,10 @@ namespace Ghost.Ufbx public static extern ufbx_baked_element* ufbx_find_baked_element(ufbx_baked_anim* bake, ufbx_element* element); [DllImport("ufbx", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)] - [return: NativeTypeName("ufbx_vec3")] - public static extern Misaki.HighPerformance.Mathematics.float3 ufbx_evaluate_baked_vec3(ufbx_baked_vec3_list keyframes, double time); + public static extern ufbx_vec3 ufbx_evaluate_baked_vec3(ufbx_baked_vec3_list keyframes, double time); [DllImport("ufbx", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)] - [return: NativeTypeName("ufbx_quat")] - public static extern Misaki.HighPerformance.Mathematics.quaternion ufbx_evaluate_baked_quat(ufbx_baked_quat_list keyframes, double time); + public static extern ufbx_quat ufbx_evaluate_baked_quat(ufbx_baked_quat_list keyframes, double time); [DllImport("ufbx", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)] public static extern ufbx_bone_pose* ufbx_get_bone_pose([NativeTypeName("const ufbx_pose *")] ufbx_pose* pose, [NativeTypeName("const ufbx_node *")] ufbx_node* node); @@ -478,78 +447,62 @@ namespace Ghost.Ufbx public static extern bool ufbx_coordinate_axes_valid(ufbx_coordinate_axes axes); [DllImport("ufbx", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)] - [return: NativeTypeName("ufbx_vec3")] - public static extern Misaki.HighPerformance.Mathematics.float3 ufbx_vec3_normalize([NativeTypeName("ufbx_vec3")] Misaki.HighPerformance.Mathematics.float3 v); + public static extern ufbx_vec3 ufbx_vec3_normalize(ufbx_vec3 v); [DllImport("ufbx", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)] [return: NativeTypeName("ufbx_real")] - public static extern float ufbx_quat_dot([NativeTypeName("ufbx_quat")] Misaki.HighPerformance.Mathematics.quaternion a, [NativeTypeName("ufbx_quat")] Misaki.HighPerformance.Mathematics.quaternion b); + public static extern float ufbx_quat_dot(ufbx_quat a, ufbx_quat b); [DllImport("ufbx", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)] - [return: NativeTypeName("ufbx_quat")] - public static extern Misaki.HighPerformance.Mathematics.quaternion ufbx_quat_mul([NativeTypeName("ufbx_quat")] Misaki.HighPerformance.Mathematics.quaternion a, [NativeTypeName("ufbx_quat")] Misaki.HighPerformance.Mathematics.quaternion b); + public static extern ufbx_quat ufbx_quat_mul(ufbx_quat a, ufbx_quat b); [DllImport("ufbx", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)] - [return: NativeTypeName("ufbx_quat")] - public static extern Misaki.HighPerformance.Mathematics.quaternion ufbx_quat_normalize([NativeTypeName("ufbx_quat")] Misaki.HighPerformance.Mathematics.quaternion q); + public static extern ufbx_quat ufbx_quat_normalize(ufbx_quat q); [DllImport("ufbx", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)] - [return: NativeTypeName("ufbx_quat")] - public static extern Misaki.HighPerformance.Mathematics.quaternion ufbx_quat_fix_antipodal([NativeTypeName("ufbx_quat")] Misaki.HighPerformance.Mathematics.quaternion q, [NativeTypeName("ufbx_quat")] Misaki.HighPerformance.Mathematics.quaternion reference); + public static extern ufbx_quat ufbx_quat_fix_antipodal(ufbx_quat q, ufbx_quat reference); [DllImport("ufbx", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)] - [return: NativeTypeName("ufbx_quat")] - public static extern Misaki.HighPerformance.Mathematics.quaternion ufbx_quat_slerp([NativeTypeName("ufbx_quat")] Misaki.HighPerformance.Mathematics.quaternion a, [NativeTypeName("ufbx_quat")] Misaki.HighPerformance.Mathematics.quaternion b, [NativeTypeName("ufbx_real")] float t); + public static extern ufbx_quat ufbx_quat_slerp(ufbx_quat a, ufbx_quat b, [NativeTypeName("ufbx_real")] float t); [DllImport("ufbx", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)] - [return: NativeTypeName("ufbx_vec3")] - public static extern Misaki.HighPerformance.Mathematics.float3 ufbx_quat_rotate_vec3([NativeTypeName("ufbx_quat")] Misaki.HighPerformance.Mathematics.quaternion q, [NativeTypeName("ufbx_vec3")] Misaki.HighPerformance.Mathematics.float3 v); + public static extern ufbx_vec3 ufbx_quat_rotate_vec3(ufbx_quat q, ufbx_vec3 v); [DllImport("ufbx", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)] - [return: NativeTypeName("ufbx_vec3")] - public static extern Misaki.HighPerformance.Mathematics.float3 ufbx_quat_to_euler([NativeTypeName("ufbx_quat")] Misaki.HighPerformance.Mathematics.quaternion q, ufbx_rotation_order order); + public static extern ufbx_vec3 ufbx_quat_to_euler(ufbx_quat q, ufbx_rotation_order order); [DllImport("ufbx", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)] - [return: NativeTypeName("ufbx_quat")] - public static extern Misaki.HighPerformance.Mathematics.quaternion ufbx_euler_to_quat([NativeTypeName("ufbx_vec3")] Misaki.HighPerformance.Mathematics.float3 v, ufbx_rotation_order order); + public static extern ufbx_quat ufbx_euler_to_quat(ufbx_vec3 v, ufbx_rotation_order order); [DllImport("ufbx", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)] - [return: NativeTypeName("ufbx_matrix")] - public static extern Misaki.HighPerformance.Mathematics.float3x4 ufbx_matrix_mul([NativeTypeName("const ufbx_matrix *")] Misaki.HighPerformance.Mathematics.float3x4* a, [NativeTypeName("const ufbx_matrix *")] Misaki.HighPerformance.Mathematics.float3x4* b); + public static extern ufbx_matrix ufbx_matrix_mul([NativeTypeName("const ufbx_matrix *")] ufbx_matrix* a, [NativeTypeName("const ufbx_matrix *")] ufbx_matrix* b); [DllImport("ufbx", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)] [return: NativeTypeName("ufbx_real")] - public static extern float ufbx_matrix_determinant([NativeTypeName("const ufbx_matrix *")] Misaki.HighPerformance.Mathematics.float3x4* m); + public static extern float ufbx_matrix_determinant([NativeTypeName("const ufbx_matrix *")] ufbx_matrix* m); [DllImport("ufbx", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)] - [return: NativeTypeName("ufbx_matrix")] - public static extern Misaki.HighPerformance.Mathematics.float3x4 ufbx_matrix_invert([NativeTypeName("const ufbx_matrix *")] Misaki.HighPerformance.Mathematics.float3x4* m); + public static extern ufbx_matrix ufbx_matrix_invert([NativeTypeName("const ufbx_matrix *")] ufbx_matrix* m); [DllImport("ufbx", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)] - [return: NativeTypeName("ufbx_matrix")] - public static extern Misaki.HighPerformance.Mathematics.float3x4 ufbx_matrix_for_normals([NativeTypeName("const ufbx_matrix *")] Misaki.HighPerformance.Mathematics.float3x4* m); + public static extern ufbx_matrix ufbx_matrix_for_normals([NativeTypeName("const ufbx_matrix *")] ufbx_matrix* m); [DllImport("ufbx", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)] - [return: NativeTypeName("ufbx_vec3")] - public static extern Misaki.HighPerformance.Mathematics.float3 ufbx_transform_position([NativeTypeName("const ufbx_matrix *")] Misaki.HighPerformance.Mathematics.float3x4* m, [NativeTypeName("ufbx_vec3")] Misaki.HighPerformance.Mathematics.float3 v); + public static extern ufbx_vec3 ufbx_transform_position([NativeTypeName("const ufbx_matrix *")] ufbx_matrix* m, ufbx_vec3 v); [DllImport("ufbx", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)] - [return: NativeTypeName("ufbx_vec3")] - public static extern Misaki.HighPerformance.Mathematics.float3 ufbx_transform_direction([NativeTypeName("const ufbx_matrix *")] Misaki.HighPerformance.Mathematics.float3x4* m, [NativeTypeName("ufbx_vec3")] Misaki.HighPerformance.Mathematics.float3 v); + public static extern ufbx_vec3 ufbx_transform_direction([NativeTypeName("const ufbx_matrix *")] ufbx_matrix* m, ufbx_vec3 v); [DllImport("ufbx", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)] - [return: NativeTypeName("ufbx_matrix")] - public static extern Misaki.HighPerformance.Mathematics.float3x4 ufbx_transform_to_matrix([NativeTypeName("const ufbx_transform *")] ufbx_transform* t); + public static extern ufbx_matrix ufbx_transform_to_matrix([NativeTypeName("const ufbx_transform *")] ufbx_transform* t); [DllImport("ufbx", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)] - public static extern ufbx_transform ufbx_matrix_to_transform([NativeTypeName("const ufbx_matrix *")] Misaki.HighPerformance.Mathematics.float3x4* m); + public static extern ufbx_transform ufbx_matrix_to_transform([NativeTypeName("const ufbx_matrix *")] ufbx_matrix* m); [DllImport("ufbx", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)] - [return: NativeTypeName("ufbx_matrix")] - public static extern Misaki.HighPerformance.Mathematics.float3x4 ufbx_catch_get_skin_vertex_matrix(ufbx_panic* panic, [NativeTypeName("const ufbx_skin_deformer *")] ufbx_skin_deformer* skin, [NativeTypeName("size_t")] nuint vertex, [NativeTypeName("const ufbx_matrix *")] Misaki.HighPerformance.Mathematics.float3x4* fallback); + public static extern ufbx_matrix ufbx_catch_get_skin_vertex_matrix(ufbx_panic* panic, [NativeTypeName("const ufbx_skin_deformer *")] ufbx_skin_deformer* skin, [NativeTypeName("size_t")] nuint vertex, [NativeTypeName("const ufbx_matrix *")] ufbx_matrix* fallback); - [return: NativeTypeName("ufbx_matrix")] - public static Misaki.HighPerformance.Mathematics.float3x4 ufbx_get_skin_vertex_matrix([NativeTypeName("const ufbx_skin_deformer *")] ufbx_skin_deformer* skin, [NativeTypeName("size_t")] nuint vertex, [NativeTypeName("const ufbx_matrix *")] Misaki.HighPerformance.Mathematics.float3x4* fallback) + public static ufbx_matrix ufbx_get_skin_vertex_matrix([NativeTypeName("const ufbx_skin_deformer *")] ufbx_skin_deformer* skin, [NativeTypeName("size_t")] nuint vertex, [NativeTypeName("const ufbx_matrix *")] ufbx_matrix* fallback) { return ufbx_catch_get_skin_vertex_matrix(null, skin, vertex, fallback); } @@ -559,18 +512,16 @@ namespace Ghost.Ufbx public static extern uint ufbx_get_blend_shape_offset_index([NativeTypeName("const ufbx_blend_shape *")] ufbx_blend_shape* shape, [NativeTypeName("size_t")] nuint vertex); [DllImport("ufbx", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)] - [return: NativeTypeName("ufbx_vec3")] - public static extern Misaki.HighPerformance.Mathematics.float3 ufbx_get_blend_shape_vertex_offset([NativeTypeName("const ufbx_blend_shape *")] ufbx_blend_shape* shape, [NativeTypeName("size_t")] nuint vertex); + public static extern ufbx_vec3 ufbx_get_blend_shape_vertex_offset([NativeTypeName("const ufbx_blend_shape *")] ufbx_blend_shape* shape, [NativeTypeName("size_t")] nuint vertex); [DllImport("ufbx", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)] - [return: NativeTypeName("ufbx_vec3")] - public static extern Misaki.HighPerformance.Mathematics.float3 ufbx_get_blend_vertex_offset([NativeTypeName("const ufbx_blend_deformer *")] ufbx_blend_deformer* blend, [NativeTypeName("size_t")] nuint vertex); + public static extern ufbx_vec3 ufbx_get_blend_vertex_offset([NativeTypeName("const ufbx_blend_deformer *")] ufbx_blend_deformer* blend, [NativeTypeName("size_t")] nuint vertex); [DllImport("ufbx", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)] - public static extern void ufbx_add_blend_shape_vertex_offsets([NativeTypeName("const ufbx_blend_shape *")] ufbx_blend_shape* shape, [NativeTypeName("ufbx_vec3 *")] Misaki.HighPerformance.Mathematics.float3* vertices, [NativeTypeName("size_t")] nuint num_vertices, [NativeTypeName("ufbx_real")] float weight); + public static extern void ufbx_add_blend_shape_vertex_offsets([NativeTypeName("const ufbx_blend_shape *")] ufbx_blend_shape* shape, ufbx_vec3* vertices, [NativeTypeName("size_t")] nuint num_vertices, [NativeTypeName("ufbx_real")] float weight); [DllImport("ufbx", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)] - public static extern void ufbx_add_blend_vertex_offsets([NativeTypeName("const ufbx_blend_deformer *")] ufbx_blend_deformer* blend, [NativeTypeName("ufbx_vec3 *")] Misaki.HighPerformance.Mathematics.float3* vertices, [NativeTypeName("size_t")] nuint num_vertices, [NativeTypeName("ufbx_real")] float weight); + public static extern void ufbx_add_blend_vertex_offsets([NativeTypeName("const ufbx_blend_deformer *")] ufbx_blend_deformer* blend, ufbx_vec3* vertices, [NativeTypeName("size_t")] nuint num_vertices, [NativeTypeName("ufbx_real")] float weight); [DllImport("ufbx", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)] [return: NativeTypeName("size_t")] @@ -629,12 +580,10 @@ namespace Ghost.Ufbx public static extern uint ufbx_topo_prev_vertex_edge([NativeTypeName("const ufbx_topo_edge *")] ufbx_topo_edge* topo, [NativeTypeName("size_t")] nuint num_topo, [NativeTypeName("uint32_t")] uint index); [DllImport("ufbx", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)] - [return: NativeTypeName("ufbx_vec3")] - public static extern Misaki.HighPerformance.Mathematics.float3 ufbx_catch_get_weighted_face_normal(ufbx_panic* panic, [NativeTypeName("const ufbx_vertex_vec3 *")] ufbx_vertex_vec3* positions, ufbx_face face); + public static extern ufbx_vec3 ufbx_catch_get_weighted_face_normal(ufbx_panic* panic, [NativeTypeName("const ufbx_vertex_vec3 *")] ufbx_vertex_vec3* positions, ufbx_face face); [DllImport("ufbx", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)] - [return: NativeTypeName("ufbx_vec3")] - public static extern Misaki.HighPerformance.Mathematics.float3 ufbx_get_weighted_face_normal([NativeTypeName("const ufbx_vertex_vec3 *")] ufbx_vertex_vec3* positions, ufbx_face face); + public static extern ufbx_vec3 ufbx_get_weighted_face_normal([NativeTypeName("const ufbx_vertex_vec3 *")] ufbx_vertex_vec3* positions, ufbx_face face); [DllImport("ufbx", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)] [return: NativeTypeName("size_t")] @@ -645,10 +594,10 @@ namespace Ghost.Ufbx public static extern nuint ufbx_generate_normal_mapping([NativeTypeName("const ufbx_mesh *")] ufbx_mesh* mesh, [NativeTypeName("const ufbx_topo_edge *")] ufbx_topo_edge* topo, [NativeTypeName("size_t")] nuint num_topo, [NativeTypeName("uint32_t *")] uint* normal_indices, [NativeTypeName("size_t")] nuint num_normal_indices, [NativeTypeName("_Bool")] bool assume_smooth); [DllImport("ufbx", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)] - public static extern void ufbx_catch_compute_normals(ufbx_panic* panic, [NativeTypeName("const ufbx_mesh *")] ufbx_mesh* mesh, [NativeTypeName("const ufbx_vertex_vec3 *")] ufbx_vertex_vec3* positions, [NativeTypeName("const uint32_t *")] uint* normal_indices, [NativeTypeName("size_t")] nuint num_normal_indices, [NativeTypeName("ufbx_vec3 *")] Misaki.HighPerformance.Mathematics.float3* normals, [NativeTypeName("size_t")] nuint num_normals); + public static extern void ufbx_catch_compute_normals(ufbx_panic* panic, [NativeTypeName("const ufbx_mesh *")] ufbx_mesh* mesh, [NativeTypeName("const ufbx_vertex_vec3 *")] ufbx_vertex_vec3* positions, [NativeTypeName("const uint32_t *")] uint* normal_indices, [NativeTypeName("size_t")] nuint num_normal_indices, ufbx_vec3* normals, [NativeTypeName("size_t")] nuint num_normals); [DllImport("ufbx", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)] - public static extern void ufbx_compute_normals([NativeTypeName("const ufbx_mesh *")] ufbx_mesh* mesh, [NativeTypeName("const ufbx_vertex_vec3 *")] ufbx_vertex_vec3* positions, [NativeTypeName("const uint32_t *")] uint* normal_indices, [NativeTypeName("size_t")] nuint num_normal_indices, [NativeTypeName("ufbx_vec3 *")] Misaki.HighPerformance.Mathematics.float3* normals, [NativeTypeName("size_t")] nuint num_normals); + public static extern void ufbx_compute_normals([NativeTypeName("const ufbx_mesh *")] ufbx_mesh* mesh, [NativeTypeName("const ufbx_vertex_vec3 *")] ufbx_vertex_vec3* positions, [NativeTypeName("const uint32_t *")] uint* normal_indices, [NativeTypeName("size_t")] nuint num_normal_indices, ufbx_vec3* normals, [NativeTypeName("size_t")] nuint num_normals); [DllImport("ufbx", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)] public static extern ufbx_mesh* ufbx_subdivide_mesh([NativeTypeName("const ufbx_mesh *")] ufbx_mesh* mesh, [NativeTypeName("size_t")] nuint level, [NativeTypeName("const ufbx_subdivide_opts *")] ufbx_subdivide_opts* opts, ufbx_error* error); @@ -677,7 +626,7 @@ namespace Ghost.Ufbx [DllImport("ufbx", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)] [return: NativeTypeName("size_t")] - public static extern nuint ufbx_read_geometry_cache_vec3([NativeTypeName("const ufbx_cache_frame *")] ufbx_cache_frame* frame, [NativeTypeName("ufbx_vec3 *")] Misaki.HighPerformance.Mathematics.float3* data, [NativeTypeName("size_t")] nuint num_data, [NativeTypeName("const ufbx_geometry_cache_data_opts *")] ufbx_geometry_cache_data_opts* opts); + public static extern nuint ufbx_read_geometry_cache_vec3([NativeTypeName("const ufbx_cache_frame *")] ufbx_cache_frame* frame, ufbx_vec3* data, [NativeTypeName("size_t")] nuint num_data, [NativeTypeName("const ufbx_geometry_cache_data_opts *")] ufbx_geometry_cache_data_opts* opts); [DllImport("ufbx", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)] [return: NativeTypeName("size_t")] @@ -685,7 +634,7 @@ namespace Ghost.Ufbx [DllImport("ufbx", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)] [return: NativeTypeName("size_t")] - public static extern nuint ufbx_sample_geometry_cache_vec3([NativeTypeName("const ufbx_cache_channel *")] ufbx_cache_channel* channel, double time, [NativeTypeName("ufbx_vec3 *")] Misaki.HighPerformance.Mathematics.float3* data, [NativeTypeName("size_t")] nuint num_data, [NativeTypeName("const ufbx_geometry_cache_data_opts *")] ufbx_geometry_cache_data_opts* opts); + public static extern nuint ufbx_sample_geometry_cache_vec3([NativeTypeName("const ufbx_cache_channel *")] ufbx_cache_channel* channel, double time, ufbx_vec3* data, [NativeTypeName("size_t")] nuint num_data, [NativeTypeName("const ufbx_geometry_cache_data_opts *")] ufbx_geometry_cache_data_opts* opts); [DllImport("ufbx", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)] public static extern ufbx_dom_node* ufbx_dom_find_len([NativeTypeName("const ufbx_dom_node *")] ufbx_dom_node* parent, [NativeTypeName("const char *")] sbyte* name, [NativeTypeName("size_t")] nuint name_len); @@ -711,16 +660,13 @@ namespace Ghost.Ufbx public static extern float ufbx_catch_get_vertex_real(ufbx_panic* panic, [NativeTypeName("const ufbx_vertex_real *")] ufbx_vertex_real* v, [NativeTypeName("size_t")] nuint index); [DllImport("ufbx", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)] - [return: NativeTypeName("ufbx_vec2")] - public static extern Misaki.HighPerformance.Mathematics.float2 ufbx_catch_get_vertex_vec2(ufbx_panic* panic, [NativeTypeName("const ufbx_vertex_vec2 *")] ufbx_vertex_vec2* v, [NativeTypeName("size_t")] nuint index); + public static extern ufbx_vec2 ufbx_catch_get_vertex_vec2(ufbx_panic* panic, [NativeTypeName("const ufbx_vertex_vec2 *")] ufbx_vertex_vec2* v, [NativeTypeName("size_t")] nuint index); [DllImport("ufbx", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)] - [return: NativeTypeName("ufbx_vec3")] - public static extern Misaki.HighPerformance.Mathematics.float3 ufbx_catch_get_vertex_vec3(ufbx_panic* panic, [NativeTypeName("const ufbx_vertex_vec3 *")] ufbx_vertex_vec3* v, [NativeTypeName("size_t")] nuint index); + public static extern ufbx_vec3 ufbx_catch_get_vertex_vec3(ufbx_panic* panic, [NativeTypeName("const ufbx_vertex_vec3 *")] ufbx_vertex_vec3* v, [NativeTypeName("size_t")] nuint index); [DllImport("ufbx", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)] - [return: NativeTypeName("ufbx_vec4")] - public static extern Misaki.HighPerformance.Mathematics.float4 ufbx_catch_get_vertex_vec4(ufbx_panic* panic, [NativeTypeName("const ufbx_vertex_vec4 *")] ufbx_vertex_vec4* v, [NativeTypeName("size_t")] nuint index); + public static extern ufbx_vec4 ufbx_catch_get_vertex_vec4(ufbx_panic* panic, [NativeTypeName("const ufbx_vertex_vec4 *")] ufbx_vertex_vec4* v, [NativeTypeName("size_t")] nuint index); [return: NativeTypeName("ufbx_real")] public static float ufbx_get_vertex_real([NativeTypeName("const ufbx_vertex_real *")] ufbx_vertex_real* v, [NativeTypeName("size_t")] nuint index) @@ -729,22 +675,19 @@ namespace Ghost.Ufbx return v->values.data[(int)(v->indices.data[index])]; } - [return: NativeTypeName("ufbx_vec2")] - public static Misaki.HighPerformance.Mathematics.float2 ufbx_get_vertex_vec2([NativeTypeName("const ufbx_vertex_vec2 *")] ufbx_vertex_vec2* v, [NativeTypeName("size_t")] nuint index) + public static ufbx_vec2 ufbx_get_vertex_vec2([NativeTypeName("const ufbx_vertex_vec2 *")] ufbx_vertex_vec2* v, [NativeTypeName("size_t")] nuint index) { ; return v->values.data[(int)(v->indices.data[index])]; } - [return: NativeTypeName("ufbx_vec3")] - public static Misaki.HighPerformance.Mathematics.float3 ufbx_get_vertex_vec3([NativeTypeName("const ufbx_vertex_vec3 *")] ufbx_vertex_vec3* v, [NativeTypeName("size_t")] nuint index) + public static ufbx_vec3 ufbx_get_vertex_vec3([NativeTypeName("const ufbx_vertex_vec3 *")] ufbx_vertex_vec3* v, [NativeTypeName("size_t")] nuint index) { ; return v->values.data[(int)(v->indices.data[index])]; } - [return: NativeTypeName("ufbx_vec4")] - public static Misaki.HighPerformance.Mathematics.float4 ufbx_get_vertex_vec4([NativeTypeName("const ufbx_vertex_vec4 *")] ufbx_vertex_vec4* v, [NativeTypeName("size_t")] nuint index) + public static ufbx_vec4 ufbx_get_vertex_vec4([NativeTypeName("const ufbx_vertex_vec4 *")] ufbx_vertex_vec4* v, [NativeTypeName("size_t")] nuint index) { ; return v->values.data[(int)(v->indices.data[index])]; diff --git a/src/ThridParty/Ghost.Ufbx/Generated/ufbx_anim_value.cs b/src/ThridParty/Ghost.Ufbx/Generated/ufbx_anim_value.cs index 46fdffd..0669aea 100644 --- a/src/ThridParty/Ghost.Ufbx/Generated/ufbx_anim_value.cs +++ b/src/ThridParty/Ghost.Ufbx/Generated/ufbx_anim_value.cs @@ -8,8 +8,7 @@ namespace Ghost.Ufbx [NativeTypeName("__AnonymousRecord_ufbx_L3136_C2")] public _Anonymous_e__Union Anonymous; - [NativeTypeName("ufbx_vec3")] - public Misaki.HighPerformance.Mathematics.float3 default_value; + public ufbx_vec3 default_value; [NativeTypeName("ufbx_anim_curve *[3]")] public _curves_e__FixedBuffer curves; diff --git a/src/ThridParty/Ghost.Ufbx/Generated/ufbx_baked_quat.cs b/src/ThridParty/Ghost.Ufbx/Generated/ufbx_baked_quat.cs index 6968e95..6d66728 100644 --- a/src/ThridParty/Ghost.Ufbx/Generated/ufbx_baked_quat.cs +++ b/src/ThridParty/Ghost.Ufbx/Generated/ufbx_baked_quat.cs @@ -4,8 +4,7 @@ namespace Ghost.Ufbx { public double time; - [NativeTypeName("ufbx_quat")] - public Misaki.HighPerformance.Mathematics.quaternion value; + public ufbx_quat value; public ufbx_baked_key_flags flags; } diff --git a/src/ThridParty/Ghost.Ufbx/Generated/ufbx_baked_vec3.cs b/src/ThridParty/Ghost.Ufbx/Generated/ufbx_baked_vec3.cs index 5e43535..079b172 100644 --- a/src/ThridParty/Ghost.Ufbx/Generated/ufbx_baked_vec3.cs +++ b/src/ThridParty/Ghost.Ufbx/Generated/ufbx_baked_vec3.cs @@ -4,8 +4,7 @@ namespace Ghost.Ufbx { public double time; - [NativeTypeName("ufbx_vec3")] - public Misaki.HighPerformance.Mathematics.float3 value; + public ufbx_vec3 value; public ufbx_baked_key_flags flags; } diff --git a/src/ThridParty/Ghost.Ufbx/Generated/ufbx_bone_pose.cs b/src/ThridParty/Ghost.Ufbx/Generated/ufbx_bone_pose.cs index 87616dc..8c005c5 100644 --- a/src/ThridParty/Ghost.Ufbx/Generated/ufbx_bone_pose.cs +++ b/src/ThridParty/Ghost.Ufbx/Generated/ufbx_bone_pose.cs @@ -4,10 +4,8 @@ namespace Ghost.Ufbx { public ufbx_node* bone_node; - [NativeTypeName("ufbx_matrix")] - public Misaki.HighPerformance.Mathematics.float3x4 bone_to_world; + public ufbx_matrix bone_to_world; - [NativeTypeName("ufbx_matrix")] - public Misaki.HighPerformance.Mathematics.float3x4 bone_to_parent; + public ufbx_matrix bone_to_parent; } } diff --git a/src/ThridParty/Ghost.Ufbx/Generated/ufbx_camera.cs b/src/ThridParty/Ghost.Ufbx/Generated/ufbx_camera.cs index 324d1f6..5c35603 100644 --- a/src/ThridParty/Ghost.Ufbx/Generated/ufbx_camera.cs +++ b/src/ThridParty/Ghost.Ufbx/Generated/ufbx_camera.cs @@ -13,23 +13,18 @@ namespace Ghost.Ufbx [NativeTypeName("_Bool")] public bool resolution_is_pixels; - [NativeTypeName("ufbx_vec2")] - public Misaki.HighPerformance.Mathematics.float2 resolution; + public ufbx_vec2 resolution; - [NativeTypeName("ufbx_vec2")] - public Misaki.HighPerformance.Mathematics.float2 field_of_view_deg; + public ufbx_vec2 field_of_view_deg; - [NativeTypeName("ufbx_vec2")] - public Misaki.HighPerformance.Mathematics.float2 field_of_view_tan; + public ufbx_vec2 field_of_view_tan; [NativeTypeName("ufbx_real")] public float orthographic_extent; - [NativeTypeName("ufbx_vec2")] - public Misaki.HighPerformance.Mathematics.float2 orthographic_size; + public ufbx_vec2 orthographic_size; - [NativeTypeName("ufbx_vec2")] - public Misaki.HighPerformance.Mathematics.float2 projection_plane; + public ufbx_vec2 projection_plane; [NativeTypeName("ufbx_real")] public float aspect_ratio; @@ -53,11 +48,9 @@ namespace Ghost.Ufbx [NativeTypeName("ufbx_real")] public float focal_length_mm; - [NativeTypeName("ufbx_vec2")] - public Misaki.HighPerformance.Mathematics.float2 film_size_inch; + public ufbx_vec2 film_size_inch; - [NativeTypeName("ufbx_vec2")] - public Misaki.HighPerformance.Mathematics.float2 aperture_size_inch; + public ufbx_vec2 aperture_size_inch; [NativeTypeName("ufbx_real")] public float squeeze_ratio; diff --git a/src/ThridParty/Ghost.Ufbx/Generated/ufbx_constraint.cs b/src/ThridParty/Ghost.Ufbx/Generated/ufbx_constraint.cs index 549519b..4f0e27d 100644 --- a/src/ThridParty/Ghost.Ufbx/Generated/ufbx_constraint.cs +++ b/src/ThridParty/Ghost.Ufbx/Generated/ufbx_constraint.cs @@ -34,22 +34,19 @@ namespace Ghost.Ufbx public ufbx_transform transform_offset; - [NativeTypeName("ufbx_vec3")] - public Misaki.HighPerformance.Mathematics.float3 aim_vector; + public ufbx_vec3 aim_vector; public ufbx_constraint_aim_up_type aim_up_type; public ufbx_node* aim_up_node; - [NativeTypeName("ufbx_vec3")] - public Misaki.HighPerformance.Mathematics.float3 aim_up_vector; + public ufbx_vec3 aim_up_vector; public ufbx_node* ik_effector; public ufbx_node* ik_end_node; - [NativeTypeName("ufbx_vec3")] - public Misaki.HighPerformance.Mathematics.float3 ik_pole_vector; + public ufbx_vec3 ik_pole_vector; [UnscopedRef] public ref ufbx_element element diff --git a/src/ThridParty/Ghost.Ufbx/Generated/ufbx_curve_point.cs b/src/ThridParty/Ghost.Ufbx/Generated/ufbx_curve_point.cs index 4b09a0f..269959f 100644 --- a/src/ThridParty/Ghost.Ufbx/Generated/ufbx_curve_point.cs +++ b/src/ThridParty/Ghost.Ufbx/Generated/ufbx_curve_point.cs @@ -5,10 +5,8 @@ namespace Ghost.Ufbx [NativeTypeName("_Bool")] public bool valid; - [NativeTypeName("ufbx_vec3")] - public Misaki.HighPerformance.Mathematics.float3 position; + public ufbx_vec3 position; - [NativeTypeName("ufbx_vec3")] - public Misaki.HighPerformance.Mathematics.float3 derivative; + public ufbx_vec3 derivative; } } diff --git a/src/ThridParty/Ghost.Ufbx/Generated/ufbx_display_layer.cs b/src/ThridParty/Ghost.Ufbx/Generated/ufbx_display_layer.cs index 7a3085b..41d8533 100644 --- a/src/ThridParty/Ghost.Ufbx/Generated/ufbx_display_layer.cs +++ b/src/ThridParty/Ghost.Ufbx/Generated/ufbx_display_layer.cs @@ -16,8 +16,7 @@ namespace Ghost.Ufbx [NativeTypeName("_Bool")] public bool frozen; - [NativeTypeName("ufbx_vec3")] - public Misaki.HighPerformance.Mathematics.float3 ui_color; + public ufbx_vec3 ui_color; [UnscopedRef] public ref ufbx_element element diff --git a/src/ThridParty/Ghost.Ufbx/Generated/ufbx_light.cs b/src/ThridParty/Ghost.Ufbx/Generated/ufbx_light.cs index dc0c974..25c9b02 100644 --- a/src/ThridParty/Ghost.Ufbx/Generated/ufbx_light.cs +++ b/src/ThridParty/Ghost.Ufbx/Generated/ufbx_light.cs @@ -8,14 +8,12 @@ namespace Ghost.Ufbx [NativeTypeName("__AnonymousRecord_ufbx_L1421_C2")] public _Anonymous_e__Union Anonymous; - [NativeTypeName("ufbx_vec3")] - public Misaki.HighPerformance.Mathematics.float3 color; + public ufbx_vec3 color; [NativeTypeName("ufbx_real")] public float intensity; - [NativeTypeName("ufbx_vec3")] - public Misaki.HighPerformance.Mathematics.float3 local_direction; + public ufbx_vec3 local_direction; public ufbx_light_type type; diff --git a/src/ThridParty/Ghost.Ufbx/Generated/ufbx_line_curve.cs b/src/ThridParty/Ghost.Ufbx/Generated/ufbx_line_curve.cs index d477a9b..07d7ece 100644 --- a/src/ThridParty/Ghost.Ufbx/Generated/ufbx_line_curve.cs +++ b/src/ThridParty/Ghost.Ufbx/Generated/ufbx_line_curve.cs @@ -8,8 +8,7 @@ namespace Ghost.Ufbx [NativeTypeName("__AnonymousRecord_ufbx_L1671_C2")] public _Anonymous_e__Union Anonymous; - [NativeTypeName("ufbx_vec3")] - public Misaki.HighPerformance.Mathematics.float3 color; + public ufbx_vec3 color; public ufbx_vec3_list control_points; diff --git a/src/ThridParty/Ghost.Ufbx/Generated/ufbx_material_map.cs b/src/ThridParty/Ghost.Ufbx/Generated/ufbx_material_map.cs index c072180..a6f20bf 100644 --- a/src/ThridParty/Ghost.Ufbx/Generated/ufbx_material_map.cs +++ b/src/ThridParty/Ghost.Ufbx/Generated/ufbx_material_map.cs @@ -35,7 +35,7 @@ namespace Ghost.Ufbx } [UnscopedRef] - public ref Misaki.HighPerformance.Mathematics.float2 value_vec2 + public ref ufbx_vec2 value_vec2 { get { @@ -44,7 +44,7 @@ namespace Ghost.Ufbx } [UnscopedRef] - public ref Misaki.HighPerformance.Mathematics.float3 value_vec3 + public ref ufbx_vec3 value_vec3 { get { @@ -53,7 +53,7 @@ namespace Ghost.Ufbx } [UnscopedRef] - public ref Misaki.HighPerformance.Mathematics.float4 value_vec4 + public ref ufbx_vec4 value_vec4 { get { @@ -69,16 +69,13 @@ namespace Ghost.Ufbx public float value_real; [FieldOffset(0)] - [NativeTypeName("ufbx_vec2")] - public Misaki.HighPerformance.Mathematics.float2 value_vec2; + public ufbx_vec2 value_vec2; [FieldOffset(0)] - [NativeTypeName("ufbx_vec3")] - public Misaki.HighPerformance.Mathematics.float3 value_vec3; + public ufbx_vec3 value_vec3; [FieldOffset(0)] - [NativeTypeName("ufbx_vec4")] - public Misaki.HighPerformance.Mathematics.float4 value_vec4; + public ufbx_vec4 value_vec4; } } } diff --git a/src/ThridParty/Ghost.Ufbx/Generated/ufbx_matrix.cs b/src/ThridParty/Ghost.Ufbx/Generated/ufbx_matrix.cs index 4e09b3e..73588cc 100644 --- a/src/ThridParty/Ghost.Ufbx/Generated/ufbx_matrix.cs +++ b/src/ThridParty/Ghost.Ufbx/Generated/ufbx_matrix.cs @@ -1,3 +1,4 @@ +using System; using System.Diagnostics.CodeAnalysis; using System.Runtime.CompilerServices; using System.Runtime.InteropServices; @@ -118,7 +119,7 @@ namespace Ghost.Ufbx } [UnscopedRef] - public Span cols + public Span cols { get { @@ -192,7 +193,7 @@ namespace Ghost.Ufbx [InlineArray(4)] public partial struct _cols_e__FixedBuffer { - public System.Numerics.Vector3 e0; + public ufbx_vec3 e0; } [InlineArray(12)] diff --git a/src/ThridParty/Ghost.Ufbx/Generated/ufbx_metadata.cs b/src/ThridParty/Ghost.Ufbx/Generated/ufbx_metadata.cs index b42bdcd..bf97c48 100644 --- a/src/ThridParty/Ghost.Ufbx/Generated/ufbx_metadata.cs +++ b/src/ThridParty/Ghost.Ufbx/Generated/ufbx_metadata.cs @@ -111,8 +111,7 @@ namespace Ghost.Ufbx public ufbx_mirror_axis handedness_conversion_axis; - [NativeTypeName("ufbx_quat")] - public Misaki.HighPerformance.Mathematics.quaternion root_rotation; + public ufbx_quat root_rotation; [NativeTypeName("ufbx_real")] public float root_scale; diff --git a/src/ThridParty/Ghost.Ufbx/Generated/ufbx_node.cs b/src/ThridParty/Ghost.Ufbx/Generated/ufbx_node.cs index 68c4c67..7ef4f22 100644 --- a/src/ThridParty/Ghost.Ufbx/Generated/ufbx_node.cs +++ b/src/ThridParty/Ghost.Ufbx/Generated/ufbx_node.cs @@ -38,42 +38,32 @@ namespace Ghost.Ufbx public ufbx_transform geometry_transform; - [NativeTypeName("ufbx_vec3")] - public Misaki.HighPerformance.Mathematics.float3 inherit_scale; + public ufbx_vec3 inherit_scale; public ufbx_node* inherit_scale_node; public ufbx_rotation_order rotation_order; - [NativeTypeName("ufbx_vec3")] - public Misaki.HighPerformance.Mathematics.float3 euler_rotation; + public ufbx_vec3 euler_rotation; - [NativeTypeName("ufbx_matrix")] - public Misaki.HighPerformance.Mathematics.float3x4 node_to_parent; + public ufbx_matrix node_to_parent; - [NativeTypeName("ufbx_matrix")] - public Misaki.HighPerformance.Mathematics.float3x4 node_to_world; + public ufbx_matrix node_to_world; - [NativeTypeName("ufbx_matrix")] - public Misaki.HighPerformance.Mathematics.float3x4 geometry_to_node; + public ufbx_matrix geometry_to_node; - [NativeTypeName("ufbx_matrix")] - public Misaki.HighPerformance.Mathematics.float3x4 geometry_to_world; + public ufbx_matrix geometry_to_world; - [NativeTypeName("ufbx_matrix")] - public Misaki.HighPerformance.Mathematics.float3x4 unscaled_node_to_world; + public ufbx_matrix unscaled_node_to_world; - [NativeTypeName("ufbx_vec3")] - public Misaki.HighPerformance.Mathematics.float3 adjust_pre_translation; + public ufbx_vec3 adjust_pre_translation; - [NativeTypeName("ufbx_quat")] - public Misaki.HighPerformance.Mathematics.quaternion adjust_pre_rotation; + public ufbx_quat adjust_pre_rotation; [NativeTypeName("ufbx_real")] public float adjust_pre_scale; - [NativeTypeName("ufbx_quat")] - public Misaki.HighPerformance.Mathematics.quaternion adjust_post_rotation; + public ufbx_quat adjust_post_rotation; [NativeTypeName("ufbx_real")] public float adjust_post_scale; diff --git a/src/ThridParty/Ghost.Ufbx/Generated/ufbx_prop.cs b/src/ThridParty/Ghost.Ufbx/Generated/ufbx_prop.cs index ea457ae..d18bc08 100644 --- a/src/ThridParty/Ghost.Ufbx/Generated/ufbx_prop.cs +++ b/src/ThridParty/Ghost.Ufbx/Generated/ufbx_prop.cs @@ -45,7 +45,7 @@ namespace Ghost.Ufbx } [UnscopedRef] - public ref Misaki.HighPerformance.Mathematics.float2 value_vec2 + public ref ufbx_vec2 value_vec2 { get { @@ -54,7 +54,7 @@ namespace Ghost.Ufbx } [UnscopedRef] - public ref Misaki.HighPerformance.Mathematics.float3 value_vec3 + public ref ufbx_vec3 value_vec3 { get { @@ -63,7 +63,7 @@ namespace Ghost.Ufbx } [UnscopedRef] - public ref Misaki.HighPerformance.Mathematics.float4 value_vec4 + public ref ufbx_vec4 value_vec4 { get { @@ -83,16 +83,13 @@ namespace Ghost.Ufbx public float value_real; [FieldOffset(0)] - [NativeTypeName("ufbx_vec2")] - public Misaki.HighPerformance.Mathematics.float2 value_vec2; + public ufbx_vec2 value_vec2; [FieldOffset(0)] - [NativeTypeName("ufbx_vec3")] - public Misaki.HighPerformance.Mathematics.float3 value_vec3; + public ufbx_vec3 value_vec3; [FieldOffset(0)] - [NativeTypeName("ufbx_vec4")] - public Misaki.HighPerformance.Mathematics.float4 value_vec4; + public ufbx_vec4 value_vec4; [InlineArray(4)] public partial struct _value_real_arr_e__FixedBuffer diff --git a/src/ThridParty/Ghost.Ufbx/Generated/ufbx_prop_override.cs b/src/ThridParty/Ghost.Ufbx/Generated/ufbx_prop_override.cs index dbfad8d..e1f1268 100644 --- a/src/ThridParty/Ghost.Ufbx/Generated/ufbx_prop_override.cs +++ b/src/ThridParty/Ghost.Ufbx/Generated/ufbx_prop_override.cs @@ -10,8 +10,7 @@ namespace Ghost.Ufbx public ufbx_string prop_name; - [NativeTypeName("ufbx_vec4")] - public Misaki.HighPerformance.Mathematics.float4 value; + public ufbx_vec4 value; public ufbx_string value_str; diff --git a/src/ThridParty/Ghost.Ufbx/Generated/ufbx_prop_override_desc.cs b/src/ThridParty/Ghost.Ufbx/Generated/ufbx_prop_override_desc.cs index 2a962e6..3fa27d0 100644 --- a/src/ThridParty/Ghost.Ufbx/Generated/ufbx_prop_override_desc.cs +++ b/src/ThridParty/Ghost.Ufbx/Generated/ufbx_prop_override_desc.cs @@ -7,8 +7,7 @@ namespace Ghost.Ufbx public ufbx_string prop_name; - [NativeTypeName("ufbx_vec4")] - public Misaki.HighPerformance.Mathematics.float4 value; + public ufbx_vec4 value; public ufbx_string value_str; diff --git a/src/ThridParty/Ghost.Ufbx/Generated/ufbx_quat.cs b/src/ThridParty/Ghost.Ufbx/Generated/ufbx_quat.cs index 2a537bb..18d4dd8 100644 --- a/src/ThridParty/Ghost.Ufbx/Generated/ufbx_quat.cs +++ b/src/ThridParty/Ghost.Ufbx/Generated/ufbx_quat.cs @@ -1,3 +1,4 @@ +using System; using System.Diagnostics.CodeAnalysis; using System.Runtime.CompilerServices; using System.Runtime.InteropServices; diff --git a/src/ThridParty/Ghost.Ufbx/Generated/ufbx_scene_settings.cs b/src/ThridParty/Ghost.Ufbx/Generated/ufbx_scene_settings.cs index c97146a..4302ce4 100644 --- a/src/ThridParty/Ghost.Ufbx/Generated/ufbx_scene_settings.cs +++ b/src/ThridParty/Ghost.Ufbx/Generated/ufbx_scene_settings.cs @@ -11,8 +11,7 @@ namespace Ghost.Ufbx public double frames_per_second; - [NativeTypeName("ufbx_vec3")] - public Misaki.HighPerformance.Mathematics.float3 ambient_color; + public ufbx_vec3 ambient_color; public ufbx_string default_camera; diff --git a/src/ThridParty/Ghost.Ufbx/Generated/ufbx_shader_texture_input.cs b/src/ThridParty/Ghost.Ufbx/Generated/ufbx_shader_texture_input.cs index 62a166d..8ebe0ca 100644 --- a/src/ThridParty/Ghost.Ufbx/Generated/ufbx_shader_texture_input.cs +++ b/src/ThridParty/Ghost.Ufbx/Generated/ufbx_shader_texture_input.cs @@ -41,7 +41,7 @@ namespace Ghost.Ufbx } [UnscopedRef] - public ref Misaki.HighPerformance.Mathematics.float2 value_vec2 + public ref ufbx_vec2 value_vec2 { get { @@ -50,7 +50,7 @@ namespace Ghost.Ufbx } [UnscopedRef] - public ref Misaki.HighPerformance.Mathematics.float3 value_vec3 + public ref ufbx_vec3 value_vec3 { get { @@ -59,7 +59,7 @@ namespace Ghost.Ufbx } [UnscopedRef] - public ref Misaki.HighPerformance.Mathematics.float4 value_vec4 + public ref ufbx_vec4 value_vec4 { get { @@ -75,16 +75,13 @@ namespace Ghost.Ufbx public float value_real; [FieldOffset(0)] - [NativeTypeName("ufbx_vec2")] - public Misaki.HighPerformance.Mathematics.float2 value_vec2; + public ufbx_vec2 value_vec2; [FieldOffset(0)] - [NativeTypeName("ufbx_vec3")] - public Misaki.HighPerformance.Mathematics.float3 value_vec3; + public ufbx_vec3 value_vec3; [FieldOffset(0)] - [NativeTypeName("ufbx_vec4")] - public Misaki.HighPerformance.Mathematics.float4 value_vec4; + public ufbx_vec4 value_vec4; } } } diff --git a/src/ThridParty/Ghost.Ufbx/Generated/ufbx_skin_cluster.cs b/src/ThridParty/Ghost.Ufbx/Generated/ufbx_skin_cluster.cs index 59dc640..3935316 100644 --- a/src/ThridParty/Ghost.Ufbx/Generated/ufbx_skin_cluster.cs +++ b/src/ThridParty/Ghost.Ufbx/Generated/ufbx_skin_cluster.cs @@ -10,17 +10,13 @@ namespace Ghost.Ufbx public ufbx_node* bone_node; - [NativeTypeName("ufbx_matrix")] - public Misaki.HighPerformance.Mathematics.float3x4 geometry_to_bone; + public ufbx_matrix geometry_to_bone; - [NativeTypeName("ufbx_matrix")] - public Misaki.HighPerformance.Mathematics.float3x4 mesh_node_to_bone; + public ufbx_matrix mesh_node_to_bone; - [NativeTypeName("ufbx_matrix")] - public Misaki.HighPerformance.Mathematics.float3x4 bind_to_world; + public ufbx_matrix bind_to_world; - [NativeTypeName("ufbx_matrix")] - public Misaki.HighPerformance.Mathematics.float3x4 geometry_to_world; + public ufbx_matrix geometry_to_world; public ufbx_transform geometry_to_world_transform; diff --git a/src/ThridParty/Ghost.Ufbx/Generated/ufbx_surface_point.cs b/src/ThridParty/Ghost.Ufbx/Generated/ufbx_surface_point.cs index 04ca795..738ae9e 100644 --- a/src/ThridParty/Ghost.Ufbx/Generated/ufbx_surface_point.cs +++ b/src/ThridParty/Ghost.Ufbx/Generated/ufbx_surface_point.cs @@ -5,13 +5,10 @@ namespace Ghost.Ufbx [NativeTypeName("_Bool")] public bool valid; - [NativeTypeName("ufbx_vec3")] - public Misaki.HighPerformance.Mathematics.float3 position; + public ufbx_vec3 position; - [NativeTypeName("ufbx_vec3")] - public Misaki.HighPerformance.Mathematics.float3 derivative_u; + public ufbx_vec3 derivative_u; - [NativeTypeName("ufbx_vec3")] - public Misaki.HighPerformance.Mathematics.float3 derivative_v; + public ufbx_vec3 derivative_v; } } diff --git a/src/ThridParty/Ghost.Ufbx/Generated/ufbx_texture.cs b/src/ThridParty/Ghost.Ufbx/Generated/ufbx_texture.cs index 5b0d63a..1a9d992 100644 --- a/src/ThridParty/Ghost.Ufbx/Generated/ufbx_texture.cs +++ b/src/ThridParty/Ghost.Ufbx/Generated/ufbx_texture.cs @@ -49,11 +49,9 @@ namespace Ghost.Ufbx public ufbx_transform uv_transform; - [NativeTypeName("ufbx_matrix")] - public Misaki.HighPerformance.Mathematics.float3x4 texture_to_uv; + public ufbx_matrix texture_to_uv; - [NativeTypeName("ufbx_matrix")] - public Misaki.HighPerformance.Mathematics.float3x4 uv_to_texture; + public ufbx_matrix uv_to_texture; [UnscopedRef] public ref ufbx_element element diff --git a/src/ThridParty/Ghost.Ufbx/Generated/ufbx_transform.cs b/src/ThridParty/Ghost.Ufbx/Generated/ufbx_transform.cs index 4b89419..3278f7c 100644 --- a/src/ThridParty/Ghost.Ufbx/Generated/ufbx_transform.cs +++ b/src/ThridParty/Ghost.Ufbx/Generated/ufbx_transform.cs @@ -2,13 +2,10 @@ namespace Ghost.Ufbx { public partial struct ufbx_transform { - [NativeTypeName("ufbx_vec3")] - public Misaki.HighPerformance.Mathematics.float3 translation; + public ufbx_vec3 translation; - [NativeTypeName("ufbx_quat")] - public Misaki.HighPerformance.Mathematics.quaternion rotation; + public ufbx_quat rotation; - [NativeTypeName("ufbx_vec3")] - public Misaki.HighPerformance.Mathematics.float3 scale; + public ufbx_vec3 scale; } } diff --git a/src/ThridParty/Ghost.Ufbx/Generated/ufbx_vec2.cs b/src/ThridParty/Ghost.Ufbx/Generated/ufbx_vec2.cs new file mode 100644 index 0000000..8bce34c --- /dev/null +++ b/src/ThridParty/Ghost.Ufbx/Generated/ufbx_vec2.cs @@ -0,0 +1,67 @@ +using System; +using System.Diagnostics.CodeAnalysis; +using System.Runtime.CompilerServices; +using System.Runtime.InteropServices; + +namespace Ghost.Ufbx +{ + public partial struct ufbx_vec2 + { + [NativeTypeName("__AnonymousRecord_ufbx_L299_C2")] + public _Anonymous_e__Union Anonymous; + + [UnscopedRef] + public ref float x + { + get + { + return ref Anonymous.Anonymous.x; + } + } + + [UnscopedRef] + public ref float y + { + get + { + return ref Anonymous.Anonymous.y; + } + } + + [UnscopedRef] + public Span v + { + get + { + return Anonymous.v; + } + } + + [StructLayout(LayoutKind.Explicit)] + public partial struct _Anonymous_e__Union + { + [FieldOffset(0)] + [NativeTypeName("__AnonymousRecord_ufbx_L300_C3")] + public _Anonymous_e__Struct Anonymous; + + [FieldOffset(0)] + [NativeTypeName("ufbx_real[2]")] + public _v_e__FixedBuffer v; + + public partial struct _Anonymous_e__Struct + { + [NativeTypeName("ufbx_real")] + public float x; + + [NativeTypeName("ufbx_real")] + public float y; + } + + [InlineArray(2)] + public partial struct _v_e__FixedBuffer + { + public float e0; + } + } + } +} diff --git a/src/ThridParty/Ghost.Ufbx/Generated/ufbx_vec2_list.cs b/src/ThridParty/Ghost.Ufbx/Generated/ufbx_vec2_list.cs index 360bf86..3b2c3b2 100644 --- a/src/ThridParty/Ghost.Ufbx/Generated/ufbx_vec2_list.cs +++ b/src/ThridParty/Ghost.Ufbx/Generated/ufbx_vec2_list.cs @@ -2,8 +2,7 @@ namespace Ghost.Ufbx { public unsafe partial struct ufbx_vec2_list { - [NativeTypeName("ufbx_vec2 *")] - public Misaki.HighPerformance.Mathematics.float2* data; + public ufbx_vec2* data; [NativeTypeName("size_t")] public nuint count; diff --git a/src/ThridParty/Ghost.Ufbx/Generated/ufbx_vec3.cs b/src/ThridParty/Ghost.Ufbx/Generated/ufbx_vec3.cs new file mode 100644 index 0000000..1da8011 --- /dev/null +++ b/src/ThridParty/Ghost.Ufbx/Generated/ufbx_vec3.cs @@ -0,0 +1,79 @@ +using System; +using System.Diagnostics.CodeAnalysis; +using System.Runtime.CompilerServices; +using System.Runtime.InteropServices; + +namespace Ghost.Ufbx +{ + public partial struct ufbx_vec3 + { + [NativeTypeName("__AnonymousRecord_ufbx_L309_C2")] + public _Anonymous_e__Union Anonymous; + + [UnscopedRef] + public ref float x + { + get + { + return ref Anonymous.Anonymous.x; + } + } + + [UnscopedRef] + public ref float y + { + get + { + return ref Anonymous.Anonymous.y; + } + } + + [UnscopedRef] + public ref float z + { + get + { + return ref Anonymous.Anonymous.z; + } + } + + [UnscopedRef] + public Span v + { + get + { + return Anonymous.v; + } + } + + [StructLayout(LayoutKind.Explicit)] + public partial struct _Anonymous_e__Union + { + [FieldOffset(0)] + [NativeTypeName("__AnonymousRecord_ufbx_L310_C3")] + public _Anonymous_e__Struct Anonymous; + + [FieldOffset(0)] + [NativeTypeName("ufbx_real[3]")] + public _v_e__FixedBuffer v; + + public partial struct _Anonymous_e__Struct + { + [NativeTypeName("ufbx_real")] + public float x; + + [NativeTypeName("ufbx_real")] + public float y; + + [NativeTypeName("ufbx_real")] + public float z; + } + + [InlineArray(3)] + public partial struct _v_e__FixedBuffer + { + public float e0; + } + } + } +} diff --git a/src/ThridParty/Ghost.Ufbx/Generated/ufbx_vec3_list.cs b/src/ThridParty/Ghost.Ufbx/Generated/ufbx_vec3_list.cs index 29e4e27..440abf6 100644 --- a/src/ThridParty/Ghost.Ufbx/Generated/ufbx_vec3_list.cs +++ b/src/ThridParty/Ghost.Ufbx/Generated/ufbx_vec3_list.cs @@ -2,8 +2,7 @@ namespace Ghost.Ufbx { public unsafe partial struct ufbx_vec3_list { - [NativeTypeName("ufbx_vec3 *")] - public Misaki.HighPerformance.Mathematics.float3* data; + public ufbx_vec3* data; [NativeTypeName("size_t")] public nuint count; diff --git a/src/ThridParty/Ghost.Ufbx/Generated/ufbx_vec4.cs b/src/ThridParty/Ghost.Ufbx/Generated/ufbx_vec4.cs new file mode 100644 index 0000000..ec0ad7d --- /dev/null +++ b/src/ThridParty/Ghost.Ufbx/Generated/ufbx_vec4.cs @@ -0,0 +1,91 @@ +using System; +using System.Diagnostics.CodeAnalysis; +using System.Runtime.CompilerServices; +using System.Runtime.InteropServices; + +namespace Ghost.Ufbx +{ + public partial struct ufbx_vec4 + { + [NativeTypeName("__AnonymousRecord_ufbx_L319_C2")] + public _Anonymous_e__Union Anonymous; + + [UnscopedRef] + public ref float x + { + get + { + return ref Anonymous.Anonymous.x; + } + } + + [UnscopedRef] + public ref float y + { + get + { + return ref Anonymous.Anonymous.y; + } + } + + [UnscopedRef] + public ref float z + { + get + { + return ref Anonymous.Anonymous.z; + } + } + + [UnscopedRef] + public ref float w + { + get + { + return ref Anonymous.Anonymous.w; + } + } + + [UnscopedRef] + public Span v + { + get + { + return Anonymous.v; + } + } + + [StructLayout(LayoutKind.Explicit)] + public partial struct _Anonymous_e__Union + { + [FieldOffset(0)] + [NativeTypeName("__AnonymousRecord_ufbx_L320_C3")] + public _Anonymous_e__Struct Anonymous; + + [FieldOffset(0)] + [NativeTypeName("ufbx_real[4]")] + public _v_e__FixedBuffer v; + + public partial struct _Anonymous_e__Struct + { + [NativeTypeName("ufbx_real")] + public float x; + + [NativeTypeName("ufbx_real")] + public float y; + + [NativeTypeName("ufbx_real")] + public float z; + + [NativeTypeName("ufbx_real")] + public float w; + } + + [InlineArray(4)] + public partial struct _v_e__FixedBuffer + { + public float e0; + } + } + } +} diff --git a/src/ThridParty/Ghost.Ufbx/Generated/ufbx_vec4_list.cs b/src/ThridParty/Ghost.Ufbx/Generated/ufbx_vec4_list.cs index 0699ee8..f7f93ed 100644 --- a/src/ThridParty/Ghost.Ufbx/Generated/ufbx_vec4_list.cs +++ b/src/ThridParty/Ghost.Ufbx/Generated/ufbx_vec4_list.cs @@ -2,8 +2,7 @@ namespace Ghost.Ufbx { public unsafe partial struct ufbx_vec4_list { - [NativeTypeName("ufbx_vec4 *")] - public Misaki.HighPerformance.Mathematics.float4* data; + public ufbx_vec4* data; [NativeTypeName("size_t")] public nuint count; diff --git a/src/ThridParty/Ghost.Ufbx/Ghost.Ufbx.csproj b/src/ThridParty/Ghost.Ufbx/Ghost.Ufbx.csproj index a077ceb..ea2e8a3 100644 --- a/src/ThridParty/Ghost.Ufbx/Ghost.Ufbx.csproj +++ b/src/ThridParty/Ghost.Ufbx/Ghost.Ufbx.csproj @@ -15,10 +15,6 @@ True - - - - PreserveNewest diff --git a/src/ThridParty/Ghost.Ufbx/Wrapper/UfbxApi.nativegen.cs b/src/ThridParty/Ghost.Ufbx/Wrapper/UfbxApi.nativegen.cs index 1b84ea6..8e3fd0a 100644 --- a/src/ThridParty/Ghost.Ufbx/Wrapper/UfbxApi.nativegen.cs +++ b/src/ThridParty/Ghost.Ufbx/Wrapper/UfbxApi.nativegen.cs @@ -61,7 +61,7 @@ public unsafe partial struct UfbxApi /// From: /// [System.Runtime.CompilerServices.MethodImpl(System.Runtime.CompilerServices.MethodImplOptions.AggressiveInlining)] - public static Misaki.HighPerformance.Mathematics.float3 EvaluateBakedVec3(ufbx_baked_vec3_list keyframes, double time) + public static ufbx_vec3 EvaluateBakedVec3(ufbx_baked_vec3_list keyframes, double time) { return Api.ufbx_evaluate_baked_vec3( keyframes, @@ -72,7 +72,7 @@ public unsafe partial struct UfbxApi /// From: /// [System.Runtime.CompilerServices.MethodImpl(System.Runtime.CompilerServices.MethodImplOptions.AggressiveInlining)] - public static Misaki.HighPerformance.Mathematics.quaternion EvaluateBakedQuat(ufbx_baked_quat_list keyframes, double time) + public static ufbx_quat EvaluateBakedQuat(ufbx_baked_quat_list keyframes, double time) { return Api.ufbx_evaluate_baked_quat( keyframes, @@ -89,19 +89,19 @@ public unsafe partial struct UfbxApi } /// - /// From: + /// From: /// [System.Runtime.CompilerServices.MethodImpl(System.Runtime.CompilerServices.MethodImplOptions.AggressiveInlining)] - public static Misaki.HighPerformance.Mathematics.float3 Vec3Normalize(Misaki.HighPerformance.Mathematics.float3 v) + public static ufbx_vec3 Vec3Normalize(ufbx_vec3 v) { return Api.ufbx_vec3_normalize(v); } /// - /// From: + /// From: /// [System.Runtime.CompilerServices.MethodImpl(System.Runtime.CompilerServices.MethodImplOptions.AggressiveInlining)] - public static float QuatDot(Misaki.HighPerformance.Mathematics.quaternion a, Misaki.HighPerformance.Mathematics.quaternion b) + public static float QuatDot(ufbx_quat a, ufbx_quat b) { return Api.ufbx_quat_dot( a, @@ -109,10 +109,10 @@ public unsafe partial struct UfbxApi } /// - /// From: + /// From: /// [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) + public static ufbx_quat QuatMul(ufbx_quat a, ufbx_quat b) { return Api.ufbx_quat_mul( a, @@ -120,19 +120,19 @@ public unsafe partial struct UfbxApi } /// - /// From: + /// From: /// [System.Runtime.CompilerServices.MethodImpl(System.Runtime.CompilerServices.MethodImplOptions.AggressiveInlining)] - public static Misaki.HighPerformance.Mathematics.quaternion QuatNormalize(Misaki.HighPerformance.Mathematics.quaternion q) + public static ufbx_quat QuatNormalize(ufbx_quat q) { return Api.ufbx_quat_normalize(q); } /// - /// From: + /// From: /// [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) + public static ufbx_quat QuatFixAntipodal(ufbx_quat q, ufbx_quat reference) { return Api.ufbx_quat_fix_antipodal( q, @@ -140,10 +140,10 @@ public unsafe partial struct UfbxApi } /// - /// From: + /// From: /// [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) + public static ufbx_quat QuatSlerp(ufbx_quat a, ufbx_quat b, float t) { return Api.ufbx_quat_slerp( a, @@ -152,10 +152,10 @@ public unsafe partial struct UfbxApi } /// - /// From: + /// From: /// [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) + public static ufbx_vec3 QuatRotateVec3(ufbx_quat q, ufbx_vec3 v) { return Api.ufbx_quat_rotate_vec3( q, @@ -163,10 +163,10 @@ public unsafe partial struct UfbxApi } /// - /// From: + /// From: /// [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) + public static ufbx_vec3 QuatToEuler(ufbx_quat q, ufbx_rotation_order order) { return Api.ufbx_quat_to_euler( q, @@ -174,85 +174,16 @@ public unsafe partial struct UfbxApi } /// - /// From: + /// From: /// [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) + public static ufbx_quat EulerToQuat(ufbx_vec3 v, ufbx_rotation_order order) { return Api.ufbx_euler_to_quat( v, order); } - /// - /// From: - /// - [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); - } - - /// - /// From: - /// - [System.Runtime.CompilerServices.MethodImpl(System.Runtime.CompilerServices.MethodImplOptions.AggressiveInlining)] - public static float MatrixDeterminant(Misaki.HighPerformance.Mathematics.float3x4* m) - { - return Api.ufbx_matrix_determinant(m); - } - - /// - /// From: - /// - [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); - } - - /// - /// From: - /// - [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); - } - - /// - /// From: - /// - [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); - } - - /// - /// From: - /// - [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); - } - - /// - /// From: - /// - [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); - } - /// /// From: /// diff --git a/src/ThridParty/Ghost.Ufbx/Wrapper/ufbx_anim_value.nativegen.cs b/src/ThridParty/Ghost.Ufbx/Wrapper/ufbx_anim_value.nativegen.cs index 378934d..2ae9992 100644 --- a/src/ThridParty/Ghost.Ufbx/Wrapper/ufbx_anim_value.nativegen.cs +++ b/src/ThridParty/Ghost.Ufbx/Wrapper/ufbx_anim_value.nativegen.cs @@ -21,7 +21,7 @@ public unsafe partial struct ufbx_anim_value /// From: /// [System.Runtime.CompilerServices.MethodImpl(System.Runtime.CompilerServices.MethodImplOptions.AggressiveInlining)] - public Misaki.HighPerformance.Mathematics.float3 EvaluateVec3(double time) + public ufbx_vec3 EvaluateVec3(double time) { return Api.ufbx_evaluate_anim_value_vec3( (ufbx_anim_value*)System.Runtime.CompilerServices.Unsafe.AsPointer(ref this), @@ -44,7 +44,7 @@ public unsafe partial struct ufbx_anim_value /// From: /// [System.Runtime.CompilerServices.MethodImpl(System.Runtime.CompilerServices.MethodImplOptions.AggressiveInlining)] - public Misaki.HighPerformance.Mathematics.float3 EvaluateVec3Flags(double time, uint flags) + public ufbx_vec3 EvaluateVec3Flags(double time, uint flags) { return Api.ufbx_evaluate_anim_value_vec3_flags( (ufbx_anim_value*)System.Runtime.CompilerServices.Unsafe.AsPointer(ref this), diff --git a/src/ThridParty/Ghost.Ufbx/Wrapper/ufbx_blend_deformer.nativegen.cs b/src/ThridParty/Ghost.Ufbx/Wrapper/ufbx_blend_deformer.nativegen.cs index 9b43d36..158442b 100644 --- a/src/ThridParty/Ghost.Ufbx/Wrapper/ufbx_blend_deformer.nativegen.cs +++ b/src/ThridParty/Ghost.Ufbx/Wrapper/ufbx_blend_deformer.nativegen.cs @@ -10,7 +10,7 @@ public unsafe partial struct ufbx_blend_deformer /// From: /// [System.Runtime.CompilerServices.MethodImpl(System.Runtime.CompilerServices.MethodImplOptions.AggressiveInlining)] - public Misaki.HighPerformance.Mathematics.float3 GetBlendVertexOffset(nuint vertex) + public ufbx_vec3 GetBlendVertexOffset(nuint vertex) { return Api.ufbx_get_blend_vertex_offset( (ufbx_blend_deformer*)System.Runtime.CompilerServices.Unsafe.AsPointer(ref this), @@ -18,16 +18,16 @@ public unsafe partial struct ufbx_blend_deformer } /// - /// From: + /// From: /// [System.Runtime.CompilerServices.MethodImpl(System.Runtime.CompilerServices.MethodImplOptions.AggressiveInlining)] - public void AddBlendVertexOffsets(ReadOnlySpan vertices, float weight) + public void AddBlendVertexOffsets(ReadOnlySpan vertices, float weight) { - fixed (Misaki.HighPerformance.Mathematics.float3* pvertices = vertices) + fixed (ufbx_vec3* pvertices = vertices) { Api.ufbx_add_blend_vertex_offsets( (ufbx_blend_deformer*)System.Runtime.CompilerServices.Unsafe.AsPointer(ref this), - (Misaki.HighPerformance.Mathematics.float3*)pvertices, + (ufbx_vec3*)pvertices, (nuint)vertices.Length, weight); } diff --git a/src/ThridParty/Ghost.Ufbx/Wrapper/ufbx_blend_shape.nativegen.cs b/src/ThridParty/Ghost.Ufbx/Wrapper/ufbx_blend_shape.nativegen.cs index 7c8ec81..0b4300b 100644 --- a/src/ThridParty/Ghost.Ufbx/Wrapper/ufbx_blend_shape.nativegen.cs +++ b/src/ThridParty/Ghost.Ufbx/Wrapper/ufbx_blend_shape.nativegen.cs @@ -21,7 +21,7 @@ public unsafe partial struct ufbx_blend_shape /// From: /// [System.Runtime.CompilerServices.MethodImpl(System.Runtime.CompilerServices.MethodImplOptions.AggressiveInlining)] - public Misaki.HighPerformance.Mathematics.float3 GetVertexOffset(nuint vertex) + public ufbx_vec3 GetVertexOffset(nuint vertex) { return Api.ufbx_get_blend_shape_vertex_offset( (ufbx_blend_shape*)System.Runtime.CompilerServices.Unsafe.AsPointer(ref this), @@ -29,16 +29,16 @@ public unsafe partial struct ufbx_blend_shape } /// - /// From: + /// From: /// [System.Runtime.CompilerServices.MethodImpl(System.Runtime.CompilerServices.MethodImplOptions.AggressiveInlining)] - public void AddVertexOffsets(ReadOnlySpan vertices, float weight) + public void AddVertexOffsets(ReadOnlySpan vertices, float weight) { - fixed (Misaki.HighPerformance.Mathematics.float3* pvertices = vertices) + fixed (ufbx_vec3* pvertices = vertices) { Api.ufbx_add_blend_shape_vertex_offsets( (ufbx_blend_shape*)System.Runtime.CompilerServices.Unsafe.AsPointer(ref this), - (Misaki.HighPerformance.Mathematics.float3*)pvertices, + (ufbx_vec3*)pvertices, (nuint)vertices.Length, weight); } diff --git a/src/ThridParty/Ghost.Ufbx/Wrapper/ufbx_cache_channel.nativegen.cs b/src/ThridParty/Ghost.Ufbx/Wrapper/ufbx_cache_channel.nativegen.cs index f6fc63f..d4bd616 100644 --- a/src/ThridParty/Ghost.Ufbx/Wrapper/ufbx_cache_channel.nativegen.cs +++ b/src/ThridParty/Ghost.Ufbx/Wrapper/ufbx_cache_channel.nativegen.cs @@ -24,17 +24,17 @@ public unsafe partial struct ufbx_cache_channel } /// - /// From: + /// From: /// [System.Runtime.CompilerServices.MethodImpl(System.Runtime.CompilerServices.MethodImplOptions.AggressiveInlining)] - public nuint SampleGeometryCacheVec3(double time, ReadOnlySpan data, ufbx_geometry_cache_data_opts* opts) + public nuint SampleGeometryCacheVec3(double time, ReadOnlySpan data, ufbx_geometry_cache_data_opts* opts) { - fixed (Misaki.HighPerformance.Mathematics.float3* pdata = data) + fixed (ufbx_vec3* pdata = data) { return Api.ufbx_sample_geometry_cache_vec3( (ufbx_cache_channel*)System.Runtime.CompilerServices.Unsafe.AsPointer(ref this), time, - (Misaki.HighPerformance.Mathematics.float3*)pdata, + (ufbx_vec3*)pdata, (nuint)data.Length, opts); } diff --git a/src/ThridParty/Ghost.Ufbx/Wrapper/ufbx_cache_frame.nativegen.cs b/src/ThridParty/Ghost.Ufbx/Wrapper/ufbx_cache_frame.nativegen.cs index a491972..a68e111 100644 --- a/src/ThridParty/Ghost.Ufbx/Wrapper/ufbx_cache_frame.nativegen.cs +++ b/src/ThridParty/Ghost.Ufbx/Wrapper/ufbx_cache_frame.nativegen.cs @@ -23,16 +23,16 @@ public unsafe partial struct ufbx_cache_frame } /// - /// From: + /// From: /// [System.Runtime.CompilerServices.MethodImpl(System.Runtime.CompilerServices.MethodImplOptions.AggressiveInlining)] - public nuint ReadGeometryCacheVec3(ReadOnlySpan data, ufbx_geometry_cache_data_opts* opts) + public nuint ReadGeometryCacheVec3(ReadOnlySpan data, ufbx_geometry_cache_data_opts* opts) { - fixed (Misaki.HighPerformance.Mathematics.float3* pdata = data) + fixed (ufbx_vec3* pdata = data) { return Api.ufbx_read_geometry_cache_vec3( (ufbx_cache_frame*)System.Runtime.CompilerServices.Unsafe.AsPointer(ref this), - (Misaki.HighPerformance.Mathematics.float3*)pdata, + (ufbx_vec3*)pdata, (nuint)data.Length, opts); } diff --git a/src/ThridParty/Ghost.Ufbx/Wrapper/ufbx_matrix.nativegen.cs b/src/ThridParty/Ghost.Ufbx/Wrapper/ufbx_matrix.nativegen.cs new file mode 100644 index 0000000..446d20d --- /dev/null +++ b/src/ThridParty/Ghost.Ufbx/Wrapper/ufbx_matrix.nativegen.cs @@ -0,0 +1,77 @@ +// +// This file is generated by Ghost.NativeWrapperGen. Do not edit manually. +// + +namespace Ghost.Ufbx; + +public unsafe partial struct ufbx_matrix +{ + /// + /// From: + /// + [System.Runtime.CompilerServices.MethodImpl(System.Runtime.CompilerServices.MethodImplOptions.AggressiveInlining)] + public ufbx_matrix Mul(ufbx_matrix* b) + { + return Api.ufbx_matrix_mul( + (ufbx_matrix*)System.Runtime.CompilerServices.Unsafe.AsPointer(ref this), + b); + } + + /// + /// From: + /// + [System.Runtime.CompilerServices.MethodImpl(System.Runtime.CompilerServices.MethodImplOptions.AggressiveInlining)] + public float Determinant() + { + return Api.ufbx_matrix_determinant((ufbx_matrix*)System.Runtime.CompilerServices.Unsafe.AsPointer(ref this)); + } + + /// + /// From: + /// + [System.Runtime.CompilerServices.MethodImpl(System.Runtime.CompilerServices.MethodImplOptions.AggressiveInlining)] + public ufbx_matrix Invert() + { + return Api.ufbx_matrix_invert((ufbx_matrix*)System.Runtime.CompilerServices.Unsafe.AsPointer(ref this)); + } + + /// + /// From: + /// + [System.Runtime.CompilerServices.MethodImpl(System.Runtime.CompilerServices.MethodImplOptions.AggressiveInlining)] + public ufbx_matrix ForNormals() + { + return Api.ufbx_matrix_for_normals((ufbx_matrix*)System.Runtime.CompilerServices.Unsafe.AsPointer(ref this)); + } + + /// + /// From: + /// + [System.Runtime.CompilerServices.MethodImpl(System.Runtime.CompilerServices.MethodImplOptions.AggressiveInlining)] + public ufbx_vec3 TransformPosition(ufbx_vec3 v) + { + return Api.ufbx_transform_position( + (ufbx_matrix*)System.Runtime.CompilerServices.Unsafe.AsPointer(ref this), + v); + } + + /// + /// From: + /// + [System.Runtime.CompilerServices.MethodImpl(System.Runtime.CompilerServices.MethodImplOptions.AggressiveInlining)] + public ufbx_vec3 TransformDirection(ufbx_vec3 v) + { + return Api.ufbx_transform_direction( + (ufbx_matrix*)System.Runtime.CompilerServices.Unsafe.AsPointer(ref this), + v); + } + + /// + /// From: + /// + [System.Runtime.CompilerServices.MethodImpl(System.Runtime.CompilerServices.MethodImplOptions.AggressiveInlining)] + public ufbx_transform ToTransform() + { + return Api.ufbx_matrix_to_transform((ufbx_matrix*)System.Runtime.CompilerServices.Unsafe.AsPointer(ref this)); + } +} diff --git a/src/ThridParty/Ghost.Ufbx/Wrapper/ufbx_mesh.nativegen.cs b/src/ThridParty/Ghost.Ufbx/Wrapper/ufbx_mesh.nativegen.cs index 6eeef0c..eabadb6 100644 --- a/src/ThridParty/Ghost.Ufbx/Wrapper/ufbx_mesh.nativegen.cs +++ b/src/ThridParty/Ghost.Ufbx/Wrapper/ufbx_mesh.nativegen.cs @@ -54,21 +54,21 @@ public unsafe partial struct ufbx_mesh : System.IDisposable } /// - /// From: + /// From: /// [System.Runtime.CompilerServices.MethodImpl(System.Runtime.CompilerServices.MethodImplOptions.AggressiveInlining)] - public void ComputeNormals(ufbx_vertex_vec3* positions, ReadOnlySpan normal_indices, ReadOnlySpan normals) + public void ComputeNormals(ufbx_vertex_vec3* positions, ReadOnlySpan normal_indices, ReadOnlySpan normals) { fixed (uint* pnormal_indices = normal_indices) { - fixed (Misaki.HighPerformance.Mathematics.float3* pnormals = normals) + fixed (ufbx_vec3* pnormals = normals) { Api.ufbx_compute_normals( (ufbx_mesh*)System.Runtime.CompilerServices.Unsafe.AsPointer(ref this), positions, (uint*)pnormal_indices, (nuint)normal_indices.Length, - (Misaki.HighPerformance.Mathematics.float3*)pnormals, + (ufbx_vec3*)pnormals, (nuint)normals.Length); } } diff --git a/src/ThridParty/Ghost.Ufbx/Wrapper/ufbx_node.nativegen.cs b/src/ThridParty/Ghost.Ufbx/Wrapper/ufbx_node.nativegen.cs index 2c79542..eb42f0a 100644 --- a/src/ThridParty/Ghost.Ufbx/Wrapper/ufbx_node.nativegen.cs +++ b/src/ThridParty/Ghost.Ufbx/Wrapper/ufbx_node.nativegen.cs @@ -10,7 +10,7 @@ public unsafe partial struct ufbx_node /// From: /// [System.Runtime.CompilerServices.MethodImpl(System.Runtime.CompilerServices.MethodImplOptions.AggressiveInlining)] - public Misaki.HighPerformance.Mathematics.float3x4 GetCompatibleMatrixForNormals() + public ufbx_matrix GetCompatibleMatrixForNormals() { return Api.ufbx_get_compatible_matrix_for_normals((ufbx_node*)System.Runtime.CompilerServices.Unsafe.AsPointer(ref this)); } diff --git a/src/ThridParty/Ghost.Ufbx/Wrapper/ufbx_panic.nativegen.cs b/src/ThridParty/Ghost.Ufbx/Wrapper/ufbx_panic.nativegen.cs index a7dbd0d..8b7b9cf 100644 --- a/src/ThridParty/Ghost.Ufbx/Wrapper/ufbx_panic.nativegen.cs +++ b/src/ThridParty/Ghost.Ufbx/Wrapper/ufbx_panic.nativegen.cs @@ -7,10 +7,10 @@ namespace Ghost.Ufbx; public unsafe partial struct ufbx_panic { /// - /// From: + /// From: /// [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) + public ufbx_matrix CatchGetSkinVertexMatrix(ufbx_skin_deformer* skin, nuint vertex, ufbx_matrix* fallback) { return Api.ufbx_catch_get_skin_vertex_matrix( (ufbx_panic*)System.Runtime.CompilerServices.Unsafe.AsPointer(ref this), @@ -88,7 +88,7 @@ public unsafe partial struct ufbx_panic /// From: /// [System.Runtime.CompilerServices.MethodImpl(System.Runtime.CompilerServices.MethodImplOptions.AggressiveInlining)] - public Misaki.HighPerformance.Mathematics.float3 CatchGetWeightedFaceNormal(ufbx_vertex_vec3* positions, ufbx_face face) + public ufbx_vec3 CatchGetWeightedFaceNormal(ufbx_vertex_vec3* positions, ufbx_face face) { return Api.ufbx_catch_get_weighted_face_normal( (ufbx_panic*)System.Runtime.CompilerServices.Unsafe.AsPointer(ref this), @@ -119,14 +119,14 @@ public unsafe partial struct ufbx_panic } /// - /// From: + /// From: /// [System.Runtime.CompilerServices.MethodImpl(System.Runtime.CompilerServices.MethodImplOptions.AggressiveInlining)] - public void CatchComputeNormals(ufbx_mesh* mesh, ufbx_vertex_vec3* positions, ReadOnlySpan normal_indices, ReadOnlySpan normals) + public void CatchComputeNormals(ufbx_mesh* mesh, ufbx_vertex_vec3* positions, ReadOnlySpan normal_indices, ReadOnlySpan normals) { fixed (uint* pnormal_indices = normal_indices) { - fixed (Misaki.HighPerformance.Mathematics.float3* pnormals = normals) + fixed (ufbx_vec3* pnormals = normals) { Api.ufbx_catch_compute_normals( (ufbx_panic*)System.Runtime.CompilerServices.Unsafe.AsPointer(ref this), @@ -134,7 +134,7 @@ public unsafe partial struct ufbx_panic positions, (uint*)pnormal_indices, (nuint)normal_indices.Length, - (Misaki.HighPerformance.Mathematics.float3*)pnormals, + (ufbx_vec3*)pnormals, (nuint)normals.Length); } } @@ -156,7 +156,7 @@ public unsafe partial struct ufbx_panic /// From: /// [System.Runtime.CompilerServices.MethodImpl(System.Runtime.CompilerServices.MethodImplOptions.AggressiveInlining)] - public Misaki.HighPerformance.Mathematics.float2 CatchGetVertexVec2(ufbx_vertex_vec2* v, nuint index) + public ufbx_vec2 CatchGetVertexVec2(ufbx_vertex_vec2* v, nuint index) { return Api.ufbx_catch_get_vertex_vec2( (ufbx_panic*)System.Runtime.CompilerServices.Unsafe.AsPointer(ref this), @@ -168,7 +168,7 @@ public unsafe partial struct ufbx_panic /// From: /// [System.Runtime.CompilerServices.MethodImpl(System.Runtime.CompilerServices.MethodImplOptions.AggressiveInlining)] - public Misaki.HighPerformance.Mathematics.float3 CatchGetVertexVec3(ufbx_vertex_vec3* v, nuint index) + public ufbx_vec3 CatchGetVertexVec3(ufbx_vertex_vec3* v, nuint index) { return Api.ufbx_catch_get_vertex_vec3( (ufbx_panic*)System.Runtime.CompilerServices.Unsafe.AsPointer(ref this), @@ -180,7 +180,7 @@ public unsafe partial struct ufbx_panic /// From: /// [System.Runtime.CompilerServices.MethodImpl(System.Runtime.CompilerServices.MethodImplOptions.AggressiveInlining)] - public Misaki.HighPerformance.Mathematics.float4 CatchGetVertexVec4(ufbx_vertex_vec4* v, nuint index) + public ufbx_vec4 CatchGetVertexVec4(ufbx_vertex_vec4* v, nuint index) { return Api.ufbx_catch_get_vertex_vec4( (ufbx_panic*)System.Runtime.CompilerServices.Unsafe.AsPointer(ref this), diff --git a/src/ThridParty/Ghost.Ufbx/Wrapper/ufbx_props.nativegen.cs b/src/ThridParty/Ghost.Ufbx/Wrapper/ufbx_props.nativegen.cs index 90eb277..9e9b6a6 100644 --- a/src/ThridParty/Ghost.Ufbx/Wrapper/ufbx_props.nativegen.cs +++ b/src/ThridParty/Ghost.Ufbx/Wrapper/ufbx_props.nativegen.cs @@ -61,10 +61,10 @@ public unsafe partial struct ufbx_props } /// - /// From: + /// From: /// [System.Runtime.CompilerServices.MethodImpl(System.Runtime.CompilerServices.MethodImplOptions.AggressiveInlining)] - public Misaki.HighPerformance.Mathematics.float3 FindVec3Len(ReadOnlySpan name, Misaki.HighPerformance.Mathematics.float3 def) + public ufbx_vec3 FindVec3Len(ReadOnlySpan name, ufbx_vec3 def) { fixed (byte* pname = name) { @@ -77,10 +77,10 @@ public unsafe partial struct ufbx_props } /// - /// From: + /// From: /// [System.Runtime.CompilerServices.MethodImpl(System.Runtime.CompilerServices.MethodImplOptions.AggressiveInlining)] - public Misaki.HighPerformance.Mathematics.float3 FindVec3(sbyte* name, Misaki.HighPerformance.Mathematics.float3 def) + public ufbx_vec3 FindVec3(sbyte* name, ufbx_vec3 def) { return Api.ufbx_find_vec3( (ufbx_props*)System.Runtime.CompilerServices.Unsafe.AsPointer(ref this), diff --git a/src/ThridParty/Ghost.Ufbx/Wrapper/ufbx_transform.nativegen.cs b/src/ThridParty/Ghost.Ufbx/Wrapper/ufbx_transform.nativegen.cs index 547ffb3..836c7f1 100644 --- a/src/ThridParty/Ghost.Ufbx/Wrapper/ufbx_transform.nativegen.cs +++ b/src/ThridParty/Ghost.Ufbx/Wrapper/ufbx_transform.nativegen.cs @@ -10,7 +10,7 @@ public unsafe partial struct ufbx_transform /// From: /// [System.Runtime.CompilerServices.MethodImpl(System.Runtime.CompilerServices.MethodImplOptions.AggressiveInlining)] - public Misaki.HighPerformance.Mathematics.float3x4 ToMatrix() + public ufbx_matrix ToMatrix() { return Api.ufbx_transform_to_matrix((ufbx_transform*)System.Runtime.CompilerServices.Unsafe.AsPointer(ref this)); } diff --git a/src/ThridParty/Ghost.Ufbx/Wrapper/ufbx_vertex_vec3.nativegen.cs b/src/ThridParty/Ghost.Ufbx/Wrapper/ufbx_vertex_vec3.nativegen.cs index ee569b7..086ac89 100644 --- a/src/ThridParty/Ghost.Ufbx/Wrapper/ufbx_vertex_vec3.nativegen.cs +++ b/src/ThridParty/Ghost.Ufbx/Wrapper/ufbx_vertex_vec3.nativegen.cs @@ -10,7 +10,7 @@ public unsafe partial struct ufbx_vertex_vec3 /// From: /// [System.Runtime.CompilerServices.MethodImpl(System.Runtime.CompilerServices.MethodImplOptions.AggressiveInlining)] - public Misaki.HighPerformance.Mathematics.float3 GetWeightedFaceNormal(ufbx_face face) + public ufbx_vec3 GetWeightedFaceNormal(ufbx_face face) { return Api.ufbx_get_weighted_face_normal( (ufbx_vertex_vec3*)System.Runtime.CompilerServices.Unsafe.AsPointer(ref this),