// <auto-generated>
// This file is generated by Ghost.NativeWrapperGen. Do not edit manually.
// </auto-generated>

namespace Ghost.Ufbx;

public unsafe partial struct ufbx_scene : System.IDisposable
{
    /// <summary>
    /// From: <see cref="Api.ufbx_load_memory(void*, nuint, ufbx_load_opts*, ufbx_error*)" />
    /// </summary>
    [System.Runtime.CompilerServices.MethodImpl(System.Runtime.CompilerServices.MethodImplOptions.AggressiveInlining)]
    public static ufbx_scene* LoadMemory(void* data, nuint data_size, ufbx_load_opts* opts, ufbx_error* error)
    {
        return Api.ufbx_load_memory(
            data,
            data_size,
            opts,
            error);
    }

    /// <summary>
    /// From: <see cref="Api.ufbx_load_file(sbyte*, ufbx_load_opts*, ufbx_error*)" />
    /// </summary>
    [System.Runtime.CompilerServices.MethodImpl(System.Runtime.CompilerServices.MethodImplOptions.AggressiveInlining)]
    public static ufbx_scene* LoadFile(sbyte* filename, ufbx_load_opts* opts, ufbx_error* error)
    {
        return Api.ufbx_load_file(
            filename,
            opts,
            error);
    }

    /// <summary>
    /// From: <see cref="Api.ufbx_load_file_len(sbyte*, nuint, ufbx_load_opts*, ufbx_error*)" />
    /// </summary>
    [System.Runtime.CompilerServices.MethodImpl(System.Runtime.CompilerServices.MethodImplOptions.AggressiveInlining)]
    public static ufbx_scene* LoadFileLen(ReadOnlySpan<byte> filename, ufbx_load_opts* opts, ufbx_error* error)
    {
        fixed (byte* pfilename = filename)
        {
            return Api.ufbx_load_file_len(
                (sbyte*)pfilename,
                (nuint)filename.Length,
                opts,
                error);
        }
    }

    /// <summary>
    /// From: <see cref="Api.ufbx_load_stdio(void*, ufbx_load_opts*, ufbx_error*)" />
    /// </summary>
    [System.Runtime.CompilerServices.MethodImpl(System.Runtime.CompilerServices.MethodImplOptions.AggressiveInlining)]
    public static ufbx_scene* LoadStdio(void* file, ufbx_load_opts* opts, ufbx_error* error)
    {
        return Api.ufbx_load_stdio(
            file,
            opts,
            error);
    }

    /// <summary>
    /// From: <see cref="Api.ufbx_load_stdio_prefix(void*, void*, nuint, ufbx_load_opts*, ufbx_error*)" />
    /// </summary>
    [System.Runtime.CompilerServices.MethodImpl(System.Runtime.CompilerServices.MethodImplOptions.AggressiveInlining)]
    public static ufbx_scene* LoadStdioPrefix(void* file, void* prefix, nuint prefix_size, ufbx_load_opts* opts, ufbx_error* error)
    {
        return Api.ufbx_load_stdio_prefix(
            file,
            prefix,
            prefix_size,
            opts,
            error);
    }

    /// <summary>
    /// From: <see cref="Api.ufbx_free_scene(ufbx_scene*)" />
    /// </summary>
    [System.Runtime.CompilerServices.MethodImpl(System.Runtime.CompilerServices.MethodImplOptions.AggressiveInlining)]
    public void Dispose()
    {
        Api.ufbx_free_scene((ufbx_scene*)System.Runtime.CompilerServices.Unsafe.AsPointer(ref this));
    }

    /// <summary>
    /// From: <see cref="Api.ufbx_retain_scene(ufbx_scene*)" />
    /// </summary>
    [System.Runtime.CompilerServices.MethodImpl(System.Runtime.CompilerServices.MethodImplOptions.AggressiveInlining)]
    public void Retain()
    {
        Api.ufbx_retain_scene((ufbx_scene*)System.Runtime.CompilerServices.Unsafe.AsPointer(ref this));
    }

    /// <summary>
    /// From: <see cref="Api.ufbx_find_element_len(ufbx_scene*, ufbx_element_type, sbyte*, nuint)" />
    /// </summary>
    [System.Runtime.CompilerServices.MethodImpl(System.Runtime.CompilerServices.MethodImplOptions.AggressiveInlining)]
    public ufbx_element* FindElementLen(ufbx_element_type type, ReadOnlySpan<byte> name)
    {
        fixed (byte* pname = name)
        {
            return Api.ufbx_find_element_len(
                (ufbx_scene*)System.Runtime.CompilerServices.Unsafe.AsPointer(ref this),
                type,
                (sbyte*)pname,
                (nuint)name.Length);
        }
    }

    /// <summary>
    /// From: <see cref="Api.ufbx_find_element(ufbx_scene*, ufbx_element_type, sbyte*)" />
    /// </summary>
    [System.Runtime.CompilerServices.MethodImpl(System.Runtime.CompilerServices.MethodImplOptions.AggressiveInlining)]
    public ufbx_element* FindElement(ufbx_element_type type, sbyte* name)
    {
        return Api.ufbx_find_element(
            (ufbx_scene*)System.Runtime.CompilerServices.Unsafe.AsPointer(ref this),
            type,
            name);
    }

