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:
authorCampbell Barton <ideasman42@gmail.com>2012-05-18 02:55:28 +0400
committerCampbell Barton <ideasman42@gmail.com>2012-05-18 02:55:28 +0400
commit7862b2fa13c0437d9c17eae78e7b79a421dacf05 (patch)
tree08f9c26af3e71795d0f65803a415b5612d6b53ab /source/blender/compositor/operations/COM_ConvertVectorToValueOperation.cpp
parent69b95e1a8a00c9ff146d803b8ec11183d7a68908 (diff)
style cleanup: compositor, pointer syntax, function brace placement, line length
Diffstat (limited to 'source/blender/compositor/operations/COM_ConvertVectorToValueOperation.cpp')
-rw-r--r--source/blender/compositor/operations/COM_ConvertVectorToValueOperation.cpp12
1 files changed, 8 insertions, 4 deletions
diff --git a/source/blender/compositor/operations/COM_ConvertVectorToValueOperation.cpp b/source/blender/compositor/operations/COM_ConvertVectorToValueOperation.cpp
index a57cd229e1f..67cc42ac8fc 100644
--- a/source/blender/compositor/operations/COM_ConvertVectorToValueOperation.cpp
+++ b/source/blender/compositor/operations/COM_ConvertVectorToValueOperation.cpp
@@ -22,22 +22,26 @@
#include "COM_ConvertVectorToValueOperation.h"
-ConvertVectorToValueOperation::ConvertVectorToValueOperation(): NodeOperation() {
+ConvertVectorToValueOperation::ConvertVectorToValueOperation(): NodeOperation()
+{
this->addInputSocket(COM_DT_VECTOR);
this->addOutputSocket(COM_DT_VALUE);
this->inputOperation = NULL;
}
-void ConvertVectorToValueOperation::initExecution() {
+void ConvertVectorToValueOperation::initExecution()
+{
this->inputOperation = this->getInputSocketReader(0);
}
-void ConvertVectorToValueOperation::executePixel(float* outputValue, float x, float y, PixelSampler sampler, MemoryBuffer *inputBuffers[]) {
+void ConvertVectorToValueOperation::executePixel(float *outputValue, float x, float y, PixelSampler sampler, MemoryBuffer *inputBuffers[])
+{
float input[4];
inputOperation->read(input, x, y, sampler, inputBuffers);
outputValue[0] = (input[0]+input[1]+input[2])/3.0f;
}
-void ConvertVectorToValueOperation::deinitExecution() {
+void ConvertVectorToValueOperation::deinitExecution()
+{
this->inputOperation = NULL;
}