diff options
author | Campbell Barton <ideasman42@gmail.com> | 2012-05-18 02:55:28 +0400 |
---|---|---|
committer | Campbell Barton <ideasman42@gmail.com> | 2012-05-18 02:55:28 +0400 |
commit | 7862b2fa13c0437d9c17eae78e7b79a421dacf05 (patch) | |
tree | 08f9c26af3e71795d0f65803a415b5612d6b53ab /source/blender/compositor/operations/COM_RotateOperation.cpp | |
parent | 69b95e1a8a00c9ff146d803b8ec11183d7a68908 (diff) |
style cleanup: compositor, pointer syntax, function brace placement, line length
Diffstat (limited to 'source/blender/compositor/operations/COM_RotateOperation.cpp')
-rw-r--r-- | source/blender/compositor/operations/COM_RotateOperation.cpp | 15 |
1 files changed, 10 insertions, 5 deletions
diff --git a/source/blender/compositor/operations/COM_RotateOperation.cpp b/source/blender/compositor/operations/COM_RotateOperation.cpp index ac2e8c5e8a9..313e49d8609 100644 --- a/source/blender/compositor/operations/COM_RotateOperation.cpp +++ b/source/blender/compositor/operations/COM_RotateOperation.cpp @@ -23,7 +23,8 @@ #include "COM_RotateOperation.h" #include "BLI_math.h" -RotateOperation::RotateOperation() : NodeOperation() { +RotateOperation::RotateOperation() : NodeOperation() +{ this->addInputSocket(COM_DT_COLOR); this->addInputSocket(COM_DT_VALUE); this->addOutputSocket(COM_DT_COLOR); @@ -32,7 +33,8 @@ RotateOperation::RotateOperation() : NodeOperation() { this->degreeSocket = NULL; this->doDegree2RadConversion = false; } -void RotateOperation::initExecution() { +void RotateOperation::initExecution() +{ this->imageSocket = this->getInputSocketReader(0); this->degreeSocket = this->getInputSocketReader(1); this->centerX = this->getWidth()/2.0; @@ -50,13 +52,15 @@ void RotateOperation::initExecution() { this->sine = sin(rad); } -void RotateOperation::deinitExecution() { +void RotateOperation::deinitExecution() +{ this->imageSocket = NULL; this->degreeSocket = NULL; } -void RotateOperation::executePixel(float *color,float x, float y, PixelSampler sampler, MemoryBuffer *inputBuffers[]) { +void RotateOperation::executePixel(float *color,float x, float y, PixelSampler sampler, MemoryBuffer *inputBuffers[]) +{ const float dy = y - this->centerY; const float dx = x - this->centerX; const float nx = this->centerX+(this->cosine*dx + this->sine*dy); @@ -64,7 +68,8 @@ void RotateOperation::executePixel(float *color,float x, float y, PixelSampler s this->imageSocket->read(color, nx, ny, sampler, inputBuffers); } -bool RotateOperation::determineDependingAreaOfInterest(rcti *input, ReadBufferOperation *readOperation, rcti *output) { +bool RotateOperation::determineDependingAreaOfInterest(rcti *input, ReadBufferOperation *readOperation, rcti *output) +{ rcti newInput; const float dxmin = input->xmin - this->centerX; |