Added Ufbx
This commit is contained in:
@@ -1,5 +1,5 @@
|
||||
using Ghost.Nvtt;
|
||||
using Ghost.Nvtt.Native;
|
||||
using Ghost.Nvtt.Warper;
|
||||
using Misaki.HighPerformance.Image;
|
||||
using System.IO.Hashing;
|
||||
using System.Runtime.CompilerServices;
|
||||
|
||||
@@ -1,5 +1,4 @@
|
||||
using CommunityToolkit.Mvvm.ComponentModel;
|
||||
using Ghost.Editor.Core;
|
||||
using Ghost.Editor.Models;
|
||||
using System.Collections.ObjectModel;
|
||||
|
||||
|
||||
@@ -18,6 +18,7 @@
|
||||
<Project Path="ThridParty/Ghost.FMOD/Ghost.FMOD.csproj" />
|
||||
<Project Path="ThridParty/Ghost.MeshOptimizer/Ghost.MeshOptimizer.csproj" />
|
||||
<Project Path="ThridParty/Ghost.Nvtt/Ghost.Nvtt.csproj" />
|
||||
<Project Path="ThridParty/Ghost.Ufbx/Ghost.Ufbx.csproj" Id="c4bd647c-6d77-49d8-ba81-6ed4946474d1" />
|
||||
</Folder>
|
||||
<Folder Name="/Runtime/">
|
||||
<Project Path="Runtime/Ghost.Core/Ghost.Core.csproj" />
|
||||
|
||||
@@ -6,7 +6,6 @@ using Misaki.HighPerformance.Mathematics;
|
||||
|
||||
namespace Ghost.Engine.Components;
|
||||
|
||||
[RequireComponent<LocalToWorld>]
|
||||
public unsafe struct Camera : IComponent
|
||||
{
|
||||
public float nearClipPlane;
|
||||
|
||||
@@ -7,7 +7,7 @@ namespace Ghost.Engine.Components;
|
||||
public struct MeshInstance : IComponent
|
||||
{
|
||||
public Handle<Mesh> mesh;
|
||||
public int materialPaletteIndex;
|
||||
public Identifier<MaterialPalette> materialPalette;
|
||||
public ShadowCastingMode shadowCastingMode;
|
||||
public RenderingLayerMask renderingLayerMask;
|
||||
public bool staticShadowCaster;
|
||||
|
||||
@@ -34,7 +34,7 @@ public class RenderExtractionSystem : ISystem
|
||||
var meshInstances = chunk.GetComponentData<MeshInstance>();
|
||||
var localToWorlds = chunk.GetComponentData<LocalToWorld>();
|
||||
|
||||
for (int i = 0; i < chunk.Count; i++)
|
||||
for (var i = 0; i < chunk.Count; i++)
|
||||
{
|
||||
ref readonly var meshInstance = ref meshInstances[i];
|
||||
ref readonly var localToWorld = ref localToWorlds[i];
|
||||
@@ -43,7 +43,7 @@ public class RenderExtractionSystem : ISystem
|
||||
{
|
||||
localToWorld = localToWorld.matrix,
|
||||
mesh = meshInstance.mesh,
|
||||
materialPaletteIndex = meshInstance.materialPaletteIndex,
|
||||
materialPalette = meshInstance.materialPalette,
|
||||
renderingLayerMask = meshInstance.renderingLayerMask,
|
||||
|
||||
}, 0);
|
||||
|
||||
@@ -9,7 +9,7 @@ namespace Ghost.Entities;
|
||||
public interface ISharedComponent;
|
||||
public interface ISharedWarper
|
||||
{
|
||||
public int Index
|
||||
int Index
|
||||
{
|
||||
get; set;
|
||||
}
|
||||
@@ -24,7 +24,7 @@ public struct Shared<T> : IComponent, ISharedWarper
|
||||
}
|
||||
}
|
||||
|
||||
internal unsafe sealed class SharedComponentStore : IDisposable
|
||||
internal sealed unsafe class SharedComponentStore : IDisposable
|
||||
{
|
||||
private struct EntryInfo
|
||||
{
|
||||
@@ -88,7 +88,7 @@ internal unsafe sealed class SharedComponentStore : IDisposable
|
||||
// If collision: fall through to insert (you may want a secondary structure).
|
||||
}
|
||||
|
||||
int index = AllocateEntry(ref store);
|
||||
var index = AllocateEntry(ref store);
|
||||
|
||||
var dst = (byte*)store.data.GetUnsafePtr() + (index * store.typeSize);
|
||||
MemoryUtility.MemCpy(dst, data, (nuint)store.typeSize);
|
||||
@@ -168,7 +168,7 @@ internal unsafe sealed class SharedComponentStore : IDisposable
|
||||
}
|
||||
|
||||
// Remove from hash lookup (best-effort; collisions require more robust handling)
|
||||
long key = ((long)componentTypeId << 32) ^ (uint)info.hashCode;
|
||||
var key = ((long)componentTypeId << 32) ^ (uint)info.hashCode;
|
||||
store.hashLookup.Remove(key);
|
||||
|
||||
// Push to free-list
|
||||
@@ -226,16 +226,16 @@ internal unsafe sealed class SharedComponentStore : IDisposable
|
||||
{
|
||||
if (store.freeListHead != 0)
|
||||
{
|
||||
int idx = store.freeListHead;
|
||||
var idx = store.freeListHead;
|
||||
store.freeListHead = store.infos[idx].nextFree;
|
||||
store.infos[idx].nextFree = -1;
|
||||
return idx;
|
||||
}
|
||||
|
||||
int newIndex = store.infos.Count;
|
||||
var newIndex = store.infos.Count;
|
||||
store.infos.Add(default);
|
||||
|
||||
int newByteCount = (newIndex + 1) * store.typeSize;
|
||||
var newByteCount = (newIndex + 1) * store.typeSize;
|
||||
store.data.Resize(newByteCount);
|
||||
|
||||
return newIndex;
|
||||
|
||||
@@ -1167,7 +1167,7 @@ public unsafe partial struct EntityQuery
|
||||
var it = _mask.writeAccess.GetIterator();
|
||||
while (it.Next(out var id))
|
||||
{
|
||||
for (var i =0; i < 1; i++)
|
||||
for (var i = 0; i < 1; i++)
|
||||
{
|
||||
if (id == runner.componentIDs[i])
|
||||
{
|
||||
@@ -1321,7 +1321,7 @@ public unsafe partial struct EntityQuery
|
||||
var it = _mask.writeAccess.GetIterator();
|
||||
while (it.Next(out var id))
|
||||
{
|
||||
for (var i =0; i < 1; i++)
|
||||
for (var i = 0; i < 1; i++)
|
||||
{
|
||||
if (id == runner.componentIDs[i])
|
||||
{
|
||||
@@ -1501,7 +1501,7 @@ public unsafe partial struct EntityQuery
|
||||
var it = _mask.writeAccess.GetIterator();
|
||||
while (it.Next(out var id))
|
||||
{
|
||||
for (var i =0; i < 1; i++)
|
||||
for (var i = 0; i < 1; i++)
|
||||
{
|
||||
if (id == runner.componentIDs[i])
|
||||
{
|
||||
@@ -1707,7 +1707,7 @@ public unsafe partial struct EntityQuery
|
||||
var it = _mask.writeAccess.GetIterator();
|
||||
while (it.Next(out var id))
|
||||
{
|
||||
for (var i =0; i < 1; i++)
|
||||
for (var i = 0; i < 1; i++)
|
||||
{
|
||||
if (id == runner.componentIDs[i])
|
||||
{
|
||||
@@ -1939,7 +1939,7 @@ public unsafe partial struct EntityQuery
|
||||
var it = _mask.writeAccess.GetIterator();
|
||||
while (it.Next(out var id))
|
||||
{
|
||||
for (var i =0; i < 1; i++)
|
||||
for (var i = 0; i < 1; i++)
|
||||
{
|
||||
if (id == runner.componentIDs[i])
|
||||
{
|
||||
@@ -2197,7 +2197,7 @@ public unsafe partial struct EntityQuery
|
||||
var it = _mask.writeAccess.GetIterator();
|
||||
while (it.Next(out var id))
|
||||
{
|
||||
for (var i =0; i < 1; i++)
|
||||
for (var i = 0; i < 1; i++)
|
||||
{
|
||||
if (id == runner.componentIDs[i])
|
||||
{
|
||||
@@ -2481,7 +2481,7 @@ public unsafe partial struct EntityQuery
|
||||
var it = _mask.writeAccess.GetIterator();
|
||||
while (it.Next(out var id))
|
||||
{
|
||||
for (var i =0; i < 1; i++)
|
||||
for (var i = 0; i < 1; i++)
|
||||
{
|
||||
if (id == runner.componentIDs[i])
|
||||
{
|
||||
@@ -2791,7 +2791,7 @@ public unsafe partial struct EntityQuery
|
||||
var it = _mask.writeAccess.GetIterator();
|
||||
while (it.Next(out var id))
|
||||
{
|
||||
for (var i =0; i < 1; i++)
|
||||
for (var i = 0; i < 1; i++)
|
||||
{
|
||||
if (id == runner.componentIDs[i])
|
||||
{
|
||||
|
||||
@@ -138,11 +138,11 @@ public struct Vertex
|
||||
{
|
||||
public const int COUNT = 5;
|
||||
|
||||
public static readonly FixedText32 Position = new("POSITION");
|
||||
public static readonly FixedText32 Normal = new("NORMAL");
|
||||
public static readonly FixedText32 Tangent = new("TANGENT");
|
||||
public static readonly FixedText32 Uv = new("TEXCOORD");
|
||||
public static readonly FixedText32 Color = new("COLOR");
|
||||
public static readonly FixedText32 Position = new("POSITION"u8);
|
||||
public static readonly FixedText32 Normal = new("NORMAL"u8);
|
||||
public static readonly FixedText32 Tangent = new("TANGENT"u8);
|
||||
public static readonly FixedText32 Uv = new("TEXCOORD"u8);
|
||||
public static readonly FixedText32 Color = new("COLOR"u8);
|
||||
}
|
||||
|
||||
public float4 position;
|
||||
|
||||
@@ -5,12 +5,18 @@ using System.Runtime.CompilerServices;
|
||||
|
||||
namespace Ghost.Graphics.Core;
|
||||
|
||||
public readonly struct MaterialPaletteInfo
|
||||
public readonly struct MaterialPalette
|
||||
{
|
||||
public int MaterialCount
|
||||
public readonly ReadOnlyUnsafeCollection<Handle<Material>> materials;
|
||||
|
||||
public unsafe MaterialPalette(Handle<Material>* pMaterials, int count)
|
||||
{
|
||||
get;
|
||||
init;
|
||||
materials = new ReadOnlyUnsafeCollection<Handle<Material>>(pMaterials, count);
|
||||
}
|
||||
|
||||
public MaterialPalette(ReadOnlyUnsafeCollection<Handle<Material>> materials)
|
||||
{
|
||||
this.materials = materials;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -47,14 +53,6 @@ internal sealed class MaterialPaletteStore : IDisposable
|
||||
_entries = new UnsafeList<Entry>(initialCapacity + 1, Allocator.Persistent);
|
||||
_lookup = new UnsafeHashMap<ulong, int>(initialCapacity * 2, Allocator.Persistent);
|
||||
_freeListHead = 0;
|
||||
|
||||
_entries.Add(new Entry
|
||||
{
|
||||
materials = default,
|
||||
refCount = int.MaxValue,
|
||||
lookupHash = 0,
|
||||
nextFree = -1,
|
||||
});
|
||||
}
|
||||
|
||||
~MaterialPaletteStore()
|
||||
@@ -66,14 +64,14 @@ internal sealed class MaterialPaletteStore : IDisposable
|
||||
{
|
||||
if (_freeListHead != 0)
|
||||
{
|
||||
int index = _freeListHead;
|
||||
var index = _freeListHead;
|
||||
ref var entry = ref _entries[index];
|
||||
_freeListHead = entry.nextFree;
|
||||
entry.nextFree = -1;
|
||||
return index;
|
||||
}
|
||||
|
||||
int newIndex = _entries.Count;
|
||||
var newIndex = _entries.Count;
|
||||
_entries.Add(default);
|
||||
return newIndex;
|
||||
}
|
||||
@@ -82,7 +80,7 @@ internal sealed class MaterialPaletteStore : IDisposable
|
||||
{
|
||||
const ulong offset = 14695981039346656037UL;
|
||||
|
||||
ulong hash = offset ^ seed;
|
||||
var hash = offset ^ seed;
|
||||
hash = Mix(hash, (ulong)materials.Length);
|
||||
|
||||
foreach (var material in materials)
|
||||
@@ -112,7 +110,7 @@ internal sealed class MaterialPaletteStore : IDisposable
|
||||
return 0;
|
||||
}
|
||||
|
||||
ulong hash = ComputeLookupHash(materials, 0);
|
||||
var hash = ComputeLookupHash(materials, 0);
|
||||
while (_lookup.TryGetValue(hash, out var existingIndex))
|
||||
{
|
||||
ref var entry = ref _entries[existingIndex];
|
||||
@@ -125,7 +123,7 @@ internal sealed class MaterialPaletteStore : IDisposable
|
||||
hash = ComputeLookupHash(materials, hash);
|
||||
}
|
||||
|
||||
int index = AllocateEntry();
|
||||
var index = AllocateEntry();
|
||||
ref var newEntry = ref _entries[index];
|
||||
newEntry.lookupHash = hash;
|
||||
newEntry.refCount = 1;
|
||||
@@ -140,7 +138,7 @@ internal sealed class MaterialPaletteStore : IDisposable
|
||||
newEntry.materials.Clear();
|
||||
}
|
||||
|
||||
for (int i = 0; i < materials.Length; i++)
|
||||
for (var i = 0; i < materials.Length; i++)
|
||||
{
|
||||
newEntry.materials.Add(materials[i]);
|
||||
}
|
||||
@@ -149,36 +147,29 @@ internal sealed class MaterialPaletteStore : IDisposable
|
||||
return index;
|
||||
}
|
||||
|
||||
public bool IsValid(int paletteIndex)
|
||||
public bool IsValid(Identifier<MaterialPalette> paletteID)
|
||||
{
|
||||
if (paletteIndex == 0)
|
||||
{
|
||||
return true;
|
||||
}
|
||||
|
||||
var paletteIndex = paletteID.Value;
|
||||
return paletteIndex > 0
|
||||
&& paletteIndex < _entries.Count
|
||||
&& _entries[paletteIndex].IsActive;
|
||||
}
|
||||
|
||||
public MaterialPaletteInfo GetInfo(int paletteIndex)
|
||||
public MaterialPalette GetInfo(Identifier<MaterialPalette> paletteID)
|
||||
{
|
||||
ObjectDisposedException.ThrowIf(_disposed, this);
|
||||
|
||||
if (!IsValid(paletteIndex))
|
||||
if (!IsValid(paletteID))
|
||||
{
|
||||
return default;
|
||||
}
|
||||
|
||||
if (paletteIndex == 0)
|
||||
if (paletteID == 0)
|
||||
{
|
||||
return default;
|
||||
}
|
||||
|
||||
return new MaterialPaletteInfo
|
||||
{
|
||||
MaterialCount = _entries[paletteIndex].materials.Count,
|
||||
};
|
||||
return new MaterialPalette(_entries[paletteID].materials.AsReadOnly());
|
||||
}
|
||||
|
||||
public Handle<Material> GetMaterial(int paletteIndex, int localMaterialIndex)
|
||||
@@ -199,16 +190,16 @@ internal sealed class MaterialPaletteStore : IDisposable
|
||||
return entry.materials[localMaterialIndex];
|
||||
}
|
||||
|
||||
public void Release(int paletteIndex)
|
||||
public void Release(Identifier<MaterialPalette> paletteID)
|
||||
{
|
||||
ObjectDisposedException.ThrowIf(_disposed, this);
|
||||
|
||||
if (paletteIndex == 0 || !IsValid(paletteIndex))
|
||||
if (paletteID == 0 || !IsValid(paletteID))
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
ref var entry = ref _entries[paletteIndex];
|
||||
ref var entry = ref _entries[paletteID];
|
||||
entry.refCount--;
|
||||
if (entry.refCount > 0)
|
||||
{
|
||||
@@ -218,7 +209,7 @@ internal sealed class MaterialPaletteStore : IDisposable
|
||||
_lookup.Remove(entry.lookupHash);
|
||||
entry.materials.Clear();
|
||||
entry.nextFree = _freeListHead;
|
||||
_freeListHead = paletteIndex;
|
||||
_freeListHead = paletteID;
|
||||
}
|
||||
|
||||
public void Dispose()
|
||||
@@ -228,7 +219,7 @@ internal sealed class MaterialPaletteStore : IDisposable
|
||||
return;
|
||||
}
|
||||
|
||||
for (int i = 0; i < _entries.Count; i++)
|
||||
for (var i = 0; i < _entries.Count; i++)
|
||||
{
|
||||
_entries[i].Dispose();
|
||||
}
|
||||
|
||||
@@ -9,7 +9,7 @@ public struct RenderRecord
|
||||
{
|
||||
public float4x4 localToWorld;
|
||||
public Handle<Mesh> mesh;
|
||||
public int materialPaletteIndex;
|
||||
public Identifier<MaterialPalette> materialPalette;
|
||||
public RenderingLayerMask renderingLayerMask;
|
||||
}
|
||||
|
||||
@@ -74,7 +74,7 @@ public struct RenderList : IDisposable
|
||||
|
||||
_threadLocalRecords = new UnsafeArray<UnsafeList<RenderRecord>>(maxLevelOfConcurrency, allocationHandle);
|
||||
|
||||
for (int i = 0; i < maxLevelOfConcurrency; i++)
|
||||
for (var i = 0; i < maxLevelOfConcurrency; i++)
|
||||
{
|
||||
_threadLocalRecords[i] = new UnsafeList<RenderRecord>(capacity, allocationHandle);
|
||||
}
|
||||
@@ -114,7 +114,7 @@ public struct RenderList : IDisposable
|
||||
public readonly void Clear()
|
||||
{
|
||||
ThrowIfNotCreated();
|
||||
for (int i = 0; i < _threadLocalRecords.Length; i++)
|
||||
for (var i = 0; i < _threadLocalRecords.Length; i++)
|
||||
{
|
||||
_threadLocalRecords[i].Clear();
|
||||
}
|
||||
@@ -134,7 +134,7 @@ public struct RenderList : IDisposable
|
||||
}
|
||||
|
||||
var maxConcurrency = Math.Min(_threadLocalRecords.Length, other._threadLocalRecords.Length);
|
||||
for (int i = 0; i < maxConcurrency; i++)
|
||||
for (var i = 0; i < maxConcurrency; i++)
|
||||
{
|
||||
_threadLocalRecords[i].AddRange(other._threadLocalRecords[i].AsSpan());
|
||||
}
|
||||
@@ -142,7 +142,7 @@ public struct RenderList : IDisposable
|
||||
if (other._threadLocalRecords.Length > _threadLocalRecords.Length)
|
||||
{
|
||||
// Add remaining records from other lists to the first list if other has more thread local lists than this
|
||||
for (int i = _threadLocalRecords.Length; i < other._threadLocalRecords.Length; i++)
|
||||
for (var i = _threadLocalRecords.Length; i < other._threadLocalRecords.Length; i++)
|
||||
{
|
||||
_threadLocalRecords[0].AddRange(other._threadLocalRecords[i].AsSpan());
|
||||
}
|
||||
@@ -156,7 +156,7 @@ public struct RenderList : IDisposable
|
||||
return;
|
||||
}
|
||||
|
||||
for (int i = 0; i < _threadLocalRecords.Length; i++)
|
||||
for (var i = 0; i < _threadLocalRecords.Length; i++)
|
||||
{
|
||||
_threadLocalRecords[i].Dispose();
|
||||
}
|
||||
|
||||
@@ -4,8 +4,8 @@ namespace Ghost.Graphics.Core;
|
||||
|
||||
public struct RenderingLayerMask : IEquatable<RenderingLayerMask>
|
||||
{
|
||||
private static readonly Dictionary<string, uint> _layerNameToBit = new (32);
|
||||
private static readonly Dictionary<uint, string> _bitToLayerName = new (32);
|
||||
private static readonly Dictionary<string, uint> _layerNameToBit = new(32);
|
||||
private static readonly Dictionary<uint, string> _bitToLayerName = new(32);
|
||||
|
||||
internal static void SetLayerName(int layerIndex, string name)
|
||||
{
|
||||
|
||||
@@ -41,7 +41,7 @@ public unsafe partial class GhostRenderPipeline : IRenderPipeline
|
||||
|
||||
public void Render(RenderContext ctx, ReadOnlySpan<RenderRequest> requests)
|
||||
{
|
||||
for (int i = 0; i < requests.Length; i++)
|
||||
for (var i = 0; i < requests.Length; i++)
|
||||
{
|
||||
ref readonly var request = ref requests[i];
|
||||
|
||||
|
||||
@@ -81,27 +81,27 @@ public interface IResourceManager
|
||||
/// <summary>
|
||||
/// Determines whether the specified material palette index is valid.
|
||||
/// </summary>
|
||||
/// <param name="paletteIndex">The palette index to validate.</param>
|
||||
bool HasMaterialPalette(int paletteIndex);
|
||||
/// <param name="paletteID">The palette index to validate.</param>
|
||||
bool HasMaterialPalette(Identifier<MaterialPalette> paletteID);
|
||||
|
||||
/// <summary>
|
||||
/// Gets metadata for a material palette entry.
|
||||
/// </summary>
|
||||
/// <param name="paletteIndex">The palette index to query.</param>
|
||||
MaterialPaletteInfo GetMaterialPaletteInfo(int paletteIndex);
|
||||
/// <param name="paletteID">The palette index to query.</param>
|
||||
MaterialPalette GetMaterialPaletteInfo(Identifier<MaterialPalette> paletteID);
|
||||
|
||||
/// <summary>
|
||||
/// Gets a material handle from a palette entry by local material index.
|
||||
/// </summary>
|
||||
/// <param name="paletteIndex">The palette index to query.</param>
|
||||
/// <param name="paletteID">The palette index to query.</param>
|
||||
/// <param name="localMaterialIndex">The material slot inside the palette.</param>
|
||||
Handle<Material> GetMaterialPaletteMaterial(int paletteIndex, int localMaterialIndex);
|
||||
Handle<Material> GetMaterialPaletteMaterial(Identifier<MaterialPalette> paletteID, int localMaterialIndex);
|
||||
|
||||
/// <summary>
|
||||
/// Releases a material palette reference previously returned by <see cref="GetOrCreateMaterialPalette(ReadOnlySpan{Handle{Material}})"/>.
|
||||
/// </summary>
|
||||
/// <param name="paletteIndex">The palette index to release.</param>
|
||||
void ReleaseMaterialPalette(int paletteIndex);
|
||||
/// <param name="paletteID">The palette index to release.</param>
|
||||
void ReleaseMaterialPalette(Identifier<MaterialPalette> paletteID);
|
||||
|
||||
/// <summary>
|
||||
/// Determines whether a shader with the specified identifier exists in the collection.
|
||||
@@ -299,28 +299,28 @@ internal sealed class ResourceManager : IResourceManager, IDisposable
|
||||
return _materialPalettes.InsertOrGet(materials);
|
||||
}
|
||||
|
||||
public bool HasMaterialPalette(int paletteIndex)
|
||||
public bool HasMaterialPalette(Identifier<MaterialPalette> paletteID)
|
||||
{
|
||||
ObjectDisposedException.ThrowIf(_disposed, this);
|
||||
return _materialPalettes.IsValid(paletteIndex);
|
||||
return _materialPalettes.IsValid(paletteID);
|
||||
}
|
||||
|
||||
public MaterialPaletteInfo GetMaterialPaletteInfo(int paletteIndex)
|
||||
public MaterialPalette GetMaterialPaletteInfo(Identifier<MaterialPalette> paletteID)
|
||||
{
|
||||
ObjectDisposedException.ThrowIf(_disposed, this);
|
||||
return _materialPalettes.GetInfo(paletteIndex);
|
||||
return _materialPalettes.GetInfo(paletteID);
|
||||
}
|
||||
|
||||
public Handle<Material> GetMaterialPaletteMaterial(int paletteIndex, int localMaterialIndex)
|
||||
public Handle<Material> GetMaterialPaletteMaterial(Identifier<MaterialPalette> paletteID, int localMaterialIndex)
|
||||
{
|
||||
ObjectDisposedException.ThrowIf(_disposed, this);
|
||||
return _materialPalettes.GetMaterial(paletteIndex, localMaterialIndex);
|
||||
return _materialPalettes.GetMaterial(paletteID, localMaterialIndex);
|
||||
}
|
||||
|
||||
public void ReleaseMaterialPalette(int paletteIndex)
|
||||
public void ReleaseMaterialPalette(Identifier<MaterialPalette> paletteID)
|
||||
{
|
||||
ObjectDisposedException.ThrowIf(_disposed, this);
|
||||
_materialPalettes.Release(paletteIndex);
|
||||
_materialPalettes.Release(paletteID);
|
||||
}
|
||||
|
||||
public bool HasShader(Identifier<Shader> id)
|
||||
|
||||
@@ -19,7 +19,7 @@ internal sealed class SwapChainRecord
|
||||
{
|
||||
while (true)
|
||||
{
|
||||
int current = Volatile.Read(ref _refCount);
|
||||
var current = Volatile.Read(ref _refCount);
|
||||
if (current == 0)
|
||||
{
|
||||
return false; // It's dead, let it go.
|
||||
@@ -36,7 +36,7 @@ internal sealed class SwapChainRecord
|
||||
{
|
||||
while (true)
|
||||
{
|
||||
int current = Volatile.Read(ref _refCount);
|
||||
var current = Volatile.Read(ref _refCount);
|
||||
if (current == 0)
|
||||
{
|
||||
return false;
|
||||
|
||||
@@ -16,6 +16,7 @@
|
||||
<ItemGroup>
|
||||
<ProjectReference Include="..\..\Test\Ghost.Test.Core\Ghost.Test.Core.csproj" />
|
||||
<ProjectReference Include="..\..\ThridParty\Ghost.Nvtt\Ghost.Nvtt.csproj" />
|
||||
<ProjectReference Include="..\..\ThridParty\Ghost.Ufbx\Ghost.Ufbx.csproj" />
|
||||
</ItemGroup>
|
||||
|
||||
</Project>
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
using Ghost.Nvtt;
|
||||
using Ghost.Nvtt.Native;
|
||||
using Ghost.Nvtt.Warper;
|
||||
using Ghost.Test.Core;
|
||||
|
||||
namespace Ghost.MicroTest;
|
||||
@@ -22,7 +22,7 @@ namespace Ghost.MicroTest;
|
||||
/// </summary>
|
||||
internal sealed unsafe class NvttBindingTest : ITest
|
||||
{
|
||||
private const string _IMAGE_PATH = @"C:\Users\Misaki\Downloads\Screenshot 2024-07-20 035047.png";
|
||||
private const string _IMAGE_PATH = @"C:/Users/Misaki/Downloads/Screenshot 2024-07-20 035047.png";
|
||||
|
||||
private string _outputDdsPath = string.Empty;
|
||||
|
||||
@@ -53,7 +53,7 @@ internal sealed unsafe class NvttBindingTest : ITest
|
||||
using (var token = NvttGlobal.SetMessageCallback((severity, error, msg) =>
|
||||
{
|
||||
callbackFired++;
|
||||
Console.WriteLine($"\n [NVTT] [{severity}] {error}: {msg}");
|
||||
Console.WriteLine($"/n [NVTT] [{severity}] {error}: {msg}");
|
||||
}))
|
||||
{
|
||||
// Just install + dispose — no assertion needed; must not throw.
|
||||
@@ -124,7 +124,7 @@ internal sealed unsafe class NvttBindingTest : ITest
|
||||
endImage: null
|
||||
);
|
||||
outOpts.SetErrorHandler(err =>
|
||||
Console.WriteLine($"\n [NVTT Error] {err}"));
|
||||
Console.WriteLine($"/n [NVTT Error] {err}"));
|
||||
|
||||
using var ctx = new NvttContextHandle();
|
||||
ctx.SetCudaAcceleration(false); // CPU only for the test
|
||||
@@ -184,13 +184,13 @@ internal sealed unsafe class NvttBindingTest : ITest
|
||||
Assert(fileSize > 128, $"DDS file suspiciously small: {fileSize} bytes");
|
||||
Console.WriteLine($"OK ({fileSize:N0} bytes → {_outputDdsPath})");
|
||||
|
||||
Console.WriteLine("\n[NvttBindingTest] All tests PASSED.");
|
||||
Console.WriteLine("/n[NvttBindingTest] All tests PASSED.");
|
||||
}
|
||||
|
||||
public void Cleanup()
|
||||
{
|
||||
// Leave the DDS file in place so you can inspect it.
|
||||
Console.WriteLine($"\n[NvttBindingTest] Output DDS left at: {_outputDdsPath}");
|
||||
Console.WriteLine($"/n[NvttBindingTest] Output DDS left at: {_outputDdsPath}");
|
||||
}
|
||||
|
||||
// -------------------------------------------------------------------------
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
using Ghost.MicroTest;
|
||||
using Ghost.Test.Core;
|
||||
|
||||
TestRunner.Run<NvttBindingTest>();
|
||||
TestRunner.Run<UfbxBindingTest>();
|
||||
|
||||
55
src/Test/Ghost.MicroTest/UfbxBindingTest.cs
Normal file
55
src/Test/Ghost.MicroTest/UfbxBindingTest.cs
Normal file
@@ -0,0 +1,55 @@
|
||||
using Ghost.Test.Core;
|
||||
using Ghost.Ufbx;
|
||||
using System.Diagnostics;
|
||||
using System.Text;
|
||||
using static Ghost.Ufbx.Api;
|
||||
|
||||
namespace Ghost.MicroTest;
|
||||
|
||||
internal unsafe class UfbxBindingTest : ITest
|
||||
{
|
||||
private static ReadOnlySpan<byte> TestFilePath => "F:/c/Third Parties/ufbx/data/blender_340_z_up_7400_binary.fbx"u8;
|
||||
|
||||
public void Setup()
|
||||
{
|
||||
}
|
||||
|
||||
public void Run()
|
||||
{
|
||||
ufbx_load_opts opts = default;
|
||||
ufbx_error error;
|
||||
ufbx_scene* pScene;
|
||||
|
||||
var path = TestFilePath;
|
||||
fixed (byte* p = path)
|
||||
{
|
||||
pScene = ufbx_load_file((sbyte*)p, &opts, &error);
|
||||
}
|
||||
|
||||
if (pScene == null)
|
||||
{
|
||||
Debug.Fail($"Failed to load scene: {Encoding.UTF8.GetString((byte*)error.description.data, (int)error.description.length)}");
|
||||
}
|
||||
|
||||
for (nuint i = 0; i < pScene->nodes.count; i++)
|
||||
{
|
||||
var node = pScene->nodes.data[i];
|
||||
if (node->is_root)
|
||||
{
|
||||
continue;
|
||||
}
|
||||
|
||||
Console.WriteLine($"Object: {Encoding.UTF8.GetString((byte*)node->name.data, (int)node->name.length)}");
|
||||
if (node->mesh != null)
|
||||
{
|
||||
Console.WriteLine($"-> mesh with {node->mesh->faces.count} faces");
|
||||
}
|
||||
}
|
||||
|
||||
ufbx_free_scene(pScene);
|
||||
}
|
||||
|
||||
public void Cleanup()
|
||||
{
|
||||
}
|
||||
}
|
||||
@@ -1,6 +1,6 @@
|
||||
using System.Runtime.InteropServices;
|
||||
|
||||
namespace Ghost.Nvtt.Native
|
||||
namespace Ghost.Nvtt
|
||||
{
|
||||
public static unsafe partial class Api
|
||||
{
|
||||
@@ -1,4 +1,4 @@
|
||||
namespace Ghost.Nvtt.Native
|
||||
namespace Ghost.Nvtt
|
||||
{
|
||||
public enum EdgeFixup
|
||||
{
|
||||
@@ -1,6 +1,6 @@
|
||||
using System.Diagnostics;
|
||||
|
||||
namespace Ghost.Nvtt.Native
|
||||
namespace Ghost.Nvtt
|
||||
{
|
||||
/// <summary>Defines the annotation found in a native declaration.</summary>
|
||||
[AttributeUsage(AttributeTargets.Struct | AttributeTargets.Enum | AttributeTargets.Property | AttributeTargets.Field | AttributeTargets.Parameter | AttributeTargets.ReturnValue, AllowMultiple = true, Inherited = false)]
|
||||
@@ -1,6 +1,6 @@
|
||||
using System.Diagnostics;
|
||||
|
||||
namespace Ghost.Nvtt.Native
|
||||
namespace Ghost.Nvtt
|
||||
{
|
||||
/// <summary>Defines the type of a member as it was used in the native signature.</summary>
|
||||
[AttributeUsage(AttributeTargets.Struct | AttributeTargets.Enum | AttributeTargets.Property | AttributeTargets.Field | AttributeTargets.Parameter | AttributeTargets.ReturnValue, AllowMultiple = false, Inherited = true)]
|
||||
@@ -1,4 +1,4 @@
|
||||
namespace Ghost.Nvtt.Native
|
||||
namespace Ghost.Nvtt
|
||||
{
|
||||
public enum NvttAlphaMode
|
||||
{
|
||||
@@ -1,4 +1,4 @@
|
||||
namespace Ghost.Nvtt.Native
|
||||
namespace Ghost.Nvtt
|
||||
{
|
||||
public partial struct NvttBatchList
|
||||
{
|
||||
@@ -1,4 +1,4 @@
|
||||
namespace Ghost.Nvtt.Native
|
||||
namespace Ghost.Nvtt
|
||||
{
|
||||
public enum NvttBoolean
|
||||
{
|
||||
@@ -1,4 +1,4 @@
|
||||
namespace Ghost.Nvtt.Native
|
||||
namespace Ghost.Nvtt
|
||||
{
|
||||
public partial struct NvttCPUInputBuffer
|
||||
{
|
||||
@@ -1,4 +1,4 @@
|
||||
namespace Ghost.Nvtt.Native
|
||||
namespace Ghost.Nvtt
|
||||
{
|
||||
public enum NvttChannelOrder
|
||||
{
|
||||
@@ -1,4 +1,4 @@
|
||||
namespace Ghost.Nvtt.Native
|
||||
namespace Ghost.Nvtt
|
||||
{
|
||||
public partial struct NvttCompressionOptions
|
||||
{
|
||||
@@ -1,4 +1,4 @@
|
||||
namespace Ghost.Nvtt.Native
|
||||
namespace Ghost.Nvtt
|
||||
{
|
||||
public enum NvttContainer
|
||||
{
|
||||
@@ -1,4 +1,4 @@
|
||||
namespace Ghost.Nvtt.Native
|
||||
namespace Ghost.Nvtt
|
||||
{
|
||||
public partial struct NvttContext
|
||||
{
|
||||
@@ -1,4 +1,4 @@
|
||||
namespace Ghost.Nvtt.Native
|
||||
namespace Ghost.Nvtt
|
||||
{
|
||||
public enum NvttCubeLayout
|
||||
{
|
||||
@@ -1,4 +1,4 @@
|
||||
namespace Ghost.Nvtt.Native
|
||||
namespace Ghost.Nvtt
|
||||
{
|
||||
public partial struct NvttCubeSurface
|
||||
{
|
||||
@@ -1,4 +1,4 @@
|
||||
namespace Ghost.Nvtt.Native
|
||||
namespace Ghost.Nvtt
|
||||
{
|
||||
public enum NvttEncodeFlags
|
||||
{
|
||||
@@ -1,4 +1,4 @@
|
||||
namespace Ghost.Nvtt.Native
|
||||
namespace Ghost.Nvtt
|
||||
{
|
||||
public unsafe partial struct NvttEncodeSettings
|
||||
{
|
||||
@@ -1,4 +1,4 @@
|
||||
namespace Ghost.Nvtt.Native
|
||||
namespace Ghost.Nvtt
|
||||
{
|
||||
public enum NvttError
|
||||
{
|
||||
@@ -1,4 +1,4 @@
|
||||
namespace Ghost.Nvtt.Native
|
||||
namespace Ghost.Nvtt
|
||||
{
|
||||
public enum NvttFormat
|
||||
{
|
||||
@@ -1,4 +1,4 @@
|
||||
namespace Ghost.Nvtt.Native
|
||||
namespace Ghost.Nvtt
|
||||
{
|
||||
public partial struct NvttGPUInputBuffer
|
||||
{
|
||||
@@ -1,4 +1,4 @@
|
||||
namespace Ghost.Nvtt.Native
|
||||
namespace Ghost.Nvtt
|
||||
{
|
||||
public enum NvttInputFormat
|
||||
{
|
||||
@@ -1,4 +1,4 @@
|
||||
namespace Ghost.Nvtt.Native
|
||||
namespace Ghost.Nvtt
|
||||
{
|
||||
public enum NvttMipmapFilter
|
||||
{
|
||||
@@ -1,4 +1,4 @@
|
||||
namespace Ghost.Nvtt.Native
|
||||
namespace Ghost.Nvtt
|
||||
{
|
||||
public enum NvttNormalTransform
|
||||
{
|
||||
@@ -1,4 +1,4 @@
|
||||
namespace Ghost.Nvtt.Native
|
||||
namespace Ghost.Nvtt
|
||||
{
|
||||
public partial struct NvttOutputOptions
|
||||
{
|
||||
@@ -1,4 +1,4 @@
|
||||
namespace Ghost.Nvtt.Native
|
||||
namespace Ghost.Nvtt
|
||||
{
|
||||
public enum NvttPixelType
|
||||
{
|
||||
@@ -1,4 +1,4 @@
|
||||
namespace Ghost.Nvtt.Native
|
||||
namespace Ghost.Nvtt
|
||||
{
|
||||
public enum NvttQuality
|
||||
{
|
||||
@@ -1,6 +1,6 @@
|
||||
using System.Runtime.CompilerServices;
|
||||
|
||||
namespace Ghost.Nvtt.Native
|
||||
namespace Ghost.Nvtt
|
||||
{
|
||||
public unsafe partial struct NvttRefImage
|
||||
{
|
||||
@@ -1,4 +1,4 @@
|
||||
namespace Ghost.Nvtt.Native
|
||||
namespace Ghost.Nvtt
|
||||
{
|
||||
public enum NvttResizeFilter
|
||||
{
|
||||
@@ -1,4 +1,4 @@
|
||||
namespace Ghost.Nvtt.Native
|
||||
namespace Ghost.Nvtt
|
||||
{
|
||||
public enum NvttRoundMode
|
||||
{
|
||||
@@ -1,4 +1,4 @@
|
||||
namespace Ghost.Nvtt.Native
|
||||
namespace Ghost.Nvtt
|
||||
{
|
||||
public enum NvttSeverity
|
||||
{
|
||||
@@ -1,4 +1,4 @@
|
||||
namespace Ghost.Nvtt.Native
|
||||
namespace Ghost.Nvtt
|
||||
{
|
||||
public partial struct NvttSurface
|
||||
{
|
||||
@@ -1,4 +1,4 @@
|
||||
namespace Ghost.Nvtt.Native
|
||||
namespace Ghost.Nvtt
|
||||
{
|
||||
public partial struct NvttSurfaceSet
|
||||
{
|
||||
@@ -1,4 +1,4 @@
|
||||
namespace Ghost.Nvtt.Native
|
||||
namespace Ghost.Nvtt
|
||||
{
|
||||
public enum NvttTextureType
|
||||
{
|
||||
@@ -1,4 +1,4 @@
|
||||
namespace Ghost.Nvtt.Native
|
||||
namespace Ghost.Nvtt
|
||||
{
|
||||
public partial struct NvttTimingContext
|
||||
{
|
||||
@@ -1,4 +1,4 @@
|
||||
namespace Ghost.Nvtt.Native
|
||||
namespace Ghost.Nvtt
|
||||
{
|
||||
public enum NvttToneMapper
|
||||
{
|
||||
@@ -1,4 +1,4 @@
|
||||
namespace Ghost.Nvtt.Native
|
||||
namespace Ghost.Nvtt
|
||||
{
|
||||
public enum NvttValueType
|
||||
{
|
||||
@@ -1,4 +1,4 @@
|
||||
namespace Ghost.Nvtt.Native
|
||||
namespace Ghost.Nvtt
|
||||
{
|
||||
public enum NvttWrapMode
|
||||
{
|
||||
@@ -15,10 +15,6 @@
|
||||
<IsAotCompatible>True</IsAotCompatible>
|
||||
</PropertyGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<Using Include="Ghost.Nvtt.Native" />
|
||||
</ItemGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<None Update="runtimes\win-x64\native\nvtt.dll">
|
||||
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
namespace Ghost.Nvtt;
|
||||
namespace Ghost.Nvtt.Warper;
|
||||
|
||||
/// <summary>
|
||||
/// Wrapper around an nvtt batch list — a list of (surface, face, mipmap,
|
||||
@@ -1,4 +1,4 @@
|
||||
namespace Ghost.Nvtt;
|
||||
namespace Ghost.Nvtt.Warper;
|
||||
|
||||
/// <summary>
|
||||
/// Controls how a surface is compressed - format, quality, pixel layout and
|
||||
@@ -1,4 +1,4 @@
|
||||
namespace Ghost.Nvtt;
|
||||
namespace Ghost.Nvtt.Warper;
|
||||
|
||||
/// <summary>
|
||||
/// Wrapper around the nvtt compression context — the central object that drives
|
||||
@@ -1,4 +1,4 @@
|
||||
namespace Ghost.Nvtt;
|
||||
namespace Ghost.Nvtt.Warper;
|
||||
|
||||
/// <summary>
|
||||
/// Wrapper around an nvtt cube-map surface (six faces, optional mip chain).
|
||||
@@ -1,6 +1,6 @@
|
||||
using System.Runtime.InteropServices;
|
||||
|
||||
namespace Ghost.Nvtt;
|
||||
namespace Ghost.Nvtt.Warper;
|
||||
|
||||
/// <summary>
|
||||
/// Static helpers wrapping global nvtt functions (version, CUDA detection,
|
||||
@@ -1,7 +1,7 @@
|
||||
using System.Runtime.CompilerServices;
|
||||
using System.Text;
|
||||
|
||||
namespace Ghost.Nvtt;
|
||||
namespace Ghost.Nvtt.Warper;
|
||||
|
||||
/// <summary>
|
||||
/// Internal helpers for converting between managed and unmanaged types.
|
||||
@@ -1,6 +1,6 @@
|
||||
using System.Runtime.InteropServices;
|
||||
|
||||
namespace Ghost.Nvtt;
|
||||
namespace Ghost.Nvtt.Warper;
|
||||
|
||||
/// <summary>
|
||||
/// Configures where compressed data is written and how it is formatted.
|
||||
@@ -26,10 +26,10 @@ public sealed unsafe class NvttOutputOptionsHandle : IDisposable
|
||||
private delegate void BeginImageDelegate(int size, int width, int height, int depth, int face, int mipLevel);
|
||||
|
||||
[UnmanagedFunctionPointer(CallingConvention.Cdecl)]
|
||||
private delegate Ghost.Nvtt.Native.NvttBoolean OutputDataDelegate(void* data, int size, Ghost.Nvtt.Native.NvttBoolean lastChunk);
|
||||
private delegate NvttBoolean OutputDataDelegate(void* data, int size, NvttBoolean lastChunk);
|
||||
|
||||
[UnmanagedFunctionPointer(CallingConvention.Cdecl)]
|
||||
private delegate void ErrorDelegate(Ghost.Nvtt.Native.NvttError error);
|
||||
private delegate void ErrorDelegate(NvttError error);
|
||||
|
||||
// Pinned delegate instances - must stay alive as long as native code may call them.
|
||||
private BeginImageDelegate? _beginImageDelegate;
|
||||
@@ -174,8 +174,7 @@ public sealed unsafe class NvttOutputOptionsHandle : IDisposable
|
||||
_outputDataDelegate = (data, size, lastChunk) =>
|
||||
{
|
||||
var ok = outputData?.Invoke((nint)data, size) ?? true;
|
||||
return ok ? Ghost.Nvtt.Native.NvttBoolean.NVTT_True
|
||||
: Ghost.Nvtt.Native.NvttBoolean.NVTT_False;
|
||||
return ok ? Ghost.Nvtt.NvttBoolean.NVTT_True : Ghost.Nvtt.NvttBoolean.NVTT_False;
|
||||
};
|
||||
|
||||
var beginPtr = Marshal.GetFunctionPointerForDelegate(_beginImageDelegate);
|
||||
@@ -184,7 +183,7 @@ public sealed unsafe class NvttOutputOptionsHandle : IDisposable
|
||||
Api.nvttSetOutputOptionsOutputHandler(
|
||||
_ptr,
|
||||
(delegate* unmanaged[Cdecl]<int, int, int, int, int, int, void>)beginPtr,
|
||||
(delegate* unmanaged[Cdecl]<void*, int, Ghost.Nvtt.Native.NvttBoolean>)outputPtr,
|
||||
(delegate* unmanaged[Cdecl]<void*, int, NvttBoolean>)outputPtr,
|
||||
IntPtr.Zero);
|
||||
}
|
||||
|
||||
@@ -196,7 +195,7 @@ public sealed unsafe class NvttOutputOptionsHandle : IDisposable
|
||||
var errorPtr = Marshal.GetFunctionPointerForDelegate(_errorDelegate);
|
||||
Api.nvttSetOutputOptionsErrorHandler(
|
||||
_ptr,
|
||||
(delegate* unmanaged[Cdecl]<Ghost.Nvtt.Native.NvttError, void>)errorPtr);
|
||||
(delegate* unmanaged[Cdecl]<NvttError, void>)errorPtr);
|
||||
}
|
||||
|
||||
// -------------------------------------------------------------------------
|
||||
@@ -1,4 +1,4 @@
|
||||
namespace Ghost.Nvtt;
|
||||
namespace Ghost.Nvtt.Warper;
|
||||
|
||||
/// <summary>
|
||||
/// Wrapper around a single 2-D / 3-D / cube-face image surface used as input
|
||||
@@ -201,7 +201,7 @@ public sealed unsafe class NvttSurfaceHandle : IDisposable
|
||||
var utf8 = NvttInterop.ToUtf8(fileName, buf);
|
||||
fixed (byte* p = utf8)
|
||||
{
|
||||
Ghost.Nvtt.Native.NvttBoolean nvAlpha;
|
||||
NvttBoolean nvAlpha;
|
||||
var ok = NvttInterop.ToBool(
|
||||
Api.nvttSurfaceLoad(_ptr, (sbyte*)p, &nvAlpha,
|
||||
NvttInterop.ToNvtt(expectSigned), tc));
|
||||
@@ -217,7 +217,7 @@ public sealed unsafe class NvttSurfaceHandle : IDisposable
|
||||
ThrowIfDisposed();
|
||||
fixed (byte* p = data)
|
||||
{
|
||||
Ghost.Nvtt.Native.NvttBoolean nvAlpha;
|
||||
NvttBoolean nvAlpha;
|
||||
var ok = NvttInterop.ToBool(
|
||||
Api.nvttSurfaceLoadFromMemory(_ptr, p, (ulong)data.Length,
|
||||
&nvAlpha, NvttInterop.ToNvtt(expectSigned), tc));
|
||||
@@ -1,4 +1,4 @@
|
||||
namespace Ghost.Nvtt;
|
||||
namespace Ghost.Nvtt.Warper;
|
||||
|
||||
/// <summary>
|
||||
/// Wrapper around an nvtt surface set — a collection of faces and mip levels
|
||||
@@ -1,4 +1,4 @@
|
||||
namespace Ghost.Nvtt;
|
||||
namespace Ghost.Nvtt.Warper;
|
||||
|
||||
/// <summary>
|
||||
/// Wraps an nvtt timing context that records per-operation wall-clock times.
|
||||
3
src/ThridParty/Ghost.Ufbx/DisableRuntimeMarshalling.cs
Normal file
3
src/ThridParty/Ghost.Ufbx/DisableRuntimeMarshalling.cs
Normal file
@@ -0,0 +1,3 @@
|
||||
using System.Runtime.CompilerServices;
|
||||
|
||||
[assembly: DisableRuntimeMarshalling]
|
||||
963
src/ThridParty/Ghost.Ufbx/Generated/Api.cs
Normal file
963
src/ThridParty/Ghost.Ufbx/Generated/Api.cs
Normal file
@@ -0,0 +1,963 @@
|
||||
using System.Runtime.InteropServices;
|
||||
using static Ghost.Ufbx.ufbx_aperture_format;
|
||||
using static Ghost.Ufbx.ufbx_aperture_mode;
|
||||
using static Ghost.Ufbx.ufbx_aspect_mode;
|
||||
using static Ghost.Ufbx.ufbx_bake_step_handling;
|
||||
using static Ghost.Ufbx.ufbx_blend_mode;
|
||||
using static Ghost.Ufbx.ufbx_cache_data_encoding;
|
||||
using static Ghost.Ufbx.ufbx_cache_data_format;
|
||||
using static Ghost.Ufbx.ufbx_cache_file_format;
|
||||
using static Ghost.Ufbx.ufbx_cache_interpretation;
|
||||
using static Ghost.Ufbx.ufbx_constraint_aim_up_type;
|
||||
using static Ghost.Ufbx.ufbx_constraint_ik_pole_type;
|
||||
using static Ghost.Ufbx.ufbx_constraint_type;
|
||||
using static Ghost.Ufbx.ufbx_coordinate_axis;
|
||||
using static Ghost.Ufbx.ufbx_dom_value_type;
|
||||
using static Ghost.Ufbx.ufbx_element_type;
|
||||
using static Ghost.Ufbx.ufbx_error_type;
|
||||
using static Ghost.Ufbx.ufbx_exporter;
|
||||
using static Ghost.Ufbx.ufbx_extrapolation_mode;
|
||||
using static Ghost.Ufbx.ufbx_file_format;
|
||||
using static Ghost.Ufbx.ufbx_gate_fit;
|
||||
using static Ghost.Ufbx.ufbx_geometry_transform_handling;
|
||||
using static Ghost.Ufbx.ufbx_index_error_handling;
|
||||
using static Ghost.Ufbx.ufbx_inherit_mode;
|
||||
using static Ghost.Ufbx.ufbx_inherit_mode_handling;
|
||||
using static Ghost.Ufbx.ufbx_interpolation;
|
||||
using static Ghost.Ufbx.ufbx_light_area_shape;
|
||||
using static Ghost.Ufbx.ufbx_light_decay;
|
||||
using static Ghost.Ufbx.ufbx_light_type;
|
||||
using static Ghost.Ufbx.ufbx_lod_display;
|
||||
using static Ghost.Ufbx.ufbx_marker_type;
|
||||
using static Ghost.Ufbx.ufbx_material_fbx_map;
|
||||
using static Ghost.Ufbx.ufbx_material_feature;
|
||||
using static Ghost.Ufbx.ufbx_material_pbr_map;
|
||||
using static Ghost.Ufbx.ufbx_mirror_axis;
|
||||
using static Ghost.Ufbx.ufbx_nurbs_topology;
|
||||
using static Ghost.Ufbx.ufbx_open_file_type;
|
||||
using static Ghost.Ufbx.ufbx_pivot_handling;
|
||||
using static Ghost.Ufbx.ufbx_projection_mode;
|
||||
using static Ghost.Ufbx.ufbx_prop_type;
|
||||
using static Ghost.Ufbx.ufbx_rotation_order;
|
||||
using static Ghost.Ufbx.ufbx_shader_texture_type;
|
||||
using static Ghost.Ufbx.ufbx_shader_type;
|
||||
using static Ghost.Ufbx.ufbx_skinning_method;
|
||||
using static Ghost.Ufbx.ufbx_snap_mode;
|
||||
using static Ghost.Ufbx.ufbx_space_conversion;
|
||||
using static Ghost.Ufbx.ufbx_subdivision_boundary;
|
||||
using static Ghost.Ufbx.ufbx_subdivision_display_mode;
|
||||
using static Ghost.Ufbx.ufbx_texture_type;
|
||||
using static Ghost.Ufbx.ufbx_thumbnail_format;
|
||||
using static Ghost.Ufbx.ufbx_time_mode;
|
||||
using static Ghost.Ufbx.ufbx_time_protocol;
|
||||
using static Ghost.Ufbx.ufbx_unicode_error_handling;
|
||||
using static Ghost.Ufbx.ufbx_warning_type;
|
||||
using static Ghost.Ufbx.ufbx_wrap_mode;
|
||||
|
||||
namespace Ghost.Ufbx
|
||||
{
|
||||
public static unsafe partial class Api
|
||||
{
|
||||
public const int UFBX_ROTATION_ORDER_COUNT = (int)(UFBX_ROTATION_ORDER_SPHERIC + 1);
|
||||
|
||||
public const int UFBX_DOM_VALUE_TYPE_COUNT = (int)(UFBX_DOM_VALUE_ARRAY_IGNORED + 1);
|
||||
|
||||
public const int UFBX_PROP_TYPE_COUNT = (int)(UFBX_PROP_REFERENCE + 1);
|
||||
|
||||
public const int UFBX_ELEMENT_TYPE_COUNT = (int)(UFBX_ELEMENT_METADATA_OBJECT + 1);
|
||||
|
||||
public const int UFBX_INHERIT_MODE_COUNT = (int)(UFBX_INHERIT_MODE_COMPONENTWISE_SCALE + 1);
|
||||
|
||||
public const int UFBX_MIRROR_AXIS_COUNT = (int)(UFBX_MIRROR_AXIS_Z + 1);
|
||||
|
||||
public const int UFBX_SUBDIVISION_DISPLAY_MODE_COUNT = (int)(UFBX_SUBDIVISION_DISPLAY_SMOOTH + 1);
|
||||
|
||||
public const int UFBX_SUBDIVISION_BOUNDARY_COUNT = (int)(UFBX_SUBDIVISION_BOUNDARY_SHARP_INTERIOR + 1);
|
||||
|
||||
public const int UFBX_LIGHT_TYPE_COUNT = (int)(UFBX_LIGHT_VOLUME + 1);
|
||||
|
||||
public const int UFBX_LIGHT_DECAY_COUNT = (int)(UFBX_LIGHT_DECAY_CUBIC + 1);
|
||||
|
||||
public const int UFBX_LIGHT_AREA_SHAPE_COUNT = (int)(UFBX_LIGHT_AREA_SHAPE_SPHERE + 1);
|
||||
|
||||
public const int UFBX_PROJECTION_MODE_COUNT = (int)(UFBX_PROJECTION_MODE_ORTHOGRAPHIC + 1);
|
||||
|
||||
public const int UFBX_ASPECT_MODE_COUNT = (int)(UFBX_ASPECT_MODE_FIXED_HEIGHT + 1);
|
||||
|
||||
public const int UFBX_APERTURE_MODE_COUNT = (int)(UFBX_APERTURE_MODE_FOCAL_LENGTH + 1);
|
||||
|
||||
public const int UFBX_GATE_FIT_COUNT = (int)(UFBX_GATE_FIT_STRETCH + 1);
|
||||
|
||||
public const int UFBX_APERTURE_FORMAT_COUNT = (int)(UFBX_APERTURE_FORMAT_IMAX + 1);
|
||||
|
||||
public const int UFBX_COORDINATE_AXIS_COUNT = (int)(UFBX_COORDINATE_AXIS_UNKNOWN + 1);
|
||||
|
||||
public const int UFBX_NURBS_TOPOLOGY_COUNT = (int)(UFBX_NURBS_TOPOLOGY_CLOSED + 1);
|
||||
|
||||
public const int UFBX_MARKER_TYPE_COUNT = (int)(UFBX_MARKER_IK_EFFECTOR + 1);
|
||||
|
||||
public const int UFBX_LOD_DISPLAY_COUNT = (int)(UFBX_LOD_DISPLAY_HIDE + 1);
|
||||
|
||||
public const int UFBX_SKINNING_METHOD_COUNT = (int)(UFBX_SKINNING_METHOD_BLENDED_DQ_LINEAR + 1);
|
||||
|
||||
public const int UFBX_CACHE_FILE_FORMAT_COUNT = (int)(UFBX_CACHE_FILE_FORMAT_MC + 1);
|
||||
|
||||
public const int UFBX_CACHE_DATA_FORMAT_COUNT = (int)(UFBX_CACHE_DATA_FORMAT_VEC3_DOUBLE + 1);
|
||||
|
||||
public const int UFBX_CACHE_DATA_ENCODING_COUNT = (int)(UFBX_CACHE_DATA_ENCODING_BIG_ENDIAN + 1);
|
||||
|
||||
public const int UFBX_CACHE_INTERPRETATION_COUNT = (int)(UFBX_CACHE_INTERPRETATION_VERTEX_NORMAL + 1);
|
||||
|
||||
public const int UFBX_SHADER_TYPE_COUNT = (int)(UFBX_SHADER_WAVEFRONT_MTL + 1);
|
||||
|
||||
public const int UFBX_MATERIAL_FBX_MAP_COUNT = (int)(UFBX_MATERIAL_FBX_VECTOR_DISPLACEMENT + 1);
|
||||
|
||||
public const int UFBX_MATERIAL_PBR_MAP_COUNT = (int)(UFBX_MATERIAL_PBR_TRANSMISSION_GLOSSINESS + 1);
|
||||
|
||||
public const int UFBX_MATERIAL_FEATURE_COUNT = (int)(UFBX_MATERIAL_FEATURE_TRANSMISSION_ROUGHNESS_AS_GLOSSINESS + 1);
|
||||
|
||||
public const int UFBX_TEXTURE_TYPE_COUNT = (int)(UFBX_TEXTURE_SHADER + 1);
|
||||
|
||||
public const int UFBX_BLEND_MODE_COUNT = (int)(UFBX_BLEND_OVERLAY + 1);
|
||||
|
||||
public const int UFBX_WRAP_MODE_COUNT = (int)(UFBX_WRAP_CLAMP + 1);
|
||||
|
||||
public const int UFBX_SHADER_TEXTURE_TYPE_COUNT = (int)(UFBX_SHADER_TEXTURE_OSL + 1);
|
||||
|
||||
public const int UFBX_INTERPOLATION_COUNT = (int)(UFBX_INTERPOLATION_CUBIC + 1);
|
||||
|
||||
public const int UFBX_EXTRAPOLATION_MODE_COUNT = (int)(UFBX_EXTRAPOLATION_REPEAT_RELATIVE + 1);
|
||||
|
||||
public const int UFBX_CONSTRAINT_TYPE_COUNT = (int)(UFBX_CONSTRAINT_SINGLE_CHAIN_IK + 1);
|
||||
|
||||
public const int UFBX_CONSTRAINT_AIM_UP_TYPE_COUNT = (int)(UFBX_CONSTRAINT_AIM_UP_NONE + 1);
|
||||
|
||||
public const int UFBX_CONSTRAINT_IK_POLE_TYPE_COUNT = (int)(UFBX_CONSTRAINT_IK_POLE_NODE + 1);
|
||||
|
||||
public const int UFBX_EXPORTER_COUNT = (int)(UFBX_EXPORTER_MOTION_BUILDER + 1);
|
||||
|
||||
public const int UFBX_FILE_FORMAT_COUNT = (int)(UFBX_FILE_FORMAT_MTL + 1);
|
||||
|
||||
public const int UFBX_WARNING_TYPE_COUNT = (int)(UFBX_WARNING_UNKNOWN_OBJ_DIRECTIVE + 1);
|
||||
|
||||
public const int UFBX_THUMBNAIL_FORMAT_COUNT = (int)(UFBX_THUMBNAIL_FORMAT_RGBA_32 + 1);
|
||||
|
||||
public const int UFBX_SPACE_CONVERSION_COUNT = (int)(UFBX_SPACE_CONVERSION_MODIFY_GEOMETRY + 1);
|
||||
|
||||
public const int UFBX_GEOMETRY_TRANSFORM_HANDLING_COUNT = (int)(UFBX_GEOMETRY_TRANSFORM_HANDLING_MODIFY_GEOMETRY_NO_FALLBACK + 1);
|
||||
|
||||
public const int UFBX_INHERIT_MODE_HANDLING_COUNT = (int)(UFBX_INHERIT_MODE_HANDLING_IGNORE + 1);
|
||||
|
||||
public const int UFBX_PIVOT_HANDLING_COUNT = (int)(UFBX_PIVOT_HANDLING_ADJUST_TO_ROTATION_PIVOT + 1);
|
||||
|
||||
public const int UFBX_TIME_MODE_COUNT = (int)(UFBX_TIME_MODE_59_94_FPS + 1);
|
||||
|
||||
public const int UFBX_TIME_PROTOCOL_COUNT = (int)(UFBX_TIME_PROTOCOL_DEFAULT + 1);
|
||||
|
||||
public const int UFBX_SNAP_MODE_COUNT = (int)(UFBX_SNAP_MODE_SNAP_AND_PLAY + 1);
|
||||
|
||||
public const int UFBX_OPEN_FILE_TYPE_COUNT = (int)(UFBX_OPEN_FILE_OBJ_MTL + 1);
|
||||
|
||||
public const int UFBX_ERROR_TYPE_COUNT = (int)(UFBX_ERROR_UNSUPPORTED_VERSION + 1);
|
||||
|
||||
public const int UFBX_INDEX_ERROR_HANDLING_COUNT = (int)(UFBX_INDEX_ERROR_HANDLING_UNSAFE_IGNORE + 1);
|
||||
|
||||
public const int UFBX_UNICODE_ERROR_HANDLING_COUNT = (int)(UFBX_UNICODE_ERROR_HANDLING_UNSAFE_IGNORE + 1);
|
||||
|
||||
public const int UFBX_BAKE_STEP_HANDLING_COUNT = (int)(UFBX_BAKE_STEP_HANDLING_IGNORE + 1);
|
||||
|
||||
[DllImport("ufbx", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
|
||||
[return: NativeTypeName("_Bool")]
|
||||
public static extern bool ufbx_is_thread_safe();
|
||||
|
||||
[DllImport("ufbx", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
|
||||
public static extern ufbx_scene* ufbx_load_memory([NativeTypeName("const void *")] void* data, [NativeTypeName("size_t")] nuint data_size, [NativeTypeName("const ufbx_load_opts *")] ufbx_load_opts* opts, ufbx_error* error);
|
||||
|
||||
[DllImport("ufbx", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
|
||||
public static extern ufbx_scene* ufbx_load_file([NativeTypeName("const char *")] sbyte* filename, [NativeTypeName("const ufbx_load_opts *")] ufbx_load_opts* opts, ufbx_error* error);
|
||||
|
||||
[DllImport("ufbx", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
|
||||
public static extern ufbx_scene* ufbx_load_file_len([NativeTypeName("const char *")] sbyte* filename, [NativeTypeName("size_t")] nuint filename_len, [NativeTypeName("const ufbx_load_opts *")] ufbx_load_opts* opts, ufbx_error* error);
|
||||
|
||||
[DllImport("ufbx", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
|
||||
public static extern ufbx_scene* ufbx_load_stdio(void* file, [NativeTypeName("const ufbx_load_opts *")] ufbx_load_opts* opts, ufbx_error* error);
|
||||
|
||||
[DllImport("ufbx", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
|
||||
public static extern ufbx_scene* ufbx_load_stdio_prefix(void* file, [NativeTypeName("const void *")] void* prefix, [NativeTypeName("size_t")] nuint prefix_size, [NativeTypeName("const ufbx_load_opts *")] ufbx_load_opts* opts, ufbx_error* error);
|
||||
|
||||
[DllImport("ufbx", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
|
||||
public static extern ufbx_scene* ufbx_load_stream([NativeTypeName("const ufbx_stream *")] ufbx_stream* stream, [NativeTypeName("const ufbx_load_opts *")] ufbx_load_opts* opts, ufbx_error* error);
|
||||
|
||||
[DllImport("ufbx", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
|
||||
public static extern ufbx_scene* ufbx_load_stream_prefix([NativeTypeName("const ufbx_stream *")] ufbx_stream* stream, [NativeTypeName("const void *")] void* prefix, [NativeTypeName("size_t")] nuint prefix_size, [NativeTypeName("const ufbx_load_opts *")] ufbx_load_opts* opts, ufbx_error* error);
|
||||
|
||||
[DllImport("ufbx", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
|
||||
public static extern void ufbx_free_scene(ufbx_scene* scene);
|
||||
|
||||
[DllImport("ufbx", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
|
||||
public static extern void ufbx_retain_scene(ufbx_scene* scene);
|
||||
|
||||
[DllImport("ufbx", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
|
||||
[return: NativeTypeName("size_t")]
|
||||
public static extern nuint ufbx_format_error([NativeTypeName("char *")] sbyte* dst, [NativeTypeName("size_t")] nuint dst_size, [NativeTypeName("const ufbx_error *")] ufbx_error* error);
|
||||
|
||||
[DllImport("ufbx", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
|
||||
public static extern ufbx_prop* ufbx_find_prop_len([NativeTypeName("const ufbx_props *")] ufbx_props* props, [NativeTypeName("const char *")] sbyte* name, [NativeTypeName("size_t")] nuint name_len);
|
||||
|
||||
[DllImport("ufbx", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
|
||||
public static extern ufbx_prop* ufbx_find_prop([NativeTypeName("const ufbx_props *")] ufbx_props* props, [NativeTypeName("const char *")] sbyte* name);
|
||||
|
||||
[DllImport("ufbx", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
|
||||
[return: NativeTypeName("ufbx_real")]
|
||||
public static extern float ufbx_find_real_len([NativeTypeName("const ufbx_props *")] ufbx_props* props, [NativeTypeName("const char *")] sbyte* name, [NativeTypeName("size_t")] nuint name_len, [NativeTypeName("ufbx_real")] float def);
|
||||
|
||||
[DllImport("ufbx", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
|
||||
[return: NativeTypeName("ufbx_real")]
|
||||
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);
|
||||
|
||||
[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);
|
||||
|
||||
[DllImport("ufbx", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
|
||||
[return: NativeTypeName("int64_t")]
|
||||
public static extern long ufbx_find_int_len([NativeTypeName("const ufbx_props *")] ufbx_props* props, [NativeTypeName("const char *")] sbyte* name, [NativeTypeName("size_t")] nuint name_len, [NativeTypeName("int64_t")] long def);
|
||||
|
||||
[DllImport("ufbx", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
|
||||
[return: NativeTypeName("int64_t")]
|
||||
public static extern long ufbx_find_int([NativeTypeName("const ufbx_props *")] ufbx_props* props, [NativeTypeName("const char *")] sbyte* name, [NativeTypeName("int64_t")] long def);
|
||||
|
||||
[DllImport("ufbx", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
|
||||
[return: NativeTypeName("_Bool")]
|
||||
public static extern bool ufbx_find_bool_len([NativeTypeName("const ufbx_props *")] ufbx_props* props, [NativeTypeName("const char *")] sbyte* name, [NativeTypeName("size_t")] nuint name_len, [NativeTypeName("_Bool")] bool def);
|
||||
|
||||
[DllImport("ufbx", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
|
||||
[return: NativeTypeName("_Bool")]
|
||||
public static extern bool ufbx_find_bool([NativeTypeName("const ufbx_props *")] ufbx_props* props, [NativeTypeName("const char *")] sbyte* name, [NativeTypeName("_Bool")] bool def);
|
||||
|
||||
[DllImport("ufbx", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
|
||||
public static extern ufbx_string ufbx_find_string_len([NativeTypeName("const ufbx_props *")] ufbx_props* props, [NativeTypeName("const char *")] sbyte* name, [NativeTypeName("size_t")] nuint name_len, ufbx_string def);
|
||||
|
||||
[DllImport("ufbx", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
|
||||
public static extern ufbx_string ufbx_find_string([NativeTypeName("const ufbx_props *")] ufbx_props* props, [NativeTypeName("const char *")] sbyte* name, ufbx_string def);
|
||||
|
||||
[DllImport("ufbx", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
|
||||
public static extern ufbx_blob ufbx_find_blob_len([NativeTypeName("const ufbx_props *")] ufbx_props* props, [NativeTypeName("const char *")] sbyte* name, [NativeTypeName("size_t")] nuint name_len, ufbx_blob def);
|
||||
|
||||
[DllImport("ufbx", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
|
||||
public static extern ufbx_blob ufbx_find_blob([NativeTypeName("const ufbx_props *")] ufbx_props* props, [NativeTypeName("const char *")] sbyte* name, ufbx_blob def);
|
||||
|
||||
[DllImport("ufbx", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
|
||||
public static extern ufbx_prop* ufbx_find_prop_concat([NativeTypeName("const ufbx_props *")] ufbx_props* props, [NativeTypeName("const ufbx_string *")] ufbx_string* parts, [NativeTypeName("size_t")] nuint num_parts);
|
||||
|
||||
[DllImport("ufbx", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
|
||||
public static extern ufbx_element* ufbx_get_prop_element([NativeTypeName("const ufbx_element *")] ufbx_element* element, [NativeTypeName("const ufbx_prop *")] ufbx_prop* prop, ufbx_element_type type);
|
||||
|
||||
[DllImport("ufbx", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
|
||||
public static extern ufbx_element* ufbx_find_prop_element_len([NativeTypeName("const ufbx_element *")] ufbx_element* element, [NativeTypeName("const char *")] sbyte* name, [NativeTypeName("size_t")] nuint name_len, ufbx_element_type type);
|
||||
|
||||
[DllImport("ufbx", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
|
||||
public static extern ufbx_element* ufbx_find_prop_element([NativeTypeName("const ufbx_element *")] ufbx_element* element, [NativeTypeName("const char *")] sbyte* name, ufbx_element_type type);
|
||||
|
||||
[DllImport("ufbx", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
|
||||
public static extern ufbx_element* ufbx_find_element_len([NativeTypeName("const ufbx_scene *")] ufbx_scene* scene, ufbx_element_type type, [NativeTypeName("const char *")] sbyte* name, [NativeTypeName("size_t")] nuint name_len);
|
||||
|
||||
[DllImport("ufbx", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
|
||||
public static extern ufbx_element* ufbx_find_element([NativeTypeName("const ufbx_scene *")] ufbx_scene* scene, ufbx_element_type type, [NativeTypeName("const char *")] sbyte* name);
|
||||
|
||||
[DllImport("ufbx", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
|
||||
public static extern ufbx_node* ufbx_find_node_len([NativeTypeName("const ufbx_scene *")] ufbx_scene* scene, [NativeTypeName("const char *")] sbyte* name, [NativeTypeName("size_t")] nuint name_len);
|
||||
|
||||
[DllImport("ufbx", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
|
||||
public static extern ufbx_node* ufbx_find_node([NativeTypeName("const ufbx_scene *")] ufbx_scene* scene, [NativeTypeName("const char *")] sbyte* name);
|
||||
|
||||
[DllImport("ufbx", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
|
||||
public static extern ufbx_anim_stack* ufbx_find_anim_stack_len([NativeTypeName("const ufbx_scene *")] ufbx_scene* scene, [NativeTypeName("const char *")] sbyte* name, [NativeTypeName("size_t")] nuint name_len);
|
||||
|
||||
[DllImport("ufbx", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
|
||||
public static extern ufbx_anim_stack* ufbx_find_anim_stack([NativeTypeName("const ufbx_scene *")] ufbx_scene* scene, [NativeTypeName("const char *")] sbyte* name);
|
||||
|
||||
[DllImport("ufbx", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
|
||||
public static extern ufbx_material* ufbx_find_material_len([NativeTypeName("const ufbx_scene *")] ufbx_scene* scene, [NativeTypeName("const char *")] sbyte* name, [NativeTypeName("size_t")] nuint name_len);
|
||||
|
||||
[DllImport("ufbx", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
|
||||
public static extern ufbx_material* ufbx_find_material([NativeTypeName("const ufbx_scene *")] ufbx_scene* scene, [NativeTypeName("const char *")] sbyte* name);
|
||||
|
||||
[DllImport("ufbx", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
|
||||
public static extern ufbx_anim_prop* ufbx_find_anim_prop_len([NativeTypeName("const ufbx_anim_layer *")] ufbx_anim_layer* layer, [NativeTypeName("const ufbx_element *")] ufbx_element* element, [NativeTypeName("const char *")] sbyte* prop, [NativeTypeName("size_t")] nuint prop_len);
|
||||
|
||||
[DllImport("ufbx", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
|
||||
public static extern ufbx_anim_prop* ufbx_find_anim_prop([NativeTypeName("const ufbx_anim_layer *")] ufbx_anim_layer* layer, [NativeTypeName("const ufbx_element *")] ufbx_element* element, [NativeTypeName("const char *")] sbyte* prop);
|
||||
|
||||
[DllImport("ufbx", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
|
||||
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);
|
||||
|
||||
[DllImport("ufbx", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
|
||||
[return: NativeTypeName("ptrdiff_t")]
|
||||
public static extern nint ufbx_inflate(void* dst, [NativeTypeName("size_t")] nuint dst_size, [NativeTypeName("const ufbx_inflate_input *")] ufbx_inflate_input* input, ufbx_inflate_retain* retain);
|
||||
|
||||
[DllImport("ufbx", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
|
||||
[return: NativeTypeName("_Bool")]
|
||||
public static extern bool ufbx_default_open_file(void* user, ufbx_stream* stream, [NativeTypeName("const char *")] sbyte* path, [NativeTypeName("size_t")] nuint path_len, [NativeTypeName("const ufbx_open_file_info *")] ufbx_open_file_info* info);
|
||||
|
||||
[DllImport("ufbx", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
|
||||
[return: NativeTypeName("_Bool")]
|
||||
public static extern bool ufbx_open_file(ufbx_stream* stream, [NativeTypeName("const char *")] sbyte* path, [NativeTypeName("size_t")] nuint path_len, [NativeTypeName("const ufbx_open_file_opts *")] ufbx_open_file_opts* opts, ufbx_error* error);
|
||||
|
||||
[DllImport("ufbx", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
|
||||
[return: NativeTypeName("_Bool")]
|
||||
public static extern bool ufbx_open_file_ctx(ufbx_stream* stream, [NativeTypeName("ufbx_open_file_context")] nuint ctx, [NativeTypeName("const char *")] sbyte* path, [NativeTypeName("size_t")] nuint path_len, [NativeTypeName("const ufbx_open_file_opts *")] ufbx_open_file_opts* opts, ufbx_error* error);
|
||||
|
||||
[DllImport("ufbx", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
|
||||
[return: NativeTypeName("_Bool")]
|
||||
public static extern bool ufbx_open_memory(ufbx_stream* stream, [NativeTypeName("const void *")] void* data, [NativeTypeName("size_t")] nuint data_size, [NativeTypeName("const ufbx_open_memory_opts *")] ufbx_open_memory_opts* opts, ufbx_error* error);
|
||||
|
||||
[DllImport("ufbx", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
|
||||
[return: NativeTypeName("_Bool")]
|
||||
public static extern bool ufbx_open_memory_ctx(ufbx_stream* stream, [NativeTypeName("ufbx_open_file_context")] nuint ctx, [NativeTypeName("const void *")] void* data, [NativeTypeName("size_t")] nuint data_size, [NativeTypeName("const ufbx_open_memory_opts *")] ufbx_open_memory_opts* opts, ufbx_error* error);
|
||||
|
||||
[DllImport("ufbx", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
|
||||
[return: NativeTypeName("ufbx_real")]
|
||||
public static extern float ufbx_evaluate_curve([NativeTypeName("const ufbx_anim_curve *")] ufbx_anim_curve* curve, double time, [NativeTypeName("ufbx_real")] float default_value);
|
||||
|
||||
[DllImport("ufbx", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
|
||||
[return: NativeTypeName("ufbx_real")]
|
||||
public static extern float ufbx_evaluate_curve_flags([NativeTypeName("const ufbx_anim_curve *")] ufbx_anim_curve* curve, double time, [NativeTypeName("ufbx_real")] float default_value, [NativeTypeName("uint32_t")] uint flags);
|
||||
|
||||
[DllImport("ufbx", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
|
||||
[return: NativeTypeName("ufbx_real")]
|
||||
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);
|
||||
|
||||
[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);
|
||||
|
||||
[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);
|
||||
|
||||
[DllImport("ufbx", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
|
||||
public static extern ufbx_prop ufbx_evaluate_prop([NativeTypeName("const ufbx_anim *")] ufbx_anim* anim, [NativeTypeName("const ufbx_element *")] ufbx_element* element, [NativeTypeName("const char *")] sbyte* name, double time);
|
||||
|
||||
[DllImport("ufbx", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
|
||||
public static extern ufbx_prop ufbx_evaluate_prop_flags_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, [NativeTypeName("uint32_t")] uint flags);
|
||||
|
||||
[DllImport("ufbx", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
|
||||
public static extern ufbx_prop ufbx_evaluate_prop_flags([NativeTypeName("const ufbx_anim *")] ufbx_anim* anim, [NativeTypeName("const ufbx_element *")] ufbx_element* element, [NativeTypeName("const char *")] sbyte* name, double time, [NativeTypeName("uint32_t")] uint flags);
|
||||
|
||||
[DllImport("ufbx", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
|
||||
public static extern ufbx_props ufbx_evaluate_props([NativeTypeName("const ufbx_anim *")] ufbx_anim* anim, [NativeTypeName("const ufbx_element *")] ufbx_element* element, double time, ufbx_prop* buffer, [NativeTypeName("size_t")] nuint buffer_size);
|
||||
|
||||
[DllImport("ufbx", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
|
||||
public static extern ufbx_props ufbx_evaluate_props_flags([NativeTypeName("const ufbx_anim *")] ufbx_anim* anim, [NativeTypeName("const ufbx_element *")] ufbx_element* element, double time, ufbx_prop* buffer, [NativeTypeName("size_t")] nuint buffer_size, [NativeTypeName("uint32_t")] uint flags);
|
||||
|
||||
[DllImport("ufbx", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
|
||||
public static extern ufbx_transform ufbx_evaluate_transform([NativeTypeName("const ufbx_anim *")] ufbx_anim* anim, [NativeTypeName("const ufbx_node *")] ufbx_node* node, double time);
|
||||
|
||||
[DllImport("ufbx", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
|
||||
public static extern ufbx_transform ufbx_evaluate_transform_flags([NativeTypeName("const ufbx_anim *")] ufbx_anim* anim, [NativeTypeName("const ufbx_node *")] ufbx_node* node, double time, [NativeTypeName("uint32_t")] uint flags);
|
||||
|
||||
[DllImport("ufbx", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
|
||||
[return: NativeTypeName("ufbx_real")]
|
||||
public static extern float ufbx_evaluate_blend_weight([NativeTypeName("const ufbx_anim *")] ufbx_anim* anim, [NativeTypeName("const ufbx_blend_channel *")] ufbx_blend_channel* channel, double time);
|
||||
|
||||
[DllImport("ufbx", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
|
||||
[return: NativeTypeName("ufbx_real")]
|
||||
public static extern float ufbx_evaluate_blend_weight_flags([NativeTypeName("const ufbx_anim *")] ufbx_anim* anim, [NativeTypeName("const ufbx_blend_channel *")] ufbx_blend_channel* channel, double time, [NativeTypeName("uint32_t")] uint flags);
|
||||
|
||||
[DllImport("ufbx", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
|
||||
public static extern ufbx_scene* ufbx_evaluate_scene([NativeTypeName("const ufbx_scene *")] ufbx_scene* scene, [NativeTypeName("const ufbx_anim *")] ufbx_anim* anim, double time, [NativeTypeName("const ufbx_evaluate_opts *")] ufbx_evaluate_opts* opts, ufbx_error* error);
|
||||
|
||||
[DllImport("ufbx", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
|
||||
public static extern ufbx_anim* ufbx_create_anim([NativeTypeName("const ufbx_scene *")] ufbx_scene* scene, [NativeTypeName("const ufbx_anim_opts *")] ufbx_anim_opts* opts, ufbx_error* error);
|
||||
|
||||
[DllImport("ufbx", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
|
||||
public static extern void ufbx_free_anim(ufbx_anim* anim);
|
||||
|
||||
[DllImport("ufbx", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
|
||||
public static extern void ufbx_retain_anim(ufbx_anim* anim);
|
||||
|
||||
[DllImport("ufbx", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
|
||||
public static extern ufbx_baked_anim* ufbx_bake_anim([NativeTypeName("const ufbx_scene *")] ufbx_scene* scene, [NativeTypeName("const ufbx_anim *")] ufbx_anim* anim, [NativeTypeName("const ufbx_bake_opts *")] ufbx_bake_opts* opts, ufbx_error* error);
|
||||
|
||||
[DllImport("ufbx", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
|
||||
public static extern void ufbx_retain_baked_anim(ufbx_baked_anim* bake);
|
||||
|
||||
[DllImport("ufbx", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
|
||||
public static extern void ufbx_free_baked_anim(ufbx_baked_anim* bake);
|
||||
|
||||
[DllImport("ufbx", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
|
||||
public static extern ufbx_baked_node* ufbx_find_baked_node_by_typed_id(ufbx_baked_anim* bake, [NativeTypeName("uint32_t")] uint typed_id);
|
||||
|
||||
[DllImport("ufbx", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
|
||||
public static extern ufbx_baked_node* ufbx_find_baked_node(ufbx_baked_anim* bake, ufbx_node* node);
|
||||
|
||||
[DllImport("ufbx", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
|
||||
public static extern ufbx_baked_element* ufbx_find_baked_element_by_element_id(ufbx_baked_anim* bake, [NativeTypeName("uint32_t")] uint element_id);
|
||||
|
||||
[DllImport("ufbx", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
|
||||
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);
|
||||
|
||||
[DllImport("ufbx", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
|
||||
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);
|
||||
|
||||
[DllImport("ufbx", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
|
||||
public static extern ufbx_texture* ufbx_find_prop_texture_len([NativeTypeName("const ufbx_material *")] ufbx_material* material, [NativeTypeName("const char *")] sbyte* name, [NativeTypeName("size_t")] nuint name_len);
|
||||
|
||||
[DllImport("ufbx", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
|
||||
public static extern ufbx_texture* ufbx_find_prop_texture([NativeTypeName("const ufbx_material *")] ufbx_material* material, [NativeTypeName("const char *")] sbyte* name);
|
||||
|
||||
[DllImport("ufbx", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
|
||||
public static extern ufbx_string ufbx_find_shader_prop_len([NativeTypeName("const ufbx_shader *")] ufbx_shader* shader, [NativeTypeName("const char *")] sbyte* name, [NativeTypeName("size_t")] nuint name_len);
|
||||
|
||||
[DllImport("ufbx", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
|
||||
public static extern ufbx_string ufbx_find_shader_prop([NativeTypeName("const ufbx_shader *")] ufbx_shader* shader, [NativeTypeName("const char *")] sbyte* name);
|
||||
|
||||
[DllImport("ufbx", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
|
||||
public static extern ufbx_shader_prop_binding_list ufbx_find_shader_prop_bindings_len([NativeTypeName("const ufbx_shader *")] ufbx_shader* shader, [NativeTypeName("const char *")] sbyte* name, [NativeTypeName("size_t")] nuint name_len);
|
||||
|
||||
[DllImport("ufbx", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
|
||||
public static extern ufbx_shader_prop_binding_list ufbx_find_shader_prop_bindings([NativeTypeName("const ufbx_shader *")] ufbx_shader* shader, [NativeTypeName("const char *")] sbyte* name);
|
||||
|
||||
[DllImport("ufbx", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
|
||||
public static extern ufbx_shader_texture_input* ufbx_find_shader_texture_input_len([NativeTypeName("const ufbx_shader_texture *")] ufbx_shader_texture* shader, [NativeTypeName("const char *")] sbyte* name, [NativeTypeName("size_t")] nuint name_len);
|
||||
|
||||
[DllImport("ufbx", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
|
||||
public static extern ufbx_shader_texture_input* ufbx_find_shader_texture_input([NativeTypeName("const ufbx_shader_texture *")] ufbx_shader_texture* shader, [NativeTypeName("const char *")] sbyte* name);
|
||||
|
||||
[DllImport("ufbx", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
|
||||
[return: NativeTypeName("_Bool")]
|
||||
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);
|
||||
|
||||
[DllImport("ufbx", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
|
||||
[return: NativeTypeName("ufbx_real")]
|
||||
public static extern float ufbx_quat_dot(ufbx_quat a, ufbx_quat b);
|
||||
|
||||
[DllImport("ufbx", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
|
||||
public static extern ufbx_quat ufbx_quat_mul(ufbx_quat a, ufbx_quat b);
|
||||
|
||||
[DllImport("ufbx", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
|
||||
public static extern ufbx_quat ufbx_quat_normalize(ufbx_quat q);
|
||||
|
||||
[DllImport("ufbx", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
|
||||
public static extern ufbx_quat ufbx_quat_fix_antipodal(ufbx_quat q, ufbx_quat reference);
|
||||
|
||||
[DllImport("ufbx", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
|
||||
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(ufbx_quat q, [NativeTypeName("ufbx_vec3")] Misaki.HighPerformance.Mathematics.float3 v);
|
||||
|
||||
[DllImport("ufbx", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
|
||||
[return: NativeTypeName("ufbx_vec3")]
|
||||
public static extern Misaki.HighPerformance.Mathematics.float3 ufbx_quat_to_euler(ufbx_quat q, ufbx_rotation_order order);
|
||||
|
||||
[DllImport("ufbx", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
|
||||
public static extern ufbx_quat ufbx_euler_to_quat([NativeTypeName("ufbx_vec3")] Misaki.HighPerformance.Mathematics.float3 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);
|
||||
|
||||
[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);
|
||||
|
||||
[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);
|
||||
|
||||
[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);
|
||||
|
||||
[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);
|
||||
|
||||
[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);
|
||||
|
||||
[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);
|
||||
|
||||
[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);
|
||||
|
||||
[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);
|
||||
|
||||
[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)
|
||||
{
|
||||
return ufbx_catch_get_skin_vertex_matrix(null, skin, vertex, fallback);
|
||||
}
|
||||
|
||||
[DllImport("ufbx", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
|
||||
[return: NativeTypeName("uint32_t")]
|
||||
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);
|
||||
|
||||
[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);
|
||||
|
||||
[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);
|
||||
|
||||
[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);
|
||||
|
||||
[DllImport("ufbx", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
|
||||
[return: NativeTypeName("size_t")]
|
||||
public static extern nuint ufbx_evaluate_nurbs_basis([NativeTypeName("const ufbx_nurbs_basis *")] ufbx_nurbs_basis* basis, [NativeTypeName("ufbx_real")] float u, [NativeTypeName("ufbx_real *")] float* weights, [NativeTypeName("size_t")] nuint num_weights, [NativeTypeName("ufbx_real *")] float* derivatives, [NativeTypeName("size_t")] nuint num_derivatives);
|
||||
|
||||
[DllImport("ufbx", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
|
||||
public static extern ufbx_curve_point ufbx_evaluate_nurbs_curve([NativeTypeName("const ufbx_nurbs_curve *")] ufbx_nurbs_curve* curve, [NativeTypeName("ufbx_real")] float u);
|
||||
|
||||
[DllImport("ufbx", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
|
||||
public static extern ufbx_surface_point ufbx_evaluate_nurbs_surface([NativeTypeName("const ufbx_nurbs_surface *")] ufbx_nurbs_surface* surface, [NativeTypeName("ufbx_real")] float u, [NativeTypeName("ufbx_real")] float v);
|
||||
|
||||
[DllImport("ufbx", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
|
||||
public static extern ufbx_line_curve* ufbx_tessellate_nurbs_curve([NativeTypeName("const ufbx_nurbs_curve *")] ufbx_nurbs_curve* curve, [NativeTypeName("const ufbx_tessellate_curve_opts *")] ufbx_tessellate_curve_opts* opts, ufbx_error* error);
|
||||
|
||||
[DllImport("ufbx", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
|
||||
public static extern ufbx_mesh* ufbx_tessellate_nurbs_surface([NativeTypeName("const ufbx_nurbs_surface *")] ufbx_nurbs_surface* surface, [NativeTypeName("const ufbx_tessellate_surface_opts *")] ufbx_tessellate_surface_opts* opts, ufbx_error* error);
|
||||
|
||||
[DllImport("ufbx", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
|
||||
public static extern void ufbx_free_line_curve(ufbx_line_curve* curve);
|
||||
|
||||
[DllImport("ufbx", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
|
||||
public static extern void ufbx_retain_line_curve(ufbx_line_curve* curve);
|
||||
|
||||
[DllImport("ufbx", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
|
||||
[return: NativeTypeName("uint32_t")]
|
||||
public static extern uint ufbx_find_face_index(ufbx_mesh* mesh, [NativeTypeName("size_t")] nuint index);
|
||||
|
||||
[DllImport("ufbx", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
|
||||
[return: NativeTypeName("uint32_t")]
|
||||
public static extern uint ufbx_catch_triangulate_face(ufbx_panic* panic, [NativeTypeName("uint32_t *")] uint* indices, [NativeTypeName("size_t")] nuint num_indices, [NativeTypeName("const ufbx_mesh *")] ufbx_mesh* mesh, ufbx_face face);
|
||||
|
||||
[DllImport("ufbx", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
|
||||
[return: NativeTypeName("uint32_t")]
|
||||
public static extern uint ufbx_triangulate_face([NativeTypeName("uint32_t *")] uint* indices, [NativeTypeName("size_t")] nuint num_indices, [NativeTypeName("const ufbx_mesh *")] ufbx_mesh* mesh, ufbx_face face);
|
||||
|
||||
[DllImport("ufbx", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
|
||||
public static extern void ufbx_catch_compute_topology(ufbx_panic* panic, [NativeTypeName("const ufbx_mesh *")] ufbx_mesh* mesh, ufbx_topo_edge* topo, [NativeTypeName("size_t")] nuint num_topo);
|
||||
|
||||
[DllImport("ufbx", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
|
||||
public static extern void ufbx_compute_topology([NativeTypeName("const ufbx_mesh *")] ufbx_mesh* mesh, ufbx_topo_edge* topo, [NativeTypeName("size_t")] nuint num_topo);
|
||||
|
||||
[DllImport("ufbx", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
|
||||
[return: NativeTypeName("uint32_t")]
|
||||
public static extern uint ufbx_catch_topo_next_vertex_edge(ufbx_panic* panic, [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("uint32_t")]
|
||||
public static extern uint ufbx_topo_next_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("uint32_t")]
|
||||
public static extern uint ufbx_catch_topo_prev_vertex_edge(ufbx_panic* panic, [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("uint32_t")]
|
||||
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);
|
||||
|
||||
[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);
|
||||
|
||||
[DllImport("ufbx", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
|
||||
[return: NativeTypeName("size_t")]
|
||||
public static extern nuint ufbx_catch_generate_normal_mapping(ufbx_panic* panic, [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)]
|
||||
[return: NativeTypeName("size_t")]
|
||||
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);
|
||||
|
||||
[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);
|
||||
|
||||
[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);
|
||||
|
||||
[DllImport("ufbx", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
|
||||
public static extern void ufbx_free_mesh(ufbx_mesh* mesh);
|
||||
|
||||
[DllImport("ufbx", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
|
||||
public static extern void ufbx_retain_mesh(ufbx_mesh* mesh);
|
||||
|
||||
[DllImport("ufbx", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
|
||||
public static extern ufbx_geometry_cache* ufbx_load_geometry_cache([NativeTypeName("const char *")] sbyte* filename, [NativeTypeName("const ufbx_geometry_cache_opts *")] ufbx_geometry_cache_opts* opts, ufbx_error* error);
|
||||
|
||||
[DllImport("ufbx", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
|
||||
public static extern ufbx_geometry_cache* ufbx_load_geometry_cache_len([NativeTypeName("const char *")] sbyte* filename, [NativeTypeName("size_t")] nuint filename_len, [NativeTypeName("const ufbx_geometry_cache_opts *")] ufbx_geometry_cache_opts* opts, ufbx_error* error);
|
||||
|
||||
[DllImport("ufbx", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
|
||||
public static extern void ufbx_free_geometry_cache(ufbx_geometry_cache* cache);
|
||||
|
||||
[DllImport("ufbx", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
|
||||
public static extern void ufbx_retain_geometry_cache(ufbx_geometry_cache* cache);
|
||||
|
||||
[DllImport("ufbx", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
|
||||
[return: NativeTypeName("size_t")]
|
||||
public static extern nuint ufbx_read_geometry_cache_real([NativeTypeName("const ufbx_cache_frame *")] ufbx_cache_frame* frame, [NativeTypeName("ufbx_real *")] float* 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")]
|
||||
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);
|
||||
|
||||
[DllImport("ufbx", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
|
||||
[return: NativeTypeName("size_t")]
|
||||
public static extern nuint ufbx_sample_geometry_cache_real([NativeTypeName("const ufbx_cache_channel *")] ufbx_cache_channel* channel, double time, [NativeTypeName("ufbx_real *")] float* 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")]
|
||||
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);
|
||||
|
||||
[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);
|
||||
|
||||
[DllImport("ufbx", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
|
||||
public static extern ufbx_dom_node* ufbx_dom_find([NativeTypeName("const ufbx_dom_node *")] ufbx_dom_node* parent, [NativeTypeName("const char *")] sbyte* name);
|
||||
|
||||
[DllImport("ufbx", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
|
||||
[return: NativeTypeName("size_t")]
|
||||
public static extern nuint ufbx_generate_indices([NativeTypeName("const ufbx_vertex_stream *")] ufbx_vertex_stream* streams, [NativeTypeName("size_t")] nuint num_streams, [NativeTypeName("uint32_t *")] uint* indices, [NativeTypeName("size_t")] nuint num_indices, [NativeTypeName("const ufbx_allocator_opts *")] ufbx_allocator_opts* allocator, ufbx_error* error);
|
||||
|
||||
[DllImport("ufbx", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
|
||||
public static extern void ufbx_thread_pool_run_task([NativeTypeName("ufbx_thread_pool_context")] nuint ctx, [NativeTypeName("uint32_t")] uint index);
|
||||
|
||||
[DllImport("ufbx", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
|
||||
public static extern void ufbx_thread_pool_set_user_ptr([NativeTypeName("ufbx_thread_pool_context")] nuint ctx, void* user_ptr);
|
||||
|
||||
[DllImport("ufbx", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
|
||||
public static extern void* ufbx_thread_pool_get_user_ptr([NativeTypeName("ufbx_thread_pool_context")] nuint ctx);
|
||||
|
||||
[DllImport("ufbx", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
|
||||
[return: NativeTypeName("ufbx_real")]
|
||||
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);
|
||||
|
||||
[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);
|
||||
|
||||
[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);
|
||||
|
||||
[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)
|
||||
{
|
||||
;
|
||||
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)
|
||||
{
|
||||
;
|
||||
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)
|
||||
{
|
||||
;
|
||||
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)
|
||||
{
|
||||
;
|
||||
return v->values.data[(int)(v->indices.data[index])];
|
||||
}
|
||||
|
||||
[DllImport("ufbx", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
|
||||
[return: NativeTypeName("ufbx_real")]
|
||||
public static extern float ufbx_catch_get_vertex_w_vec3(ufbx_panic* panic, [NativeTypeName("const ufbx_vertex_vec3 *")] ufbx_vertex_vec3* v, [NativeTypeName("size_t")] nuint index);
|
||||
|
||||
[return: NativeTypeName("ufbx_real")]
|
||||
public static float ufbx_get_vertex_w_vec3([NativeTypeName("const ufbx_vertex_vec3 *")] ufbx_vertex_vec3* v, [NativeTypeName("size_t")] nuint index)
|
||||
{
|
||||
;
|
||||
return v->values_w.count > 0 ? v->values_w.data[(int)(v->indices.data[index])] : 0.0f;
|
||||
}
|
||||
|
||||
[DllImport("ufbx", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
|
||||
public static extern ufbx_unknown* ufbx_as_unknown([NativeTypeName("const ufbx_element *")] ufbx_element* element);
|
||||
|
||||
[DllImport("ufbx", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
|
||||
public static extern ufbx_node* ufbx_as_node([NativeTypeName("const ufbx_element *")] ufbx_element* element);
|
||||
|
||||
[DllImport("ufbx", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
|
||||
public static extern ufbx_mesh* ufbx_as_mesh([NativeTypeName("const ufbx_element *")] ufbx_element* element);
|
||||
|
||||
[DllImport("ufbx", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
|
||||
public static extern ufbx_light* ufbx_as_light([NativeTypeName("const ufbx_element *")] ufbx_element* element);
|
||||
|
||||
[DllImport("ufbx", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
|
||||
public static extern ufbx_camera* ufbx_as_camera([NativeTypeName("const ufbx_element *")] ufbx_element* element);
|
||||
|
||||
[DllImport("ufbx", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
|
||||
public static extern ufbx_bone* ufbx_as_bone([NativeTypeName("const ufbx_element *")] ufbx_element* element);
|
||||
|
||||
[DllImport("ufbx", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
|
||||
public static extern ufbx_empty* ufbx_as_empty([NativeTypeName("const ufbx_element *")] ufbx_element* element);
|
||||
|
||||
[DllImport("ufbx", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
|
||||
public static extern ufbx_line_curve* ufbx_as_line_curve([NativeTypeName("const ufbx_element *")] ufbx_element* element);
|
||||
|
||||
[DllImport("ufbx", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
|
||||
public static extern ufbx_nurbs_curve* ufbx_as_nurbs_curve([NativeTypeName("const ufbx_element *")] ufbx_element* element);
|
||||
|
||||
[DllImport("ufbx", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
|
||||
public static extern ufbx_nurbs_surface* ufbx_as_nurbs_surface([NativeTypeName("const ufbx_element *")] ufbx_element* element);
|
||||
|
||||
[DllImport("ufbx", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
|
||||
public static extern ufbx_nurbs_trim_surface* ufbx_as_nurbs_trim_surface([NativeTypeName("const ufbx_element *")] ufbx_element* element);
|
||||
|
||||
[DllImport("ufbx", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
|
||||
public static extern ufbx_nurbs_trim_boundary* ufbx_as_nurbs_trim_boundary([NativeTypeName("const ufbx_element *")] ufbx_element* element);
|
||||
|
||||
[DllImport("ufbx", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
|
||||
public static extern ufbx_procedural_geometry* ufbx_as_procedural_geometry([NativeTypeName("const ufbx_element *")] ufbx_element* element);
|
||||
|
||||
[DllImport("ufbx", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
|
||||
public static extern ufbx_stereo_camera* ufbx_as_stereo_camera([NativeTypeName("const ufbx_element *")] ufbx_element* element);
|
||||
|
||||
[DllImport("ufbx", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
|
||||
public static extern ufbx_camera_switcher* ufbx_as_camera_switcher([NativeTypeName("const ufbx_element *")] ufbx_element* element);
|
||||
|
||||
[DllImport("ufbx", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
|
||||
public static extern ufbx_marker* ufbx_as_marker([NativeTypeName("const ufbx_element *")] ufbx_element* element);
|
||||
|
||||
[DllImport("ufbx", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
|
||||
public static extern ufbx_lod_group* ufbx_as_lod_group([NativeTypeName("const ufbx_element *")] ufbx_element* element);
|
||||
|
||||
[DllImport("ufbx", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
|
||||
public static extern ufbx_skin_deformer* ufbx_as_skin_deformer([NativeTypeName("const ufbx_element *")] ufbx_element* element);
|
||||
|
||||
[DllImport("ufbx", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
|
||||
public static extern ufbx_skin_cluster* ufbx_as_skin_cluster([NativeTypeName("const ufbx_element *")] ufbx_element* element);
|
||||
|
||||
[DllImport("ufbx", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
|
||||
public static extern ufbx_blend_deformer* ufbx_as_blend_deformer([NativeTypeName("const ufbx_element *")] ufbx_element* element);
|
||||
|
||||
[DllImport("ufbx", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
|
||||
public static extern ufbx_blend_channel* ufbx_as_blend_channel([NativeTypeName("const ufbx_element *")] ufbx_element* element);
|
||||
|
||||
[DllImport("ufbx", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
|
||||
public static extern ufbx_blend_shape* ufbx_as_blend_shape([NativeTypeName("const ufbx_element *")] ufbx_element* element);
|
||||
|
||||
[DllImport("ufbx", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
|
||||
public static extern ufbx_cache_deformer* ufbx_as_cache_deformer([NativeTypeName("const ufbx_element *")] ufbx_element* element);
|
||||
|
||||
[DllImport("ufbx", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
|
||||
public static extern ufbx_cache_file* ufbx_as_cache_file([NativeTypeName("const ufbx_element *")] ufbx_element* element);
|
||||
|
||||
[DllImport("ufbx", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
|
||||
public static extern ufbx_material* ufbx_as_material([NativeTypeName("const ufbx_element *")] ufbx_element* element);
|
||||
|
||||
[DllImport("ufbx", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
|
||||
public static extern ufbx_texture* ufbx_as_texture([NativeTypeName("const ufbx_element *")] ufbx_element* element);
|
||||
|
||||
[DllImport("ufbx", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
|
||||
public static extern ufbx_video* ufbx_as_video([NativeTypeName("const ufbx_element *")] ufbx_element* element);
|
||||
|
||||
[DllImport("ufbx", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
|
||||
public static extern ufbx_shader* ufbx_as_shader([NativeTypeName("const ufbx_element *")] ufbx_element* element);
|
||||
|
||||
[DllImport("ufbx", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
|
||||
public static extern ufbx_shader_binding* ufbx_as_shader_binding([NativeTypeName("const ufbx_element *")] ufbx_element* element);
|
||||
|
||||
[DllImport("ufbx", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
|
||||
public static extern ufbx_anim_stack* ufbx_as_anim_stack([NativeTypeName("const ufbx_element *")] ufbx_element* element);
|
||||
|
||||
[DllImport("ufbx", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
|
||||
public static extern ufbx_anim_layer* ufbx_as_anim_layer([NativeTypeName("const ufbx_element *")] ufbx_element* element);
|
||||
|
||||
[DllImport("ufbx", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
|
||||
public static extern ufbx_anim_value* ufbx_as_anim_value([NativeTypeName("const ufbx_element *")] ufbx_element* element);
|
||||
|
||||
[DllImport("ufbx", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
|
||||
public static extern ufbx_anim_curve* ufbx_as_anim_curve([NativeTypeName("const ufbx_element *")] ufbx_element* element);
|
||||
|
||||
[DllImport("ufbx", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
|
||||
public static extern ufbx_display_layer* ufbx_as_display_layer([NativeTypeName("const ufbx_element *")] ufbx_element* element);
|
||||
|
||||
[DllImport("ufbx", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
|
||||
public static extern ufbx_selection_set* ufbx_as_selection_set([NativeTypeName("const ufbx_element *")] ufbx_element* element);
|
||||
|
||||
[DllImport("ufbx", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
|
||||
public static extern ufbx_selection_node* ufbx_as_selection_node([NativeTypeName("const ufbx_element *")] ufbx_element* element);
|
||||
|
||||
[DllImport("ufbx", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
|
||||
public static extern ufbx_character* ufbx_as_character([NativeTypeName("const ufbx_element *")] ufbx_element* element);
|
||||
|
||||
[DllImport("ufbx", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
|
||||
public static extern ufbx_constraint* ufbx_as_constraint([NativeTypeName("const ufbx_element *")] ufbx_element* element);
|
||||
|
||||
[DllImport("ufbx", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
|
||||
public static extern ufbx_audio_layer* ufbx_as_audio_layer([NativeTypeName("const ufbx_element *")] ufbx_element* element);
|
||||
|
||||
[DllImport("ufbx", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
|
||||
public static extern ufbx_audio_clip* ufbx_as_audio_clip([NativeTypeName("const ufbx_element *")] ufbx_element* element);
|
||||
|
||||
[DllImport("ufbx", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
|
||||
public static extern ufbx_pose* ufbx_as_pose([NativeTypeName("const ufbx_element *")] ufbx_element* element);
|
||||
|
||||
[DllImport("ufbx", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
|
||||
public static extern ufbx_metadata_object* ufbx_as_metadata_object([NativeTypeName("const ufbx_element *")] ufbx_element* element);
|
||||
|
||||
[DllImport("ufbx", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
|
||||
[return: NativeTypeName("_Bool")]
|
||||
public static extern bool ufbx_dom_is_array([NativeTypeName("const ufbx_dom_node *")] ufbx_dom_node* node);
|
||||
|
||||
[DllImport("ufbx", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
|
||||
[return: NativeTypeName("size_t")]
|
||||
public static extern nuint ufbx_dom_array_size([NativeTypeName("const ufbx_dom_node *")] ufbx_dom_node* node);
|
||||
|
||||
[DllImport("ufbx", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
|
||||
public static extern ufbx_int32_list ufbx_dom_as_int32_list([NativeTypeName("const ufbx_dom_node *")] ufbx_dom_node* node);
|
||||
|
||||
[DllImport("ufbx", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
|
||||
public static extern ufbx_int64_list ufbx_dom_as_int64_list([NativeTypeName("const ufbx_dom_node *")] ufbx_dom_node* node);
|
||||
|
||||
[DllImport("ufbx", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
|
||||
public static extern ufbx_float_list ufbx_dom_as_float_list([NativeTypeName("const ufbx_dom_node *")] ufbx_dom_node* node);
|
||||
|
||||
[DllImport("ufbx", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
|
||||
public static extern ufbx_double_list ufbx_dom_as_double_list([NativeTypeName("const ufbx_dom_node *")] ufbx_dom_node* node);
|
||||
|
||||
[DllImport("ufbx", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
|
||||
public static extern ufbx_real_list ufbx_dom_as_real_list([NativeTypeName("const ufbx_dom_node *")] ufbx_dom_node* node);
|
||||
|
||||
[DllImport("ufbx", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
|
||||
public static extern ufbx_blob_list ufbx_dom_as_blob_list([NativeTypeName("const ufbx_dom_node *")] ufbx_dom_node* node);
|
||||
|
||||
[NativeTypeName("#define UFBX_STDC __STDC_VERSION__")]
|
||||
public const int UFBX_STDC = 201710;
|
||||
|
||||
[NativeTypeName("#define UFBX_CPP 0")]
|
||||
public const int UFBX_CPP = 0;
|
||||
|
||||
[NativeTypeName("#define UFBX_PLATFORM_MSC _MSC_VER")]
|
||||
public const int UFBX_PLATFORM_MSC = 1950;
|
||||
|
||||
[NativeTypeName("#define UFBX_PLATFORM_GNUC 0")]
|
||||
public const int UFBX_PLATFORM_GNUC = 0;
|
||||
|
||||
[NativeTypeName("#define UFBX_CPP11 0")]
|
||||
public const int UFBX_CPP11 = 0;
|
||||
|
||||
[NativeTypeName("#define UFBX_ERROR_STACK_MAX_DEPTH 8")]
|
||||
public const int UFBX_ERROR_STACK_MAX_DEPTH = 8;
|
||||
|
||||
[NativeTypeName("#define UFBX_PANIC_MESSAGE_LENGTH 128")]
|
||||
public const int UFBX_PANIC_MESSAGE_LENGTH = 128;
|
||||
|
||||
[NativeTypeName("#define UFBX_ERROR_INFO_LENGTH 256")]
|
||||
public const int UFBX_ERROR_INFO_LENGTH = 256;
|
||||
|
||||
[NativeTypeName("#define UFBX_THREAD_GROUP_COUNT 4")]
|
||||
public const int UFBX_THREAD_GROUP_COUNT = 4;
|
||||
|
||||
[NativeTypeName("#define UFBX_HAS_FORCE_32BIT 1")]
|
||||
public const int UFBX_HAS_FORCE_32BIT = 1;
|
||||
|
||||
[NativeTypeName("#define UFBX_HEADER_VERSION ufbx_pack_version(0, 21, 3)")]
|
||||
public const uint UFBX_HEADER_VERSION = ((0) * 1000000U + (21) * 1000U + (3));
|
||||
|
||||
[NativeTypeName("#define UFBX_VERSION UFBX_HEADER_VERSION")]
|
||||
public const uint UFBX_VERSION = ((0) * 1000000U + (21) * 1000U + (3));
|
||||
|
||||
[NativeTypeName("#define UFBX_NO_INDEX ((uint32_t)~0u)")]
|
||||
public const uint UFBX_NO_INDEX = ((uint)(~0U));
|
||||
|
||||
[NativeTypeName("#define UFBX_Lcl_Translation \"Lcl Translation\"")]
|
||||
public static ReadOnlySpan<byte> UFBX_Lcl_Translation => "Lcl Translation"u8;
|
||||
|
||||
[NativeTypeName("#define UFBX_Lcl_Rotation \"Lcl Rotation\"")]
|
||||
public static ReadOnlySpan<byte> UFBX_Lcl_Rotation => "Lcl Rotation"u8;
|
||||
|
||||
[NativeTypeName("#define UFBX_Lcl_Scaling \"Lcl Scaling\"")]
|
||||
public static ReadOnlySpan<byte> UFBX_Lcl_Scaling => "Lcl Scaling"u8;
|
||||
|
||||
[NativeTypeName("#define UFBX_RotationOrder \"RotationOrder\"")]
|
||||
public static ReadOnlySpan<byte> UFBX_RotationOrder => "RotationOrder"u8;
|
||||
|
||||
[NativeTypeName("#define UFBX_ScalingPivot \"ScalingPivot\"")]
|
||||
public static ReadOnlySpan<byte> UFBX_ScalingPivot => "ScalingPivot"u8;
|
||||
|
||||
[NativeTypeName("#define UFBX_RotationPivot \"RotationPivot\"")]
|
||||
public static ReadOnlySpan<byte> UFBX_RotationPivot => "RotationPivot"u8;
|
||||
|
||||
[NativeTypeName("#define UFBX_ScalingOffset \"ScalingOffset\"")]
|
||||
public static ReadOnlySpan<byte> UFBX_ScalingOffset => "ScalingOffset"u8;
|
||||
|
||||
[NativeTypeName("#define UFBX_RotationOffset \"RotationOffset\"")]
|
||||
public static ReadOnlySpan<byte> UFBX_RotationOffset => "RotationOffset"u8;
|
||||
|
||||
[NativeTypeName("#define UFBX_PreRotation \"PreRotation\"")]
|
||||
public static ReadOnlySpan<byte> UFBX_PreRotation => "PreRotation"u8;
|
||||
|
||||
[NativeTypeName("#define UFBX_PostRotation \"PostRotation\"")]
|
||||
public static ReadOnlySpan<byte> UFBX_PostRotation => "PostRotation"u8;
|
||||
|
||||
[NativeTypeName("#define UFBX_Visibility \"Visibility\"")]
|
||||
public static ReadOnlySpan<byte> UFBX_Visibility => "Visibility"u8;
|
||||
|
||||
[NativeTypeName("#define UFBX_Weight \"Weight\"")]
|
||||
public static ReadOnlySpan<byte> UFBX_Weight => "Weight"u8;
|
||||
|
||||
[NativeTypeName("#define UFBX_DeformPercent \"DeformPercent\"")]
|
||||
public static ReadOnlySpan<byte> UFBX_DeformPercent => "DeformPercent"u8;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,22 @@
|
||||
using System.Diagnostics;
|
||||
|
||||
namespace Ghost.Ufbx
|
||||
{
|
||||
/// <summary>Defines the annotation found in a native declaration.</summary>
|
||||
[AttributeUsage(AttributeTargets.Struct | AttributeTargets.Enum | AttributeTargets.Property | AttributeTargets.Field | AttributeTargets.Parameter | AttributeTargets.ReturnValue, AllowMultiple = true, Inherited = false)]
|
||||
[Conditional("DEBUG")]
|
||||
internal sealed partial class NativeAnnotationAttribute : Attribute
|
||||
{
|
||||
private readonly string _annotation;
|
||||
|
||||
/// <summary>Initializes a new instance of the <see cref="NativeAnnotationAttribute" /> class.</summary>
|
||||
/// <param name="annotation">The annotation that was used in the native declaration.</param>
|
||||
public NativeAnnotationAttribute(string annotation)
|
||||
{
|
||||
_annotation = annotation;
|
||||
}
|
||||
|
||||
/// <summary>Gets the annotation that was used in the native declaration.</summary>
|
||||
public string Annotation => _annotation;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,22 @@
|
||||
using System.Diagnostics;
|
||||
|
||||
namespace Ghost.Ufbx
|
||||
{
|
||||
/// <summary>Defines the type of a member as it was used in the native signature.</summary>
|
||||
[AttributeUsage(AttributeTargets.Struct | AttributeTargets.Enum | AttributeTargets.Property | AttributeTargets.Field | AttributeTargets.Parameter | AttributeTargets.ReturnValue, AllowMultiple = false, Inherited = true)]
|
||||
[Conditional("DEBUG")]
|
||||
internal sealed partial class NativeTypeNameAttribute : Attribute
|
||||
{
|
||||
private readonly string _name;
|
||||
|
||||
/// <summary>Initializes a new instance of the <see cref="NativeTypeNameAttribute" /> class.</summary>
|
||||
/// <param name="name">The name of the type that was used in the native signature.</param>
|
||||
public NativeTypeNameAttribute(string name)
|
||||
{
|
||||
_name = name;
|
||||
}
|
||||
|
||||
/// <summary>Gets the name of the type that was used in the native signature.</summary>
|
||||
public string Name => _name;
|
||||
}
|
||||
}
|
||||
19
src/ThridParty/Ghost.Ufbx/Generated/ufbx_allocator.cs
Normal file
19
src/ThridParty/Ghost.Ufbx/Generated/ufbx_allocator.cs
Normal file
@@ -0,0 +1,19 @@
|
||||
namespace Ghost.Ufbx
|
||||
{
|
||||
public unsafe partial struct ufbx_allocator
|
||||
{
|
||||
[NativeTypeName("ufbx_alloc_fn *")]
|
||||
public delegate* unmanaged[Cdecl]<void*, nuint, void*> alloc_fn;
|
||||
|
||||
[NativeTypeName("ufbx_realloc_fn *")]
|
||||
public delegate* unmanaged[Cdecl]<void*, void*, nuint, nuint, void*> realloc_fn;
|
||||
|
||||
[NativeTypeName("ufbx_free_fn *")]
|
||||
public delegate* unmanaged[Cdecl]<void*, void*, nuint, void> free_fn;
|
||||
|
||||
[NativeTypeName("ufbx_free_allocator_fn *")]
|
||||
public delegate* unmanaged[Cdecl]<void*, void> free_allocator_fn;
|
||||
|
||||
public void* user;
|
||||
}
|
||||
}
|
||||
19
src/ThridParty/Ghost.Ufbx/Generated/ufbx_allocator_opts.cs
Normal file
19
src/ThridParty/Ghost.Ufbx/Generated/ufbx_allocator_opts.cs
Normal file
@@ -0,0 +1,19 @@
|
||||
namespace Ghost.Ufbx
|
||||
{
|
||||
public partial struct ufbx_allocator_opts
|
||||
{
|
||||
public ufbx_allocator allocator;
|
||||
|
||||
[NativeTypeName("size_t")]
|
||||
public nuint memory_limit;
|
||||
|
||||
[NativeTypeName("size_t")]
|
||||
public nuint allocation_limit;
|
||||
|
||||
[NativeTypeName("size_t")]
|
||||
public nuint huge_threshold;
|
||||
|
||||
[NativeTypeName("size_t")]
|
||||
public nuint max_chunk_size;
|
||||
}
|
||||
}
|
||||
23
src/ThridParty/Ghost.Ufbx/Generated/ufbx_anim.cs
Normal file
23
src/ThridParty/Ghost.Ufbx/Generated/ufbx_anim.cs
Normal file
@@ -0,0 +1,23 @@
|
||||
namespace Ghost.Ufbx
|
||||
{
|
||||
public partial struct ufbx_anim
|
||||
{
|
||||
public double time_begin;
|
||||
|
||||
public double time_end;
|
||||
|
||||
public ufbx_anim_layer_list layers;
|
||||
|
||||
public ufbx_real_list override_layer_weights;
|
||||
|
||||
public ufbx_prop_override_list prop_overrides;
|
||||
|
||||
public ufbx_transform_override_list transform_overrides;
|
||||
|
||||
[NativeTypeName("_Bool")]
|
||||
public bool ignore_connections;
|
||||
|
||||
[NativeTypeName("_Bool")]
|
||||
public bool custom;
|
||||
}
|
||||
}
|
||||
96
src/ThridParty/Ghost.Ufbx/Generated/ufbx_anim_curve.cs
Normal file
96
src/ThridParty/Ghost.Ufbx/Generated/ufbx_anim_curve.cs
Normal file
@@ -0,0 +1,96 @@
|
||||
using System.Diagnostics.CodeAnalysis;
|
||||
using System.Runtime.InteropServices;
|
||||
|
||||
namespace Ghost.Ufbx
|
||||
{
|
||||
public partial struct ufbx_anim_curve
|
||||
{
|
||||
[NativeTypeName("__AnonymousRecord_ufbx_L3208_C2")]
|
||||
public _Anonymous_e__Union Anonymous;
|
||||
|
||||
public ufbx_keyframe_list keyframes;
|
||||
|
||||
public ufbx_extrapolation pre_extrapolation;
|
||||
|
||||
public ufbx_extrapolation post_extrapolation;
|
||||
|
||||
[NativeTypeName("ufbx_real")]
|
||||
public float min_value;
|
||||
|
||||
[NativeTypeName("ufbx_real")]
|
||||
public float max_value;
|
||||
|
||||
public double min_time;
|
||||
|
||||
public double max_time;
|
||||
|
||||
[UnscopedRef]
|
||||
public ref ufbx_element element
|
||||
{
|
||||
get
|
||||
{
|
||||
return ref Anonymous.element;
|
||||
}
|
||||
}
|
||||
|
||||
[UnscopedRef]
|
||||
public ref ufbx_string name
|
||||
{
|
||||
get
|
||||
{
|
||||
return ref Anonymous.Anonymous.name;
|
||||
}
|
||||
}
|
||||
|
||||
[UnscopedRef]
|
||||
public ref ufbx_props props
|
||||
{
|
||||
get
|
||||
{
|
||||
return ref Anonymous.Anonymous.props;
|
||||
}
|
||||
}
|
||||
|
||||
[UnscopedRef]
|
||||
public ref uint element_id
|
||||
{
|
||||
get
|
||||
{
|
||||
return ref Anonymous.Anonymous.element_id;
|
||||
}
|
||||
}
|
||||
|
||||
[UnscopedRef]
|
||||
public ref uint typed_id
|
||||
{
|
||||
get
|
||||
{
|
||||
return ref Anonymous.Anonymous.typed_id;
|
||||
}
|
||||
}
|
||||
|
||||
[StructLayout(LayoutKind.Explicit)]
|
||||
public partial struct _Anonymous_e__Union
|
||||
{
|
||||
[FieldOffset(0)]
|
||||
public ufbx_element element;
|
||||
|
||||
[FieldOffset(0)]
|
||||
[NativeTypeName("__AnonymousRecord_ufbx_L3208_C32")]
|
||||
public _Anonymous_e__Struct Anonymous;
|
||||
|
||||
public partial struct _Anonymous_e__Struct
|
||||
{
|
||||
public ufbx_string name;
|
||||
|
||||
public ufbx_props props;
|
||||
|
||||
[NativeTypeName("uint32_t")]
|
||||
public uint element_id;
|
||||
|
||||
[NativeTypeName("uint32_t")]
|
||||
public uint typed_id;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
10
src/ThridParty/Ghost.Ufbx/Generated/ufbx_anim_curve_list.cs
Normal file
10
src/ThridParty/Ghost.Ufbx/Generated/ufbx_anim_curve_list.cs
Normal file
@@ -0,0 +1,10 @@
|
||||
namespace Ghost.Ufbx
|
||||
{
|
||||
public unsafe partial struct ufbx_anim_curve_list
|
||||
{
|
||||
public ufbx_anim_curve** data;
|
||||
|
||||
[NativeTypeName("size_t")]
|
||||
public nuint count;
|
||||
}
|
||||
}
|
||||
120
src/ThridParty/Ghost.Ufbx/Generated/ufbx_anim_layer.cs
Normal file
120
src/ThridParty/Ghost.Ufbx/Generated/ufbx_anim_layer.cs
Normal file
@@ -0,0 +1,120 @@
|
||||
using System.Diagnostics.CodeAnalysis;
|
||||
using System.Runtime.CompilerServices;
|
||||
using System.Runtime.InteropServices;
|
||||
|
||||
namespace Ghost.Ufbx
|
||||
{
|
||||
public unsafe partial struct ufbx_anim_layer
|
||||
{
|
||||
[NativeTypeName("__AnonymousRecord_ufbx_L3111_C2")]
|
||||
public _Anonymous_e__Union Anonymous;
|
||||
|
||||
[NativeTypeName("ufbx_real")]
|
||||
public float weight;
|
||||
|
||||
[NativeTypeName("_Bool")]
|
||||
public bool weight_is_animated;
|
||||
|
||||
[NativeTypeName("_Bool")]
|
||||
public bool blended;
|
||||
|
||||
[NativeTypeName("_Bool")]
|
||||
public bool additive;
|
||||
|
||||
[NativeTypeName("_Bool")]
|
||||
public bool compose_rotation;
|
||||
|
||||
[NativeTypeName("_Bool")]
|
||||
public bool compose_scale;
|
||||
|
||||
public ufbx_anim_value_list anim_values;
|
||||
|
||||
public ufbx_anim_prop_list anim_props;
|
||||
|
||||
public ufbx_anim* anim;
|
||||
|
||||
[NativeTypeName("uint32_t")]
|
||||
public uint _min_element_id;
|
||||
|
||||
[NativeTypeName("uint32_t")]
|
||||
public uint _max_element_id;
|
||||
|
||||
[NativeTypeName("uint32_t[4]")]
|
||||
public __element_id_bitmask_e__FixedBuffer _element_id_bitmask;
|
||||
|
||||
[UnscopedRef]
|
||||
public ref ufbx_element element
|
||||
{
|
||||
get
|
||||
{
|
||||
return ref Anonymous.element;
|
||||
}
|
||||
}
|
||||
|
||||
[UnscopedRef]
|
||||
public ref ufbx_string name
|
||||
{
|
||||
get
|
||||
{
|
||||
return ref Anonymous.Anonymous.name;
|
||||
}
|
||||
}
|
||||
|
||||
[UnscopedRef]
|
||||
public ref ufbx_props props
|
||||
{
|
||||
get
|
||||
{
|
||||
return ref Anonymous.Anonymous.props;
|
||||
}
|
||||
}
|
||||
|
||||
[UnscopedRef]
|
||||
public ref uint element_id
|
||||
{
|
||||
get
|
||||
{
|
||||
return ref Anonymous.Anonymous.element_id;
|
||||
}
|
||||
}
|
||||
|
||||
[UnscopedRef]
|
||||
public ref uint typed_id
|
||||
{
|
||||
get
|
||||
{
|
||||
return ref Anonymous.Anonymous.typed_id;
|
||||
}
|
||||
}
|
||||
|
||||
[StructLayout(LayoutKind.Explicit)]
|
||||
public partial struct _Anonymous_e__Union
|
||||
{
|
||||
[FieldOffset(0)]
|
||||
public ufbx_element element;
|
||||
|
||||
[FieldOffset(0)]
|
||||
[NativeTypeName("__AnonymousRecord_ufbx_L3111_C32")]
|
||||
public _Anonymous_e__Struct Anonymous;
|
||||
|
||||
public partial struct _Anonymous_e__Struct
|
||||
{
|
||||
public ufbx_string name;
|
||||
|
||||
public ufbx_props props;
|
||||
|
||||
[NativeTypeName("uint32_t")]
|
||||
public uint element_id;
|
||||
|
||||
[NativeTypeName("uint32_t")]
|
||||
public uint typed_id;
|
||||
}
|
||||
}
|
||||
|
||||
[InlineArray(4)]
|
||||
public partial struct __element_id_bitmask_e__FixedBuffer
|
||||
{
|
||||
public uint e0;
|
||||
}
|
||||
}
|
||||
}
|
||||
10
src/ThridParty/Ghost.Ufbx/Generated/ufbx_anim_layer_list.cs
Normal file
10
src/ThridParty/Ghost.Ufbx/Generated/ufbx_anim_layer_list.cs
Normal file
@@ -0,0 +1,10 @@
|
||||
namespace Ghost.Ufbx
|
||||
{
|
||||
public unsafe partial struct ufbx_anim_layer_list
|
||||
{
|
||||
public ufbx_anim_layer** data;
|
||||
|
||||
[NativeTypeName("size_t")]
|
||||
public nuint count;
|
||||
}
|
||||
}
|
||||
24
src/ThridParty/Ghost.Ufbx/Generated/ufbx_anim_opts.cs
Normal file
24
src/ThridParty/Ghost.Ufbx/Generated/ufbx_anim_opts.cs
Normal file
@@ -0,0 +1,24 @@
|
||||
namespace Ghost.Ufbx
|
||||
{
|
||||
public partial struct ufbx_anim_opts
|
||||
{
|
||||
[NativeTypeName("uint32_t")]
|
||||
public uint _begin_zero;
|
||||
|
||||
public ufbx_const_uint32_list layer_ids;
|
||||
|
||||
public ufbx_const_real_list override_layer_weights;
|
||||
|
||||
public ufbx_const_prop_override_desc_list prop_overrides;
|
||||
|
||||
public ufbx_const_transform_override_list transform_overrides;
|
||||
|
||||
[NativeTypeName("_Bool")]
|
||||
public bool ignore_connections;
|
||||
|
||||
public ufbx_allocator_opts result_allocator;
|
||||
|
||||
[NativeTypeName("uint32_t")]
|
||||
public uint _end_zero;
|
||||
}
|
||||
}
|
||||
14
src/ThridParty/Ghost.Ufbx/Generated/ufbx_anim_prop.cs
Normal file
14
src/ThridParty/Ghost.Ufbx/Generated/ufbx_anim_prop.cs
Normal file
@@ -0,0 +1,14 @@
|
||||
namespace Ghost.Ufbx
|
||||
{
|
||||
public unsafe partial struct ufbx_anim_prop
|
||||
{
|
||||
public ufbx_element* element;
|
||||
|
||||
[NativeTypeName("uint32_t")]
|
||||
public uint _internal_key;
|
||||
|
||||
public ufbx_string prop_name;
|
||||
|
||||
public ufbx_anim_value* anim_value;
|
||||
}
|
||||
}
|
||||
10
src/ThridParty/Ghost.Ufbx/Generated/ufbx_anim_prop_list.cs
Normal file
10
src/ThridParty/Ghost.Ufbx/Generated/ufbx_anim_prop_list.cs
Normal file
@@ -0,0 +1,10 @@
|
||||
namespace Ghost.Ufbx
|
||||
{
|
||||
public unsafe partial struct ufbx_anim_prop_list
|
||||
{
|
||||
public ufbx_anim_prop* data;
|
||||
|
||||
[NativeTypeName("size_t")]
|
||||
public nuint count;
|
||||
}
|
||||
}
|
||||
88
src/ThridParty/Ghost.Ufbx/Generated/ufbx_anim_stack.cs
Normal file
88
src/ThridParty/Ghost.Ufbx/Generated/ufbx_anim_stack.cs
Normal file
@@ -0,0 +1,88 @@
|
||||
using System.Diagnostics.CodeAnalysis;
|
||||
using System.Runtime.InteropServices;
|
||||
|
||||
namespace Ghost.Ufbx
|
||||
{
|
||||
public unsafe partial struct ufbx_anim_stack
|
||||
{
|
||||
[NativeTypeName("__AnonymousRecord_ufbx_L3085_C2")]
|
||||
public _Anonymous_e__Union Anonymous;
|
||||
|
||||
public double time_begin;
|
||||
|
||||
public double time_end;
|
||||
|
||||
public ufbx_anim_layer_list layers;
|
||||
|
||||
public ufbx_anim* anim;
|
||||
|
||||
[UnscopedRef]
|
||||
public ref ufbx_element element
|
||||
{
|
||||
get
|
||||
{
|
||||
return ref Anonymous.element;
|
||||
}
|
||||
}
|
||||
|
||||
[UnscopedRef]
|
||||
public ref ufbx_string name
|
||||
{
|
||||
get
|
||||
{
|
||||
return ref Anonymous.Anonymous.name;
|
||||
}
|
||||
}
|
||||
|
||||
[UnscopedRef]
|
||||
public ref ufbx_props props
|
||||
{
|
||||
get
|
||||
{
|
||||
return ref Anonymous.Anonymous.props;
|
||||
}
|
||||
}
|
||||
|
||||
[UnscopedRef]
|
||||
public ref uint element_id
|
||||
{
|
||||
get
|
||||
{
|
||||
return ref Anonymous.Anonymous.element_id;
|
||||
}
|
||||
}
|
||||
|
||||
[UnscopedRef]
|
||||
public ref uint typed_id
|
||||
{
|
||||
get
|
||||
{
|
||||
return ref Anonymous.Anonymous.typed_id;
|
||||
}
|
||||
}
|
||||
|
||||
[StructLayout(LayoutKind.Explicit)]
|
||||
public partial struct _Anonymous_e__Union
|
||||
{
|
||||
[FieldOffset(0)]
|
||||
public ufbx_element element;
|
||||
|
||||
[FieldOffset(0)]
|
||||
[NativeTypeName("__AnonymousRecord_ufbx_L3085_C32")]
|
||||
public _Anonymous_e__Struct Anonymous;
|
||||
|
||||
public partial struct _Anonymous_e__Struct
|
||||
{
|
||||
public ufbx_string name;
|
||||
|
||||
public ufbx_props props;
|
||||
|
||||
[NativeTypeName("uint32_t")]
|
||||
public uint element_id;
|
||||
|
||||
[NativeTypeName("uint32_t")]
|
||||
public uint typed_id;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
10
src/ThridParty/Ghost.Ufbx/Generated/ufbx_anim_stack_list.cs
Normal file
10
src/ThridParty/Ghost.Ufbx/Generated/ufbx_anim_stack_list.cs
Normal file
@@ -0,0 +1,10 @@
|
||||
namespace Ghost.Ufbx
|
||||
{
|
||||
public unsafe partial struct ufbx_anim_stack_list
|
||||
{
|
||||
public ufbx_anim_stack** data;
|
||||
|
||||
[NativeTypeName("size_t")]
|
||||
public nuint count;
|
||||
}
|
||||
}
|
||||
104
src/ThridParty/Ghost.Ufbx/Generated/ufbx_anim_value.cs
Normal file
104
src/ThridParty/Ghost.Ufbx/Generated/ufbx_anim_value.cs
Normal file
@@ -0,0 +1,104 @@
|
||||
using System.Diagnostics.CodeAnalysis;
|
||||
using System.Runtime.InteropServices;
|
||||
|
||||
namespace Ghost.Ufbx
|
||||
{
|
||||
public partial struct ufbx_anim_value
|
||||
{
|
||||
[NativeTypeName("__AnonymousRecord_ufbx_L3136_C2")]
|
||||
public _Anonymous_e__Union Anonymous;
|
||||
|
||||
[NativeTypeName("ufbx_vec3")]
|
||||
public Misaki.HighPerformance.Mathematics.float3 default_value;
|
||||
|
||||
[NativeTypeName("ufbx_anim_curve *[3]")]
|
||||
public _curves_e__FixedBuffer curves;
|
||||
|
||||
[UnscopedRef]
|
||||
public ref ufbx_element element
|
||||
{
|
||||
get
|
||||
{
|
||||
return ref Anonymous.element;
|
||||
}
|
||||
}
|
||||
|
||||
[UnscopedRef]
|
||||
public ref ufbx_string name
|
||||
{
|
||||
get
|
||||
{
|
||||
return ref Anonymous.Anonymous.name;
|
||||
}
|
||||
}
|
||||
|
||||
[UnscopedRef]
|
||||
public ref ufbx_props props
|
||||
{
|
||||
get
|
||||
{
|
||||
return ref Anonymous.Anonymous.props;
|
||||
}
|
||||
}
|
||||
|
||||
[UnscopedRef]
|
||||
public ref uint element_id
|
||||
{
|
||||
get
|
||||
{
|
||||
return ref Anonymous.Anonymous.element_id;
|
||||
}
|
||||
}
|
||||
|
||||
[UnscopedRef]
|
||||
public ref uint typed_id
|
||||
{
|
||||
get
|
||||
{
|
||||
return ref Anonymous.Anonymous.typed_id;
|
||||
}
|
||||
}
|
||||
|
||||
[StructLayout(LayoutKind.Explicit)]
|
||||
public partial struct _Anonymous_e__Union
|
||||
{
|
||||
[FieldOffset(0)]
|
||||
public ufbx_element element;
|
||||
|
||||
[FieldOffset(0)]
|
||||
[NativeTypeName("__AnonymousRecord_ufbx_L3136_C32")]
|
||||
public _Anonymous_e__Struct Anonymous;
|
||||
|
||||
public partial struct _Anonymous_e__Struct
|
||||
{
|
||||
public ufbx_string name;
|
||||
|
||||
public ufbx_props props;
|
||||
|
||||
[NativeTypeName("uint32_t")]
|
||||
public uint element_id;
|
||||
|
||||
[NativeTypeName("uint32_t")]
|
||||
public uint typed_id;
|
||||
}
|
||||
}
|
||||
|
||||
public unsafe partial struct _curves_e__FixedBuffer
|
||||
{
|
||||
public ufbx_anim_curve* e0;
|
||||
public ufbx_anim_curve* e1;
|
||||
public ufbx_anim_curve* e2;
|
||||
|
||||
public ref ufbx_anim_curve* this[int index]
|
||||
{
|
||||
get
|
||||
{
|
||||
fixed (ufbx_anim_curve** pThis = &e0)
|
||||
{
|
||||
return ref pThis[index];
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
10
src/ThridParty/Ghost.Ufbx/Generated/ufbx_anim_value_list.cs
Normal file
10
src/ThridParty/Ghost.Ufbx/Generated/ufbx_anim_value_list.cs
Normal file
@@ -0,0 +1,10 @@
|
||||
namespace Ghost.Ufbx
|
||||
{
|
||||
public unsafe partial struct ufbx_anim_value_list
|
||||
{
|
||||
public ufbx_anim_value** data;
|
||||
|
||||
[NativeTypeName("size_t")]
|
||||
public nuint count;
|
||||
}
|
||||
}
|
||||
19
src/ThridParty/Ghost.Ufbx/Generated/ufbx_aperture_format.cs
Normal file
19
src/ThridParty/Ghost.Ufbx/Generated/ufbx_aperture_format.cs
Normal file
@@ -0,0 +1,19 @@
|
||||
namespace Ghost.Ufbx
|
||||
{
|
||||
public enum ufbx_aperture_format
|
||||
{
|
||||
UFBX_APERTURE_FORMAT_CUSTOM,
|
||||
UFBX_APERTURE_FORMAT_16MM_THEATRICAL,
|
||||
UFBX_APERTURE_FORMAT_SUPER_16MM,
|
||||
UFBX_APERTURE_FORMAT_35MM_ACADEMY,
|
||||
UFBX_APERTURE_FORMAT_35MM_TV_PROJECTION,
|
||||
UFBX_APERTURE_FORMAT_35MM_FULL_APERTURE,
|
||||
UFBX_APERTURE_FORMAT_35MM_185_PROJECTION,
|
||||
UFBX_APERTURE_FORMAT_35MM_ANAMORPHIC,
|
||||
UFBX_APERTURE_FORMAT_70MM_PROJECTION,
|
||||
UFBX_APERTURE_FORMAT_VISTAVISION,
|
||||
UFBX_APERTURE_FORMAT_DYNAVISION,
|
||||
UFBX_APERTURE_FORMAT_IMAX,
|
||||
UFBX_APERTURE_FORMAT_FORCE_32BIT = 0x7fffffff,
|
||||
}
|
||||
}
|
||||
11
src/ThridParty/Ghost.Ufbx/Generated/ufbx_aperture_mode.cs
Normal file
11
src/ThridParty/Ghost.Ufbx/Generated/ufbx_aperture_mode.cs
Normal file
@@ -0,0 +1,11 @@
|
||||
namespace Ghost.Ufbx
|
||||
{
|
||||
public enum ufbx_aperture_mode
|
||||
{
|
||||
UFBX_APERTURE_MODE_HORIZONTAL_AND_VERTICAL,
|
||||
UFBX_APERTURE_MODE_HORIZONTAL,
|
||||
UFBX_APERTURE_MODE_VERTICAL,
|
||||
UFBX_APERTURE_MODE_FOCAL_LENGTH,
|
||||
UFBX_APERTURE_MODE_FORCE_32BIT = 0x7fffffff,
|
||||
}
|
||||
}
|
||||
11
src/ThridParty/Ghost.Ufbx/Generated/ufbx_application.cs
Normal file
11
src/ThridParty/Ghost.Ufbx/Generated/ufbx_application.cs
Normal file
@@ -0,0 +1,11 @@
|
||||
namespace Ghost.Ufbx
|
||||
{
|
||||
public partial struct ufbx_application
|
||||
{
|
||||
public ufbx_string vendor;
|
||||
|
||||
public ufbx_string name;
|
||||
|
||||
public ufbx_string version;
|
||||
}
|
||||
}
|
||||
12
src/ThridParty/Ghost.Ufbx/Generated/ufbx_aspect_mode.cs
Normal file
12
src/ThridParty/Ghost.Ufbx/Generated/ufbx_aspect_mode.cs
Normal file
@@ -0,0 +1,12 @@
|
||||
namespace Ghost.Ufbx
|
||||
{
|
||||
public enum ufbx_aspect_mode
|
||||
{
|
||||
UFBX_ASPECT_MODE_WINDOW_SIZE,
|
||||
UFBX_ASPECT_MODE_FIXED_RATIO,
|
||||
UFBX_ASPECT_MODE_FIXED_RESOLUTION,
|
||||
UFBX_ASPECT_MODE_FIXED_WIDTH,
|
||||
UFBX_ASPECT_MODE_FIXED_HEIGHT,
|
||||
UFBX_ASPECT_MODE_FORCE_32BIT = 0x7fffffff,
|
||||
}
|
||||
}
|
||||
94
src/ThridParty/Ghost.Ufbx/Generated/ufbx_audio_clip.cs
Normal file
94
src/ThridParty/Ghost.Ufbx/Generated/ufbx_audio_clip.cs
Normal file
@@ -0,0 +1,94 @@
|
||||
using System.Diagnostics.CodeAnalysis;
|
||||
using System.Runtime.InteropServices;
|
||||
|
||||
namespace Ghost.Ufbx
|
||||
{
|
||||
public partial struct ufbx_audio_clip
|
||||
{
|
||||
[NativeTypeName("__AnonymousRecord_ufbx_L3405_C2")]
|
||||
public _Anonymous_e__Union Anonymous;
|
||||
|
||||
public ufbx_string filename;
|
||||
|
||||
public ufbx_string absolute_filename;
|
||||
|
||||
public ufbx_string relative_filename;
|
||||
|
||||
public ufbx_blob raw_filename;
|
||||
|
||||
public ufbx_blob raw_absolute_filename;
|
||||
|
||||
public ufbx_blob raw_relative_filename;
|
||||
|
||||
public ufbx_blob content;
|
||||
|
||||
[UnscopedRef]
|
||||
public ref ufbx_element element
|
||||
{
|
||||
get
|
||||
{
|
||||
return ref Anonymous.element;
|
||||
}
|
||||
}
|
||||
|
||||
[UnscopedRef]
|
||||
public ref ufbx_string name
|
||||
{
|
||||
get
|
||||
{
|
||||
return ref Anonymous.Anonymous.name;
|
||||
}
|
||||
}
|
||||
|
||||
[UnscopedRef]
|
||||
public ref ufbx_props props
|
||||
{
|
||||
get
|
||||
{
|
||||
return ref Anonymous.Anonymous.props;
|
||||
}
|
||||
}
|
||||
|
||||
[UnscopedRef]
|
||||
public ref uint element_id
|
||||
{
|
||||
get
|
||||
{
|
||||
return ref Anonymous.Anonymous.element_id;
|
||||
}
|
||||
}
|
||||
|
||||
[UnscopedRef]
|
||||
public ref uint typed_id
|
||||
{
|
||||
get
|
||||
{
|
||||
return ref Anonymous.Anonymous.typed_id;
|
||||
}
|
||||
}
|
||||
|
||||
[StructLayout(LayoutKind.Explicit)]
|
||||
public partial struct _Anonymous_e__Union
|
||||
{
|
||||
[FieldOffset(0)]
|
||||
public ufbx_element element;
|
||||
|
||||
[FieldOffset(0)]
|
||||
[NativeTypeName("__AnonymousRecord_ufbx_L3405_C32")]
|
||||
public _Anonymous_e__Struct Anonymous;
|
||||
|
||||
public partial struct _Anonymous_e__Struct
|
||||
{
|
||||
public ufbx_string name;
|
||||
|
||||
public ufbx_props props;
|
||||
|
||||
[NativeTypeName("uint32_t")]
|
||||
public uint element_id;
|
||||
|
||||
[NativeTypeName("uint32_t")]
|
||||
public uint typed_id;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
10
src/ThridParty/Ghost.Ufbx/Generated/ufbx_audio_clip_list.cs
Normal file
10
src/ThridParty/Ghost.Ufbx/Generated/ufbx_audio_clip_list.cs
Normal file
@@ -0,0 +1,10 @@
|
||||
namespace Ghost.Ufbx
|
||||
{
|
||||
public unsafe partial struct ufbx_audio_clip_list
|
||||
{
|
||||
public ufbx_audio_clip** data;
|
||||
|
||||
[NativeTypeName("size_t")]
|
||||
public nuint count;
|
||||
}
|
||||
}
|
||||
82
src/ThridParty/Ghost.Ufbx/Generated/ufbx_audio_layer.cs
Normal file
82
src/ThridParty/Ghost.Ufbx/Generated/ufbx_audio_layer.cs
Normal file
@@ -0,0 +1,82 @@
|
||||
using System.Diagnostics.CodeAnalysis;
|
||||
using System.Runtime.InteropServices;
|
||||
|
||||
namespace Ghost.Ufbx
|
||||
{
|
||||
public partial struct ufbx_audio_layer
|
||||
{
|
||||
[NativeTypeName("__AnonymousRecord_ufbx_L3393_C2")]
|
||||
public _Anonymous_e__Union Anonymous;
|
||||
|
||||
public ufbx_audio_clip_list clips;
|
||||
|
||||
[UnscopedRef]
|
||||
public ref ufbx_element element
|
||||
{
|
||||
get
|
||||
{
|
||||
return ref Anonymous.element;
|
||||
}
|
||||
}
|
||||
|
||||
[UnscopedRef]
|
||||
public ref ufbx_string name
|
||||
{
|
||||
get
|
||||
{
|
||||
return ref Anonymous.Anonymous.name;
|
||||
}
|
||||
}
|
||||
|
||||
[UnscopedRef]
|
||||
public ref ufbx_props props
|
||||
{
|
||||
get
|
||||
{
|
||||
return ref Anonymous.Anonymous.props;
|
||||
}
|
||||
}
|
||||
|
||||
[UnscopedRef]
|
||||
public ref uint element_id
|
||||
{
|
||||
get
|
||||
{
|
||||
return ref Anonymous.Anonymous.element_id;
|
||||
}
|
||||
}
|
||||
|
||||
[UnscopedRef]
|
||||
public ref uint typed_id
|
||||
{
|
||||
get
|
||||
{
|
||||
return ref Anonymous.Anonymous.typed_id;
|
||||
}
|
||||
}
|
||||
|
||||
[StructLayout(LayoutKind.Explicit)]
|
||||
public partial struct _Anonymous_e__Union
|
||||
{
|
||||
[FieldOffset(0)]
|
||||
public ufbx_element element;
|
||||
|
||||
[FieldOffset(0)]
|
||||
[NativeTypeName("__AnonymousRecord_ufbx_L3393_C32")]
|
||||
public _Anonymous_e__Struct Anonymous;
|
||||
|
||||
public partial struct _Anonymous_e__Struct
|
||||
{
|
||||
public ufbx_string name;
|
||||
|
||||
public ufbx_props props;
|
||||
|
||||
[NativeTypeName("uint32_t")]
|
||||
public uint element_id;
|
||||
|
||||
[NativeTypeName("uint32_t")]
|
||||
public uint typed_id;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
10
src/ThridParty/Ghost.Ufbx/Generated/ufbx_audio_layer_list.cs
Normal file
10
src/ThridParty/Ghost.Ufbx/Generated/ufbx_audio_layer_list.cs
Normal file
@@ -0,0 +1,10 @@
|
||||
namespace Ghost.Ufbx
|
||||
{
|
||||
public unsafe partial struct ufbx_audio_layer_list
|
||||
{
|
||||
public ufbx_audio_layer** data;
|
||||
|
||||
[NativeTypeName("size_t")]
|
||||
public nuint count;
|
||||
}
|
||||
}
|
||||
59
src/ThridParty/Ghost.Ufbx/Generated/ufbx_bake_opts.cs
Normal file
59
src/ThridParty/Ghost.Ufbx/Generated/ufbx_bake_opts.cs
Normal file
@@ -0,0 +1,59 @@
|
||||
namespace Ghost.Ufbx
|
||||
{
|
||||
public partial struct ufbx_bake_opts
|
||||
{
|
||||
[NativeTypeName("uint32_t")]
|
||||
public uint _begin_zero;
|
||||
|
||||
public ufbx_allocator_opts temp_allocator;
|
||||
|
||||
public ufbx_allocator_opts result_allocator;
|
||||
|
||||
[NativeTypeName("_Bool")]
|
||||
public bool trim_start_time;
|
||||
|
||||
public double resample_rate;
|
||||
|
||||
public double minimum_sample_rate;
|
||||
|
||||
public double maximum_sample_rate;
|
||||
|
||||
[NativeTypeName("_Bool")]
|
||||
public bool bake_transform_props;
|
||||
|
||||
[NativeTypeName("_Bool")]
|
||||
public bool skip_node_transforms;
|
||||
|
||||
[NativeTypeName("_Bool")]
|
||||
public bool no_resample_rotation;
|
||||
|
||||
[NativeTypeName("_Bool")]
|
||||
public bool ignore_layer_weight_animation;
|
||||
|
||||
[NativeTypeName("size_t")]
|
||||
public nuint max_keyframe_segments;
|
||||
|
||||
public ufbx_bake_step_handling step_handling;
|
||||
|
||||
public double step_custom_duration;
|
||||
|
||||
public double step_custom_epsilon;
|
||||
|
||||
[NativeTypeName("uint32_t")]
|
||||
public uint evaluate_flags;
|
||||
|
||||
[NativeTypeName("_Bool")]
|
||||
public bool key_reduction_enabled;
|
||||
|
||||
[NativeTypeName("_Bool")]
|
||||
public bool key_reduction_rotation;
|
||||
|
||||
public double key_reduction_threshold;
|
||||
|
||||
[NativeTypeName("size_t")]
|
||||
public nuint key_reduction_passes;
|
||||
|
||||
[NativeTypeName("uint32_t")]
|
||||
public uint _end_zero;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,12 @@
|
||||
namespace Ghost.Ufbx
|
||||
{
|
||||
public enum ufbx_bake_step_handling
|
||||
{
|
||||
UFBX_BAKE_STEP_HANDLING_DEFAULT,
|
||||
UFBX_BAKE_STEP_HANDLING_CUSTOM_DURATION,
|
||||
UFBX_BAKE_STEP_HANDLING_IDENTICAL_TIME,
|
||||
UFBX_BAKE_STEP_HANDLING_ADJACENT_DOUBLE,
|
||||
UFBX_BAKE_STEP_HANDLING_IGNORE,
|
||||
ufbx_bake_step_handling_FORCE_32BIT = 0x7fffffff,
|
||||
}
|
||||
}
|
||||
21
src/ThridParty/Ghost.Ufbx/Generated/ufbx_baked_anim.cs
Normal file
21
src/ThridParty/Ghost.Ufbx/Generated/ufbx_baked_anim.cs
Normal file
@@ -0,0 +1,21 @@
|
||||
namespace Ghost.Ufbx
|
||||
{
|
||||
public partial struct ufbx_baked_anim
|
||||
{
|
||||
public ufbx_baked_node_list nodes;
|
||||
|
||||
public ufbx_baked_element_list elements;
|
||||
|
||||
public double playback_time_begin;
|
||||
|
||||
public double playback_time_end;
|
||||
|
||||
public double playback_duration;
|
||||
|
||||
public double key_time_min;
|
||||
|
||||
public double key_time_max;
|
||||
|
||||
public ufbx_baked_anim_metadata metadata;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,17 @@
|
||||
namespace Ghost.Ufbx
|
||||
{
|
||||
public partial struct ufbx_baked_anim_metadata
|
||||
{
|
||||
[NativeTypeName("size_t")]
|
||||
public nuint result_memory_used;
|
||||
|
||||
[NativeTypeName("size_t")]
|
||||
public nuint temp_memory_used;
|
||||
|
||||
[NativeTypeName("size_t")]
|
||||
public nuint result_allocs;
|
||||
|
||||
[NativeTypeName("size_t")]
|
||||
public nuint temp_allocs;
|
||||
}
|
||||
}
|
||||
10
src/ThridParty/Ghost.Ufbx/Generated/ufbx_baked_element.cs
Normal file
10
src/ThridParty/Ghost.Ufbx/Generated/ufbx_baked_element.cs
Normal file
@@ -0,0 +1,10 @@
|
||||
namespace Ghost.Ufbx
|
||||
{
|
||||
public partial struct ufbx_baked_element
|
||||
{
|
||||
[NativeTypeName("uint32_t")]
|
||||
public uint element_id;
|
||||
|
||||
public ufbx_baked_prop_list props;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,10 @@
|
||||
namespace Ghost.Ufbx
|
||||
{
|
||||
public unsafe partial struct ufbx_baked_element_list
|
||||
{
|
||||
public ufbx_baked_element* data;
|
||||
|
||||
[NativeTypeName("size_t")]
|
||||
public nuint count;
|
||||
}
|
||||
}
|
||||
12
src/ThridParty/Ghost.Ufbx/Generated/ufbx_baked_key_flags.cs
Normal file
12
src/ThridParty/Ghost.Ufbx/Generated/ufbx_baked_key_flags.cs
Normal file
@@ -0,0 +1,12 @@
|
||||
namespace Ghost.Ufbx
|
||||
{
|
||||
public enum ufbx_baked_key_flags
|
||||
{
|
||||
UFBX_BAKED_KEY_STEP_LEFT = 0x1,
|
||||
UFBX_BAKED_KEY_STEP_RIGHT = 0x2,
|
||||
UFBX_BAKED_KEY_STEP_KEY = 0x4,
|
||||
UFBX_BAKED_KEY_KEYFRAME = 0x8,
|
||||
UFBX_BAKED_KEY_REDUCED = 0x10,
|
||||
UFBX_BAKED_KEY_FORCE_32BIT = 0x7fffffff,
|
||||
}
|
||||
}
|
||||
26
src/ThridParty/Ghost.Ufbx/Generated/ufbx_baked_node.cs
Normal file
26
src/ThridParty/Ghost.Ufbx/Generated/ufbx_baked_node.cs
Normal file
@@ -0,0 +1,26 @@
|
||||
namespace Ghost.Ufbx
|
||||
{
|
||||
public partial struct ufbx_baked_node
|
||||
{
|
||||
[NativeTypeName("uint32_t")]
|
||||
public uint typed_id;
|
||||
|
||||
[NativeTypeName("uint32_t")]
|
||||
public uint element_id;
|
||||
|
||||
[NativeTypeName("_Bool")]
|
||||
public bool constant_translation;
|
||||
|
||||
[NativeTypeName("_Bool")]
|
||||
public bool constant_rotation;
|
||||
|
||||
[NativeTypeName("_Bool")]
|
||||
public bool constant_scale;
|
||||
|
||||
public ufbx_baked_vec3_list translation_keys;
|
||||
|
||||
public ufbx_baked_quat_list rotation_keys;
|
||||
|
||||
public ufbx_baked_vec3_list scale_keys;
|
||||
}
|
||||
}
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user