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

namespace Ghost.Nvtt;

public unsafe partial struct NvttCubeSurface : System.IDisposable
{
    /// <summary>
    /// From: <see cref="Api.nvttCreateCubeSurface()" />
    /// </summary>
    [System.Runtime.CompilerServices.MethodImpl(System.Runtime.CompilerServices.MethodImplOptions.AggressiveInlining)]
    public static NvttCubeSurface* Create()
    {
        return Api.nvttCreateCubeSurface();
    }

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

    /// <summary>
    /// From: <see cref="Api.nvttCubeSurfaceIsNull(NvttCubeSurface*)" />
    /// </summary>
    [System.Runtime.CompilerServices.MethodImpl(System.Runtime.CompilerServices.MethodImplOptions.AggressiveInlining)]
    public NvttBoolean IsNull()
    {
        return Api.nvttCubeSurfaceIsNull((NvttCubeSurface*)System.Runtime.CompilerServices.Unsafe.AsPointer(ref this));
    }

    /// <summary>
    /// From: <see cref="Api.nvttCubeSurfaceEdgeLength(NvttCubeSurface*)" />
    /// </summary>
    [System.Runtime.CompilerServices.MethodImpl(System.Runtime.CompilerServices.MethodImplOptions.AggressiveInlining)]
    public int EdgeLength()
    {
        return Api.nvttCubeSurfaceEdgeLength((NvttCubeSurface*)System.Runtime.CompilerServices.Unsafe.AsPointer(ref this));
    }

    /// <summary>
    /// From: <see cref="Api.nvttCubeSurfaceCountMipmaps(NvttCubeSurface*)" />
    /// </summary>
    [System.Runtime.CompilerServices.MethodImpl(System.Runtime.CompilerServices.MethodImplOptions.AggressiveInlining)]
    public int CountMipmaps()
    {
        return Api.nvttCubeSurfaceCountMipmaps((NvttCubeSurface*)System.Runtime.CompilerServices.Unsafe.AsPointer(ref this));
    }

    /// <summary>
    /// From: <see cref="Api.nvttCubeSurfaceLoad(NvttCubeSurface*, sbyte*, int)" />
    /// </summary>
    [System.Runtime.CompilerServices.MethodImpl(System.Runtime.CompilerServices.MethodImplOptions.AggressiveInlining)]
    public NvttBoolean Load(ReadOnlySpan<byte> fileName, int mipmap)
    {
        fixed (byte* pfileName = fileName)
        {
            return Api.nvttCubeSurfaceLoad(
                (NvttCubeSurface*)System.Runtime.CompilerServices.Unsafe.AsPointer(ref this),
                (sbyte*)pfileName,
                mipmap);
        }
    }

    /// <summary>
    /// From: <see cref="Api.nvttCubeSurfaceLoadFromMemory(NvttCubeSurface*, void*, ulong, int)" />
    /// </summary>
    [System.Runtime.CompilerServices.MethodImpl(System.Runtime.CompilerServices.MethodImplOptions.AggressiveInlining)]
    public NvttBoolean LoadFromMemory(void* data, ulong sizeInBytes, int mipmap)
    {
        return Api.nvttCubeSurfaceLoadFromMemory(
            (NvttCubeSurface*)System.Runtime.CompilerServices.Unsafe.AsPointer(ref this),
            data,
            sizeInBytes,
            mipmap);
    }

    /// <summary>
    /// From: <see cref="Api.nvttCubeSurfaceSave(NvttCubeSurface*, sbyte*)" />
    /// </summary>
    [System.Runtime.CompilerServices.MethodImpl(System.Runtime.CompilerServices.MethodImplOptions.AggressiveInlining)]
    public NvttBoolean Save(ReadOnlySpan<byte> fileName)
    {
        fixed (byte* pfileName = fileName)
        {
            return Api.nvttCubeSurfaceSave(
                (NvttCubeSurface*)System.Runtime.CompilerServices.Unsafe.AsPointer(ref this),
                (sbyte*)pfileName);
        }
    }

    /// <summary>
    /// From: <see cref="Api.nvttCubeSurfaceFace(NvttCubeSurface*, int)" />
    /// </summary>
    [System.Runtime.CompilerServices.MethodImpl(System.Runtime.CompilerServices.MethodImplOptions.AggressiveInlining)]
    public NvttSurface* Face(int face)
    {
        return Api.nvttCubeSurfaceFace(
            (NvttCubeSurface*)System.Runtime.CompilerServices.Unsafe.AsPointer(ref this),
            face);
    }

    /// <summary>
    /// From: <see cref="Api.nvttCubeSurfaceFold(NvttCubeSurface*, NvttSurface*, NvttCubeLayout)" />
    /// </summary>
    [System.Runtime.CompilerServices.MethodImpl(System.Runtime.CompilerServices.MethodImplOptions.AggressiveInlining)]
    public void Fold(NvttSurface* img, NvttCubeLayout layout)
    {
        Api.nvttCubeSurfaceFold(
            (NvttCubeSurface*)System.Runtime.CompilerServices.Unsafe.AsPointer(ref this),
            img,
            layout);
    }

