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-06-15 22:42:03 +0400
committerCampbell Barton <ideasman42@gmail.com>2012-06-15 22:42:03 +0400
commit570cc70772d78703053956ce57b20c6c4ed74c95 (patch)
treeb4c5db0392384251f1b1ccefc17c959d3e742977 /source/blender/compositor/operations/COM_ProjectorLensDistortionOperation.cpp
parent8fd2267e56d3d0b6bb860800eb8059bcbfa0b501 (diff)
style cleanup: compositor operations
Diffstat (limited to 'source/blender/compositor/operations/COM_ProjectorLensDistortionOperation.cpp')
-rw-r--r--source/blender/compositor/operations/COM_ProjectorLensDistortionOperation.cpp18
1 files changed, 9 insertions, 9 deletions
diff --git a/source/blender/compositor/operations/COM_ProjectorLensDistortionOperation.cpp b/source/blender/compositor/operations/COM_ProjectorLensDistortionOperation.cpp
index 7695e0f63c2..77f2a06b29b 100644
--- a/source/blender/compositor/operations/COM_ProjectorLensDistortionOperation.cpp
+++ b/source/blender/compositor/operations/COM_ProjectorLensDistortionOperation.cpp
@@ -24,7 +24,7 @@
#include "BLI_math.h"
#include "BLI_utildefines.h"
-ProjectorLensDistortionOperation::ProjectorLensDistortionOperation(): NodeOperation()
+ProjectorLensDistortionOperation::ProjectorLensDistortionOperation() : NodeOperation()
{
this->addInputSocket(COM_DT_COLOR);
this->addOutputSocket(COM_DT_COLOR);
@@ -34,7 +34,7 @@ ProjectorLensDistortionOperation::ProjectorLensDistortionOperation(): NodeOperat
void ProjectorLensDistortionOperation::initExecution()
{
this->inputProgram = this->getInputSocketReader(0);
- kr = 0.25f*MAX2(MIN2(this->dispersion, 1.f), 0.f);
+ kr = 0.25f * MAX2(MIN2(this->dispersion, 1.f), 0.f);
kr2 = kr * 20;
}
@@ -49,14 +49,14 @@ void ProjectorLensDistortionOperation::executePixel(float *color, int x, int y,
float inputValue[4];
const float height = this->getHeight();
const float width = this->getWidth();
- const float v = (y + 0.5f)/height;
- const float u = (x + 0.5f)/width;
- MemoryBuffer * inputBuffer = (MemoryBuffer*)data;
- inputBuffer->readCubic(inputValue, (u*width + kr2) - 0.5f, v*height - 0.5f);
+ const float v = (y + 0.5f) / height;
+ const float u = (x + 0.5f) / width;
+ MemoryBuffer *inputBuffer = (MemoryBuffer *)data;
+ inputBuffer->readCubic(inputValue, (u * width + kr2) - 0.5f, v * height - 0.5f);
color[0] = inputValue[0];
inputBuffer->read(inputValue, x, y);
color[1] = inputValue[1];
- inputBuffer->readCubic(inputValue, (u*width - kr2) - 0.5f, v*height - 0.5f);
+ inputBuffer->readCubic(inputValue, (u * width - kr2) - 0.5f, v * height - 0.5f);
color[2] = inputValue[2];
color[3] = 1.0f;
}
@@ -71,7 +71,7 @@ bool ProjectorLensDistortionOperation::determineDependingAreaOfInterest(rcti *in
rcti newInput;
newInput.ymax = input->ymax;
newInput.ymin = input->ymin;
- newInput.xmin = input->xmin-kr2-2;
- newInput.xmax = input->xmax+kr2+2;
+ newInput.xmin = input->xmin - kr2 - 2;
+ newInput.xmax = input->xmax + kr2 + 2;
return NodeOperation::determineDependingAreaOfInterest(&newInput, readOperation, output);
}