2
* Copyright 2011, Blender Foundation.
4
* This program is free software; you can redistribute it and/or
5
* modify it under the terms of the GNU General Public License
6
* as published by the Free Software Foundation; either version 2
7
* of the License, or (at your option) any later version.
9
* This program is distributed in the hope that it will be useful,
10
* but WITHOUT ANY WARRANTY; without even the implied warranty of
11
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12
* GNU General Public License for more details.
14
* You should have received a copy of the GNU General Public License
15
* along with this program; if not, write to the Free Software Foundation,
16
* Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
23
#ifndef _COM_ColorCurveOperation_h
24
#define _COM_ColorCurveOperation_h
25
#include "COM_NodeOperation.h"
26
#include "DNA_color_types.h"
27
#include "COM_CurveBaseOperation.h"
29
class ColorCurveOperation : public CurveBaseOperation {
32
* Cached reference to the inputProgram
34
SocketReader *m_inputFacProgram;
35
SocketReader *m_inputImageProgram;
36
SocketReader *m_inputBlackProgram;
37
SocketReader *m_inputWhiteProgram;
39
ColorCurveOperation();
42
* the inner loop of this program
44
void executePixel(float output[4], float x, float y, PixelSampler sampler);
47
* Initialize the execution
52
* Deinitialize the execution
54
void deinitExecution();
57
class ConstantLevelColorCurveOperation : public CurveBaseOperation {
60
* Cached reference to the inputProgram
62
SocketReader *m_inputFacProgram;
63
SocketReader *m_inputImageProgram;
68
ConstantLevelColorCurveOperation();
71
* the inner loop of this program
73
void executePixel(float output[4], float x, float y, PixelSampler sampler);
76
* Initialize the execution
81
* Deinitialize the execution
83
void deinitExecution();
85
void setBlackLevel(float black[3]) { copy_v3_v3(this->m_black, black); }
86
void setWhiteLevel(float white[3]) { copy_v3_v3(this->m_white, white); }