diff options
author | Campbell Barton <ideasman42@gmail.com> | 2012-06-26 05:22:05 +0400 |
---|---|---|
committer | Campbell Barton <ideasman42@gmail.com> | 2012-06-26 05:22:05 +0400 |
commit | 6a1d82490e49d1f5d73b5082516b087d44010fb8 (patch) | |
tree | 0650cce3c1d47db6c5de1f4f2ba05b619c412f09 /source/blender/compositor/operations/COM_MapUVOperation.cpp | |
parent | 7a0ab62d3f65f3b28da2a6ba9916c21132f8ea0d (diff) |
use m_ prefix for compositor class members (all compositor operations).
Diffstat (limited to 'source/blender/compositor/operations/COM_MapUVOperation.cpp')
-rw-r--r-- | source/blender/compositor/operations/COM_MapUVOperation.cpp | 40 |
1 files changed, 20 insertions, 20 deletions
diff --git a/source/blender/compositor/operations/COM_MapUVOperation.cpp b/source/blender/compositor/operations/COM_MapUVOperation.cpp index b29dcfab194..dec2d0849c9 100644 --- a/source/blender/compositor/operations/COM_MapUVOperation.cpp +++ b/source/blender/compositor/operations/COM_MapUVOperation.cpp @@ -27,17 +27,17 @@ MapUVOperation::MapUVOperation() : NodeOperation() this->addInputSocket(COM_DT_COLOR); this->addInputSocket(COM_DT_VECTOR); this->addOutputSocket(COM_DT_COLOR); - this->alpha = 0.f; + this->m_alpha = 0.0f; this->setComplex(true); - this->inputUVProgram = NULL; - this->inputColorProgram = NULL; + this->m_inputUVProgram = NULL; + this->m_inputColorProgram = NULL; } void MapUVOperation::initExecution() { - this->inputColorProgram = this->getInputSocketReader(0); - this->inputUVProgram = this->getInputSocketReader(1); + this->m_inputColorProgram = this->getInputSocketReader(0); + this->m_inputUVProgram = this->getInputSocketReader(1); } void MapUVOperation::executePixel(float *color, float x, float y, PixelSampler sampler, MemoryBuffer *inputBuffers[]) @@ -50,30 +50,30 @@ void MapUVOperation::executePixel(float *color, float x, float y, PixelSampler s float uv_l, uv_r; float uv_u, uv_d; - this->inputUVProgram->read(inputUV, x, y, sampler, inputBuffers); + this->m_inputUVProgram->read(inputUV, x, y, sampler, inputBuffers); if (inputUV[2] == 0.f) { zero_v4(color); return; } /* adaptive sampling, red (U) channel */ - this->inputUVProgram->read(uv_a, x - 1, y, COM_PS_NEAREST, inputBuffers); - this->inputUVProgram->read(uv_b, x + 1, y, COM_PS_NEAREST, inputBuffers); + this->m_inputUVProgram->read(uv_a, x - 1, y, COM_PS_NEAREST, inputBuffers); + this->m_inputUVProgram->read(uv_b, x + 1, y, COM_PS_NEAREST, inputBuffers); uv_l = uv_a[2] != 0.f ? fabsf(inputUV[0] - uv_a[0]) : 0.f; uv_r = uv_b[2] != 0.f ? fabsf(inputUV[0] - uv_b[0]) : 0.f; dx = 0.5f * (uv_l + uv_r); /* adaptive sampling, green (V) channel */ - this->inputUVProgram->read(uv_a, x, y - 1, COM_PS_NEAREST, inputBuffers); - this->inputUVProgram->read(uv_b, x, y + 1, COM_PS_NEAREST, inputBuffers); + this->m_inputUVProgram->read(uv_a, x, y - 1, COM_PS_NEAREST, inputBuffers); + this->m_inputUVProgram->read(uv_b, x, y + 1, COM_PS_NEAREST, inputBuffers); uv_u = uv_a[2] != 0.f ? fabsf(inputUV[1] - uv_a[1]) : 0.f; uv_d = uv_b[2] != 0.f ? fabsf(inputUV[1] - uv_b[1]) : 0.f; dy = 0.5f * (uv_u + uv_d); /* more adaptive sampling, red and green (UV) channels */ - this->inputUVProgram->read(uv_a, x - 1, y - 1, COM_PS_NEAREST, inputBuffers); - this->inputUVProgram->read(uv_b, x - 1, y + 1, COM_PS_NEAREST, inputBuffers); + this->m_inputUVProgram->read(uv_a, x - 1, y - 1, COM_PS_NEAREST, inputBuffers); + this->m_inputUVProgram->read(uv_b, x - 1, y + 1, COM_PS_NEAREST, inputBuffers); uv_l = uv_a[2] != 0.f ? fabsf(inputUV[0] - uv_a[0]) : 0.f; uv_r = uv_b[2] != 0.f ? fabsf(inputUV[0] - uv_b[0]) : 0.f; uv_u = uv_a[2] != 0.f ? fabsf(inputUV[1] - uv_a[1]) : 0.f; @@ -82,8 +82,8 @@ void MapUVOperation::executePixel(float *color, float x, float y, PixelSampler s dx += 0.25f * (uv_l + uv_r); dy += 0.25f * (uv_u + uv_d); - this->inputUVProgram->read(uv_a, x + 1, y - 1, COM_PS_NEAREST, inputBuffers); - this->inputUVProgram->read(uv_b, x + 1, y + 1, COM_PS_NEAREST, inputBuffers); + this->m_inputUVProgram->read(uv_a, x + 1, y - 1, COM_PS_NEAREST, inputBuffers); + this->m_inputUVProgram->read(uv_b, x + 1, y + 1, COM_PS_NEAREST, inputBuffers); uv_l = uv_a[2] != 0.f ? fabsf(inputUV[0] - uv_a[0]) : 0.f; uv_r = uv_b[2] != 0.f ? fabsf(inputUV[0] - uv_b[0]) : 0.f; uv_u = uv_a[2] != 0.f ? fabsf(inputUV[1] - uv_a[1]) : 0.f; @@ -93,7 +93,7 @@ void MapUVOperation::executePixel(float *color, float x, float y, PixelSampler s dy += 0.25f * (uv_u + uv_d); /* UV to alpha threshold */ - const float threshold = this->alpha * 0.05f; + const float threshold = this->m_alpha * 0.05f; float alpha = 1.0f - threshold * (dx + dy); if (alpha < 0.f) alpha = 0.f; else alpha *= inputUV[2]; @@ -104,10 +104,10 @@ void MapUVOperation::executePixel(float *color, float x, float y, PixelSampler s /* EWA filtering */ - u = inputUV[0] * inputColorProgram->getWidth(); - v = inputUV[1] * inputColorProgram->getHeight(); + u = inputUV[0] * this->m_inputColorProgram->getWidth(); + v = inputUV[1] * this->m_inputColorProgram->getHeight(); - this->inputColorProgram->read(color, u, v, dx, dy, inputBuffers); + this->m_inputColorProgram->read(color, u, v, dx, dy, inputBuffers); /* "premul" */ if (alpha < 1.0f) { @@ -117,8 +117,8 @@ void MapUVOperation::executePixel(float *color, float x, float y, PixelSampler s void MapUVOperation::deinitExecution() { - this->inputUVProgram = NULL; - this->inputColorProgram = NULL; + this->m_inputUVProgram = NULL; + this->m_inputColorProgram = NULL; } bool MapUVOperation::determineDependingAreaOfInterest(rcti *input, ReadBufferOperation *readOperation, rcti *output) |