This repository has been archived on 2023-10-09. You can view files and clone it. You cannot open issues or pull requests or push a commit.
Files
blender-archive/source/blender/compositor/operations/COM_SetVectorOperation.h
Lukas Toenne fdd8897172 Cleanup and improvements of the compositor debug output.
Debug code for graphviz output moved to a dedicated file COM_Debug.h/cpp.

The DebugInfo class has only static functions, which are called from a number of places to keep track of what is happening in the compositor. If debugging is disabled these are just inline stubs, so we
don't need #ifdefs everywhere and don't get any overhead.

The graphviz output is much more useful now. DebugInfo keeps track of node names in a static string map for meaningful names. It uses a number of colors for various special operation classes.
ExecutionGroups are indicated in graphviz with clusters.

Currently the graphviz .dot files are stored in the BLI_temporary_dir() folder. A separate dot file is generated for each stage of the ExecutionGroup scheduling, this is intended to give some idea of the
compositor progress, but could still be improved.
2013-09-13 13:36:47 +00:00

69 lines
1.9 KiB
C++

/*
* Copyright 2011, Blender Foundation.
*
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software Foundation,
* Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
* Contributor:
* Jeroen Bakker
* Monique Dewanchand
*/
#ifndef _COM_SetVectorOperation_h
#define _COM_SetVectorOperation_h
#include "COM_NodeOperation.h"
/**
* this program converts an input color to an output value.
* it assumes we are in sRGB color space.
*/
class SetVectorOperation : public NodeOperation {
private:
float m_x;
float m_y;
float m_z;
float m_w;
public:
/**
* Default constructor
*/
SetVectorOperation();
const float getX() { return this->m_x; }
void setX(float value) { this->m_x = value; }
const float getY() { return this->m_y; }
void setY(float value) { this->m_y = value; }
const float getZ() { return this->m_z; }
void setZ(float value) { this->m_z = value; }
const float getW() { return this->m_w; }
void setW(float value) { this->m_w = value; }
/**
* the inner loop of this program
*/
void executePixel(float output[4], float x, float y, PixelSampler sampler);
void determineResolution(unsigned int resolution[2], unsigned int preferredResolution[2]);
bool isSetOperation() const { return true; }
void setVector(float vector[3]) {
setX(vector[0]);
setY(vector[1]);
setZ(vector[2]);
}
};
#endif