Replaces all Misaki.HighPerformance.Mathematics vector, quaternion, and matrix types in Ghost.Ufbx bindings with new native ufbx_vec2, ufbx_vec3, ufbx_vec4, ufbx_quat, and ufbx_matrix structs. Updates all interop code, struct fields, and API signatures accordingly. Adds struct definitions for the new types and provides matrix operations as struct methods. Removes unnecessary math package reference. Also includes minor fixes to system attributes, meshlet LOD logic, and mesh utility. BREAKING CHANGE: All Ufbx-related APIs now use ufbx_* types instead of Misaki.HighPerformance.Mathematics types. Existing code using the old types will require updates.
117 lines
2.5 KiB
C#
117 lines
2.5 KiB
C#
using System.Diagnostics.CodeAnalysis;
|
|
using System.Runtime.InteropServices;
|
|
|
|
namespace Ghost.Ufbx
|
|
{
|
|
public partial struct ufbx_light
|
|
{
|
|
[NativeTypeName("__AnonymousRecord_ufbx_L1421_C2")]
|
|
public _Anonymous_e__Union Anonymous;
|
|
|
|
public ufbx_vec3 color;
|
|
|
|
[NativeTypeName("ufbx_real")]
|
|
public float intensity;
|
|
|
|
public ufbx_vec3 local_direction;
|
|
|
|
public ufbx_light_type type;
|
|
|
|
public ufbx_light_decay decay;
|
|
|
|
public ufbx_light_area_shape area_shape;
|
|
|
|
[NativeTypeName("ufbx_real")]
|
|
public float inner_angle;
|
|
|
|
[NativeTypeName("ufbx_real")]
|
|
public float outer_angle;
|
|
|
|
[NativeTypeName("_Bool")]
|
|
public bool cast_light;
|
|
|
|
[NativeTypeName("_Bool")]
|
|
public bool cast_shadows;
|
|
|
|
[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;
|
|
}
|
|
}
|
|
|
|
[UnscopedRef]
|
|
public ref ufbx_node_list instances
|
|
{
|
|
get
|
|
{
|
|
return ref Anonymous.Anonymous.instances;
|
|
}
|
|
}
|
|
|
|
[StructLayout(LayoutKind.Explicit)]
|
|
public partial struct _Anonymous_e__Union
|
|
{
|
|
[FieldOffset(0)]
|
|
public ufbx_element element;
|
|
|
|
[FieldOffset(0)]
|
|
[NativeTypeName("__AnonymousRecord_ufbx_L1421_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 ufbx_node_list instances;
|
|
}
|
|
}
|
|
}
|
|
}
|