    /// <summary>
    /// From: <see cref="Api.ufbx_find_node_len(ufbx_scene*, sbyte*, nuint)" />
    /// </summary>
    [System.Runtime.CompilerServices.MethodImpl(System.Runtime.CompilerServices.MethodImplOptions.AggressiveInlining)]
    public ufbx_node* FindNodeLen(ReadOnlySpan<byte> name)
    {
        fixed (byte* pname = name)
        {
            return Api.ufbx_find_node_len(
                (ufbx_scene*)System.Runtime.CompilerServices.Unsafe.AsPointer(ref this),
                (sbyte*)pname,
                (nuint)name.Length);
        }
    }

    /// <summary>
    /// From: <see cref="Api.ufbx_find_node(ufbx_scene*, sbyte*)" />
    /// </summary>
    [System.Runtime.CompilerServices.MethodImpl(System.Runtime.CompilerServices.MethodImplOptions.AggressiveInlining)]
    public ufbx_node* FindNode(sbyte* name)
    {
        return Api.ufbx_find_node(
            (ufbx_scene*)System.Runtime.CompilerServices.Unsafe.AsPointer(ref this),
            name);
    }

    /// <summary>
    /// From: <see cref="Api.ufbx_find_anim_stack_len(ufbx_scene*, sbyte*, nuint)" />
    /// </summary>
    [System.Runtime.CompilerServices.MethodImpl(System.Runtime.CompilerServices.MethodImplOptions.AggressiveInlining)]
    public ufbx_anim_stack* FindAnimStackLen(ReadOnlySpan<byte> name)
    {
        fixed (byte* pname = name)
        {
            return Api.ufbx_find_anim_stack_len(
                (ufbx_scene*)System.Runtime.CompilerServices.Unsafe.AsPointer(ref this),
                (sbyte*)pname,
                (nuint)name.Length);
        }
    }

    /// <summary>
    /// From: <see cref="Api.ufbx_find_anim_stack(ufbx_scene*, sbyte*)" />
    /// </summary>
    [System.Runtime.CompilerServices.MethodImpl(System.Runtime.CompilerServices.MethodImplOptions.AggressiveInlining)]
    public ufbx_anim_stack* FindAnimStack(sbyte* name)
    {
        return Api.ufbx_find_anim_stack(
            (ufbx_scene*)System.Runtime.CompilerServices.Unsafe.AsPointer(ref this),
            name);
    }

    /// <summary>
    /// From: <see cref="Api.ufbx_find_material_len(ufbx_scene*, sbyte*, nuint)" />
    /// </summary>
    [System.Runtime.CompilerServices.MethodImpl(System.Runtime.CompilerServices.MethodImplOptions.AggressiveInlining)]
    public ufbx_material* FindMaterialLen(ReadOnlySpan<byte> name)
    {
        fixed (byte* pname = name)
        {
            return Api.ufbx_find_material_len(
                (ufbx_scene*)System.Runtime.CompilerServices.Unsafe.AsPointer(ref this),
                (sbyte*)pname,
                (nuint)name.Length);
        }
    }

    /// <summary>
    /// From: <see cref="Api.ufbx_find_material(ufbx_scene*, sbyte*)" />
    /// </summary>
    [System.Runtime.CompilerServices.MethodImpl(System.Runtime.CompilerServices.MethodImplOptions.AggressiveInlining)]
    public ufbx_material* FindMaterial(sbyte* name)
    {
        return Api.ufbx_find_material(
            (ufbx_scene*)System.Runtime.CompilerServices.Unsafe.AsPointer(ref this),
            name);
    }

    /// <summary>
    /// From: <see cref="Api.ufbx_evaluate_scene(ufbx_scene*, ufbx_anim*, double, ufbx_evaluate_opts*, ufbx_error*)" />
    /// </summary>
    [System.Runtime.CompilerServices.MethodImpl(System.Runtime.CompilerServices.MethodImplOptions.AggressiveInlining)]
    public ufbx_scene* Evaluate(ufbx_anim* anim, double time, ufbx_evaluate_opts* opts, ufbx_error* error)
    {
        return Api.ufbx_evaluate_scene(
            (ufbx_scene*)System.Runtime.CompilerServices.Unsafe.AsPointer(ref this),
            anim,
            time,
            opts,
            error);
    }

    /// <summary>
    /// From: <see cref="Api.ufbx_create_anim(ufbx_scene*, ufbx_anim_opts*, ufbx_error*)" />
    /// </summary>
    [System.Runtime.CompilerServices.MethodImpl(System.Runtime.CompilerServices.MethodImplOptions.AggressiveInlining)]
    public ufbx_anim* CreateAnim(ufbx_anim_opts* opts, ufbx_error* error)
    {
        return Api.ufbx_create_anim(
            (ufbx_scene*)System.Runtime.CompilerServices.Unsafe.AsPointer(ref this),
            opts,
            error);
    }

    /// <summary>
    /// From: <see cref="Api.ufbx_bake_anim(ufbx_scene*, ufbx_anim*, ufbx_bake_opts*, ufbx_error*)" />
    /// </summary>
    [System.Runtime.CompilerServices.MethodImpl(System.Runtime.CompilerServices.MethodImplOptions.AggressiveInlining)]
    public ufbx_baked_anim* BakeAnim(ufbx_anim* anim, ufbx_bake_opts* opts, ufbx_error* error)
    {
        return Api.ufbx_bake_anim(
            (ufbx_scene*)System.Runtime.CompilerServices.Unsafe.AsPointer(ref this),
            anim,
            opts,
            error);
    }
}
