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-26 05:22:05 +0400
committerCampbell Barton <ideasman42@gmail.com>2012-06-26 05:22:05 +0400
commit6a1d82490e49d1f5d73b5082516b087d44010fb8 (patch)
tree0650cce3c1d47db6c5de1f4f2ba05b619c412f09 /source/blender/compositor/operations/COM_EllipseMaskOperation.cpp
parent7a0ab62d3f65f3b28da2a6ba9916c21132f8ea0d (diff)
use m_ prefix for compositor class members (all compositor operations).
Diffstat (limited to 'source/blender/compositor/operations/COM_EllipseMaskOperation.cpp')
-rw-r--r--source/blender/compositor/operations/COM_EllipseMaskOperation.cpp46
1 files changed, 23 insertions, 23 deletions
diff --git a/source/blender/compositor/operations/COM_EllipseMaskOperation.cpp b/source/blender/compositor/operations/COM_EllipseMaskOperation.cpp
index 0beacd02738..1aa1b89ee76 100644
--- a/source/blender/compositor/operations/COM_EllipseMaskOperation.cpp
+++ b/source/blender/compositor/operations/COM_EllipseMaskOperation.cpp
@@ -29,19 +29,19 @@ EllipseMaskOperation::EllipseMaskOperation() : NodeOperation()
this->addInputSocket(COM_DT_VALUE);
this->addInputSocket(COM_DT_VALUE);
this->addOutputSocket(COM_DT_VALUE);
- this->inputMask = NULL;
- this->inputValue = NULL;
- this->cosine = 0.0f;
- this->sine = 0.0f;
+ this->m_inputMask = NULL;
+ this->m_inputValue = NULL;
+ this->m_cosine = 0.0f;
+ this->m_sine = 0.0f;
}
void EllipseMaskOperation::initExecution()
{
- this->inputMask = this->getInputSocketReader(0);
- this->inputValue = this->getInputSocketReader(1);
- const double rad = DEG2RAD((double)this->data->rotation);
- this->cosine = cos(rad);
- this->sine = sin(rad);
- this->aspectRatio = ((float)this->getWidth()) / this->getHeight();
+ this->m_inputMask = this->getInputSocketReader(0);
+ this->m_inputValue = this->getInputSocketReader(1);
+ const double rad = DEG2RAD((double)this->m_data->rotation);
+ this->m_cosine = cos(rad);
+ this->m_sine = sin(rad);
+ this->m_aspectRatio = ((float)this->getWidth()) / this->getHeight();
}
void EllipseMaskOperation::executePixel(float *color, float x, float y, PixelSampler sampler, MemoryBuffer *inputBuffers[])
@@ -52,26 +52,26 @@ void EllipseMaskOperation::executePixel(float *color, float x, float y, PixelSam
float rx = x / this->getWidth();
float ry = y / this->getHeight();
- const float dy = (ry - this->data->y) / this->aspectRatio;
- const float dx = rx - this->data->x;
- rx = this->data->x + (this->cosine * dx + this->sine * dy);
- ry = this->data->y + (-this->sine * dx + this->cosine * dy);
+ const float dy = (ry - this->m_data->y) / this->m_aspectRatio;
+ const float dx = rx - this->m_data->x;
+ rx = this->m_data->x + (this->m_cosine * dx + this->m_sine * dy);
+ ry = this->m_data->y + (-this->m_sine * dx + this->m_cosine * dy);
- this->inputMask->read(inputMask, x, y, sampler, inputBuffers);
- this->inputValue->read(inputValue, x, y, sampler, inputBuffers);
+ this->m_inputMask->read(inputMask, x, y, sampler, inputBuffers);
+ this->m_inputValue->read(inputValue, x, y, sampler, inputBuffers);
- const float halfHeight = (this->data->height) / 2.0f;
- const float halfWidth = this->data->width / 2.0f;
- float sx = rx - this->data->x;
+ const float halfHeight = (this->m_data->height) / 2.0f;
+ const float halfWidth = this->m_data->width / 2.0f;
+ float sx = rx - this->m_data->x;
sx *= sx;
const float tx = halfWidth * halfWidth;
- float sy = ry - this->data->y;
+ float sy = ry - this->m_data->y;
sy *= sy;
const float ty = halfHeight * halfHeight;
bool inside = ((sx / tx) + (sy / ty)) < 1.0f;
- switch (this->maskType) {
+ switch (this->m_maskType) {
case CMP_NODE_MASKTYPE_ADD:
if (inside) {
color[0] = max(inputMask[0], inputValue[0]);
@@ -117,7 +117,7 @@ void EllipseMaskOperation::executePixel(float *color, float x, float y, PixelSam
void EllipseMaskOperation::deinitExecution()
{
- this->inputMask = NULL;
- this->inputValue = NULL;
+ this->m_inputMask = NULL;
+ this->m_inputValue = NULL;
}