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_MovieDistortionOperation.cpp | |
parent | 69b95e1a8a00c9ff146d803b8ec11183d7a68908 (diff) |
style cleanup: compositor, pointer syntax, function brace placement, line length
Diffstat (limited to 'source/blender/compositor/operations/COM_MovieDistortionOperation.cpp')
-rw-r--r-- | source/blender/compositor/operations/COM_MovieDistortionOperation.cpp | 19 |
1 files changed, 12 insertions, 7 deletions
diff --git a/source/blender/compositor/operations/COM_MovieDistortionOperation.cpp b/source/blender/compositor/operations/COM_MovieDistortionOperation.cpp index b848192d40b..1699707ab3a 100644 --- a/source/blender/compositor/operations/COM_MovieDistortionOperation.cpp +++ b/source/blender/compositor/operations/COM_MovieDistortionOperation.cpp @@ -32,7 +32,8 @@ extern "C" { vector<DistortionCache*> s_cache; -MovieDistortionOperation::MovieDistortionOperation(bool distortion) : NodeOperation() { +MovieDistortionOperation::MovieDistortionOperation(bool distortion) : NodeOperation() +{ this->addInputSocket(COM_DT_COLOR); this->addOutputSocket(COM_DT_COLOR); this->setResolutionInputSocketIndex(0); @@ -41,17 +42,18 @@ MovieDistortionOperation::MovieDistortionOperation(bool distortion) : NodeOperat this->cache = NULL; this->distortion = distortion; } -void MovieDistortionOperation::initExecution() { +void MovieDistortionOperation::initExecution() +{ this->inputOperation = this->getInputSocketReader(0); if (this->movieClip) { for (int i = 0 ; i < s_cache.size() ; i ++) { - DistortionCache* c = (DistortionCache*)s_cache[i]; + DistortionCache *c = (DistortionCache*)s_cache[i]; if (c->isCacheFor(this->movieClip, this->width, this->height, this->distortion)) { this->cache = c; return; } } - DistortionCache* newC = new DistortionCache(this->movieClip, this->width, this->height, this->distortion); + DistortionCache *newC = new DistortionCache(this->movieClip, this->width, this->height, this->distortion); s_cache.push_back(newC); this->cache = newC; } @@ -60,13 +62,15 @@ void MovieDistortionOperation::initExecution() { } } -void MovieDistortionOperation::deinitExecution() { +void MovieDistortionOperation::deinitExecution() +{ this->inputOperation = NULL; this->movieClip = NULL; } -void MovieDistortionOperation::executePixel(float *color,float x, float y, PixelSampler sampler, MemoryBuffer *inputBuffers[]) { +void MovieDistortionOperation::executePixel(float *color,float x, float y, PixelSampler sampler, MemoryBuffer *inputBuffers[]) +{ if (this->cache != NULL) { float u, v; @@ -78,7 +82,8 @@ void MovieDistortionOperation::executePixel(float *color,float x, float y, Pixel } } -bool MovieDistortionOperation::determineDependingAreaOfInterest(rcti *input, ReadBufferOperation *readOperation, rcti *output) { +bool MovieDistortionOperation::determineDependingAreaOfInterest(rcti *input, ReadBufferOperation *readOperation, rcti *output) +{ rcti newInput; newInput.xmax = input->xmax + 100; |