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

namespace Ghost.Ufbx;

public unsafe partial struct ufbx_blend_shape
{
    /// <summary>
    /// From: <see cref="Api.ufbx_get_blend_shape_offset_index(ufbx_blend_shape*, nuint)" />
    /// </summary>
    [System.Runtime.CompilerServices.MethodImpl(System.Runtime.CompilerServices.MethodImplOptions.AggressiveInlining)]
    public uint GetOffsetIndex(nuint vertex)
    {
        return Api.ufbx_get_blend_shape_offset_index(
            (ufbx_blend_shape*)System.Runtime.CompilerServices.Unsafe.AsPointer(ref this),
            vertex);
    }

    /// <summary>
    /// From: <see cref="Api.ufbx_get_blend_shape_vertex_offset(ufbx_blend_shape*, nuint)" />
    /// </summary>
    [System.Runtime.CompilerServices.MethodImpl(System.Runtime.CompilerServices.MethodImplOptions.AggressiveInlining)]
    public ufbx_vec3 GetVertexOffset(nuint vertex)
    {
        return Api.ufbx_get_blend_shape_vertex_offset(
            (ufbx_blend_shape*)System.Runtime.CompilerServices.Unsafe.AsPointer(ref this),
            vertex);
    }

    /// <summary>
    /// From: <see cref="Api.ufbx_add_blend_shape_vertex_offsets(ufbx_blend_shape*, ufbx_vec3*, nuint, float)" />
    /// </summary>
    [System.Runtime.CompilerServices.MethodImpl(System.Runtime.CompilerServices.MethodImplOptions.AggressiveInlining)]
    public void AddVertexOffsets(ReadOnlySpan<ufbx_vec3> vertices, float weight)
    {
        fixed (ufbx_vec3* pvertices = vertices)
        {
            Api.ufbx_add_blend_shape_vertex_offsets(
                (ufbx_blend_shape*)System.Runtime.CompilerServices.Unsafe.AsPointer(ref this),
                (ufbx_vec3*)pvertices,
                (nuint)vertices.Length,
                weight);
        }
    }
}
