File indexing completed on 2024-05-12 05:31:20

0001 /*
0002     KWin - the KDE window manager
0003     This file is part of the KDE project.
0004 
0005     SPDX-FileCopyrightText: 2023 Xaver Hugl <xaver.hugl@gmail.com>
0006 
0007     SPDX-License-Identifier: GPL-2.0-or-later
0008 */
0009 #pragma once
0010 
0011 #include <QVector>
0012 #include <memory>
0013 
0014 #include "kwin_export.h"
0015 
0016 class QVector3D;
0017 
0018 namespace KWin
0019 {
0020 
0021 class ColorTransformation;
0022 
0023 class KWIN_EXPORT ColorLUT3D
0024 {
0025 public:
0026     ColorLUT3D(std::unique_ptr<ColorTransformation> &&transformation, size_t xSize, size_t ySize, size_t zSize);
0027 
0028     size_t xSize() const;
0029     size_t ySize() const;
0030     size_t zSize() const;
0031 
0032     QVector3D sample(size_t x, size_t y, size_t z);
0033 
0034 private:
0035     const std::unique_ptr<ColorTransformation> m_transformation;
0036     const size_t m_xSize;
0037     const size_t m_ySize;
0038     const size_t m_zSize;
0039 };
0040 
0041 }