    /// <summary>
    /// From: <see cref="Api.nvttCubeSurfaceUnfold(NvttCubeSurface*, NvttCubeLayout)" />
    /// </summary>
    [System.Runtime.CompilerServices.MethodImpl(System.Runtime.CompilerServices.MethodImplOptions.AggressiveInlining)]
    public NvttSurface* Unfold(NvttCubeLayout layout)
    {
        return Api.nvttCubeSurfaceUnfold(
            (NvttCubeSurface*)System.Runtime.CompilerServices.Unsafe.AsPointer(ref this),
            layout);
    }

    /// <summary>
    /// From: <see cref="Api.nvttCubeSurfaceAverage(NvttCubeSurface*, int)" />
    /// </summary>
    [System.Runtime.CompilerServices.MethodImpl(System.Runtime.CompilerServices.MethodImplOptions.AggressiveInlining)]
    public float Average(int channel)
    {
        return Api.nvttCubeSurfaceAverage(
            (NvttCubeSurface*)System.Runtime.CompilerServices.Unsafe.AsPointer(ref this),
            channel);
    }

    /// <summary>
    /// From: <see cref="Api.nvttCubeSurfaceRange(NvttCubeSurface*, int, float*, float*)" />
    /// </summary>
    [System.Runtime.CompilerServices.MethodImpl(System.Runtime.CompilerServices.MethodImplOptions.AggressiveInlining)]
    public void Range(int channel, float* minimum_ptr, float* maximum_ptr)
    {
        Api.nvttCubeSurfaceRange(
            (NvttCubeSurface*)System.Runtime.CompilerServices.Unsafe.AsPointer(ref this),
            channel,
            minimum_ptr,
            maximum_ptr);
    }

    /// <summary>
    /// From: <see cref="Api.nvttCubeSurfaceClamp(NvttCubeSurface*, int, float, float)" />
    /// </summary>
    [System.Runtime.CompilerServices.MethodImpl(System.Runtime.CompilerServices.MethodImplOptions.AggressiveInlining)]
    public void Clamp(int channel, float low, float high)
    {
        Api.nvttCubeSurfaceClamp(
            (NvttCubeSurface*)System.Runtime.CompilerServices.Unsafe.AsPointer(ref this),
            channel,
            low,
            high);
    }

    /// <summary>
    /// From: <see cref="Api.nvttCubeSurfaceIrradianceFilter(NvttCubeSurface*, int, EdgeFixup)" />
    /// </summary>
    [System.Runtime.CompilerServices.MethodImpl(System.Runtime.CompilerServices.MethodImplOptions.AggressiveInlining)]
    public NvttCubeSurface* IrradianceFilter(int size, EdgeFixup fixupMethod)
    {
        return Api.nvttCubeSurfaceIrradianceFilter(
            (NvttCubeSurface*)System.Runtime.CompilerServices.Unsafe.AsPointer(ref this),
            size,
            fixupMethod);
    }

    /// <summary>
    /// From: <see cref="Api.nvttCubeSurfaceCosinePowerFilter(NvttCubeSurface*, int, float, EdgeFixup)" />
    /// </summary>
    [System.Runtime.CompilerServices.MethodImpl(System.Runtime.CompilerServices.MethodImplOptions.AggressiveInlining)]
    public NvttCubeSurface* CosinePowerFilter(int size, float cosinePower, EdgeFixup fixupMethod)
    {
        return Api.nvttCubeSurfaceCosinePowerFilter(
            (NvttCubeSurface*)System.Runtime.CompilerServices.Unsafe.AsPointer(ref this),
            size,
            cosinePower,
            fixupMethod);
    }

    /// <summary>
    /// From: <see cref="Api.nvttCubeSurfaceFastResample(NvttCubeSurface*, int, EdgeFixup)" />
    /// </summary>
    [System.Runtime.CompilerServices.MethodImpl(System.Runtime.CompilerServices.MethodImplOptions.AggressiveInlining)]
    public NvttCubeSurface* FastResample(int size, EdgeFixup fixupMethod)
    {
        return Api.nvttCubeSurfaceFastResample(
            (NvttCubeSurface*)System.Runtime.CompilerServices.Unsafe.AsPointer(ref this),
            size,
            fixupMethod);
    }

    /// <summary>
    /// From: <see cref="Api.nvttCubeSurfaceToLinear(NvttCubeSurface*, float)" />
    /// </summary>
    [System.Runtime.CompilerServices.MethodImpl(System.Runtime.CompilerServices.MethodImplOptions.AggressiveInlining)]
    public void ToLinear(float gamma)
    {
        Api.nvttCubeSurfaceToLinear(
            (NvttCubeSurface*)System.Runtime.CompilerServices.Unsafe.AsPointer(ref this),
            gamma);
    }

    /// <summary>
    /// From: <see cref="Api.nvttCubeSurfaceToGamma(NvttCubeSurface*, float)" />
    /// </summary>
    [System.Runtime.CompilerServices.MethodImpl(System.Runtime.CompilerServices.MethodImplOptions.AggressiveInlining)]
    public void ToGamma(float gamma)
    {
        Api.nvttCubeSurfaceToGamma(
            (NvttCubeSurface*)System.Runtime.CompilerServices.Unsafe.AsPointer(ref this),
            gamma);
    }
}
