Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJeroen Bakker <j.bakker@atmind.nl>2012-10-24 17:43:32 +0400
committerJeroen Bakker <j.bakker@atmind.nl>2012-10-24 17:43:32 +0400
commita49b1d7b5eaa02ea3caf90c9060e1326dec5f2e5 (patch)
treee4e2a414f8945678bd7d9be5743ff63b6520fbe2 /source/blender/compositor/operations
parentf746f3ea0917033ee05c0282d177a466948927a6 (diff)
Oeps... Enabled the pixelate node added documentation, removed unneeded
code
Diffstat (limited to 'source/blender/compositor/operations')
-rw-r--r--source/blender/compositor/operations/COM_PixelateOperation.cpp20
-rw-r--r--source/blender/compositor/operations/COM_PixelateOperation.h30
2 files changed, 40 insertions, 10 deletions
diff --git a/source/blender/compositor/operations/COM_PixelateOperation.cpp b/source/blender/compositor/operations/COM_PixelateOperation.cpp
index cff4eff0d87..89e7f0093a1 100644
--- a/source/blender/compositor/operations/COM_PixelateOperation.cpp
+++ b/source/blender/compositor/operations/COM_PixelateOperation.cpp
@@ -24,26 +24,26 @@
PixelateOperation::PixelateOperation(DataType datatype) : NodeOperation()
{
- this->addInputSocket(datatype);
- this->addOutputSocket(datatype);
- this->setResolutionInputSocketIndex(0);
- this->m_inputOperation = NULL;
+ this->addInputSocket(datatype);
+ this->addOutputSocket(datatype);
+ this->setResolutionInputSocketIndex(0);
+ this->m_inputOperation = NULL;
}
+
void PixelateOperation::initExecution()
{
- this->m_inputOperation = this->getInputSocketReader(0);
+ this->m_inputOperation = this->getInputSocketReader(0);
}
void PixelateOperation::deinitExecution()
{
- this->m_inputOperation = NULL;
+ this->m_inputOperation = NULL;
}
-
void PixelateOperation::executePixel(float output[4], float x, float y, PixelSampler sampler)
{
- float nx = round(x);
- float ny = round(y);
- this->m_inputOperation->read(output, nx, ny, sampler);
+ float nx = round(x);
+ float ny = round(y);
+ this->m_inputOperation->read(output, nx, ny, sampler);
}
diff --git a/source/blender/compositor/operations/COM_PixelateOperation.h b/source/blender/compositor/operations/COM_PixelateOperation.h
index c3e6975bbb8..b16b21b2ec1 100644
--- a/source/blender/compositor/operations/COM_PixelateOperation.h
+++ b/source/blender/compositor/operations/COM_PixelateOperation.h
@@ -25,13 +25,43 @@
#include "COM_NodeOperation.h"
+/**
+ * @brief Pixelate operation
+ *
+ * The Tile compositor is by default sub-pixel accurate.
+ * For some setups you don want this.
+ * This operation will remove the sub-pixel accuracy
+ */
class PixelateOperation : public NodeOperation {
private:
+ /**
+ * @brief cached refeerence to the input operation
+ */
SocketReader *m_inputOperation;
public:
+ /**
+ * @brief PixelateOperation
+ * @param dataType the datatype to create this operator for (saves datatype conversions)
+ */
PixelateOperation(DataType dataType);
+
+ /**
+ * @brief initialization of the execution
+ */
void initExecution();
+
+ /**
+ * @brief de-initialization of the execution
+ */
void deinitExecution();
+
+ /**
+ * @brief executePixel
+ * @param output result
+ * @param x x-coordinate
+ * @param y y-coordinate
+ * @param sampler sampler
+ */
void executePixel(float output[4], float x, float y, PixelSampler sampler);
};