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_TextureOperation.cpp
parent8fd2267e56d3d0b6bb860800eb8059bcbfa0b501 (diff)
style cleanup: compositor operations
Diffstat (limited to 'source/blender/compositor/operations/COM_TextureOperation.cpp')
-rw-r--r--source/blender/compositor/operations/COM_TextureOperation.cpp26
1 files changed, 13 insertions, 13 deletions
diff --git a/source/blender/compositor/operations/COM_TextureOperation.cpp b/source/blender/compositor/operations/COM_TextureOperation.cpp
index 0d85f71c691..072528f3fc6 100644
--- a/source/blender/compositor/operations/COM_TextureOperation.cpp
+++ b/source/blender/compositor/operations/COM_TextureOperation.cpp
@@ -25,10 +25,10 @@
#include "BLI_listbase.h"
#include "DNA_scene_types.h"
-TextureBaseOperation::TextureBaseOperation(): NodeOperation()
+TextureBaseOperation::TextureBaseOperation() : NodeOperation()
{
- this->addInputSocket(COM_DT_VECTOR);//offset
- this->addInputSocket(COM_DT_VECTOR);//size
+ this->addInputSocket(COM_DT_VECTOR); //offset
+ this->addInputSocket(COM_DT_VECTOR); //size
this->texture = NULL;
this->inputSize = NULL;
this->inputOffset = NULL;
@@ -57,8 +57,8 @@ void TextureBaseOperation::deinitExecution()
void TextureBaseOperation::determineResolution(unsigned int resolution[], unsigned int preferredResolution[])
{
if (preferredResolution[0] == 0 || preferredResolution[1] == 0) {
- int width = this->scene->r.xsch*this->scene->r.size/100;
- int height = this->scene->r.ysch*this->scene->r.size/100;
+ int width = this->scene->r.xsch * this->scene->r.size / 100;
+ int height = this->scene->r.ysch * this->scene->r.size / 100;
resolution[0] = width;
resolution[1] = height;
}
@@ -79,22 +79,22 @@ void TextureAlphaOperation::executePixel(float *color, float x, float y, PixelSa
void TextureBaseOperation::executePixel(float *color, float x, float y, PixelSampler sampler, MemoryBuffer *inputBuffers[])
{
- TexResult texres= {0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0, NULL};
+ TexResult texres = {0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0, NULL};
float textureSize[4];
float textureOffset[4];
float vec[3];
int retval;
- const float cx = this->getWidth()/2;
- const float cy = this->getHeight()/2;
- const float u = (cx-x)/this->getWidth()*2;
- const float v = (cy-y)/this->getHeight()*2;
+ const float cx = this->getWidth() / 2;
+ const float cy = this->getHeight() / 2;
+ const float u = (cx - x) / this->getWidth() * 2;
+ const float v = (cy - y) / this->getHeight() * 2;
this->inputSize->read(textureSize, x, y, sampler, inputBuffers);
this->inputOffset->read(textureOffset, x, y, sampler, inputBuffers);
- vec[0] = textureSize[0]*(u + textureOffset[0]);
- vec[1] = textureSize[1]*(v + textureOffset[1]);
- vec[2] = textureSize[2]*textureOffset[2];
+ vec[0] = textureSize[0] * (u + textureOffset[0]);
+ vec[1] = textureSize[1] * (v + textureOffset[1]);
+ vec[2] = textureSize[2] * textureOffset[2];
retval = multitex_ext(this->texture, vec, NULL, NULL, 0, &texres);