[Bf-blender-cvs] SVN commit: /data/svn/bf-blender [49889] trunk/blender/source/blender/ compositor/operations: use vector for color operation internal storage.
Campbell Barton
ideasman42 at gmail.com
Tue Aug 14 13:17:06 CEST 2012
Revision: 49889
http://projects.blender.org/scm/viewvc.php?view=rev&root=bf-blender&revision=49889
Author: campbellbarton
Date: 2012-08-14 11:17:06 +0000 (Tue, 14 Aug 2012)
Log Message:
-----------
use vector for color operation internal storage.
Modified Paths:
--------------
trunk/blender/source/blender/compositor/operations/COM_SetColorOperation.cpp
trunk/blender/source/blender/compositor/operations/COM_SetColorOperation.h
Modified: trunk/blender/source/blender/compositor/operations/COM_SetColorOperation.cpp
===================================================================
--- trunk/blender/source/blender/compositor/operations/COM_SetColorOperation.cpp 2012-08-14 11:12:31 UTC (rev 49888)
+++ trunk/blender/source/blender/compositor/operations/COM_SetColorOperation.cpp 2012-08-14 11:17:06 UTC (rev 49889)
@@ -29,10 +29,7 @@
void SetColorOperation::executePixel(float output[4], float x, float y, PixelSampler sampler)
{
- output[0] = this->m_channel1;
- output[1] = this->m_channel2;
- output[2] = this->m_channel3;
- output[3] = this->m_channel4;
+ copy_v4_v4(output, this->m_color);
}
void SetColorOperation::determineResolution(unsigned int resolution[2], unsigned int preferredResolution[2])
Modified: trunk/blender/source/blender/compositor/operations/COM_SetColorOperation.h
===================================================================
--- trunk/blender/source/blender/compositor/operations/COM_SetColorOperation.h 2012-08-14 11:12:31 UTC (rev 49888)
+++ trunk/blender/source/blender/compositor/operations/COM_SetColorOperation.h 2012-08-14 11:17:06 UTC (rev 49889)
@@ -31,10 +31,7 @@
*/
class SetColorOperation : public NodeOperation {
private:
- float m_channel1;
- float m_channel2;
- float m_channel3;
- float m_channel4;
+ float m_color[4];
public:
/**
@@ -42,20 +39,17 @@
*/
SetColorOperation();
- const float getChannel1() { return this->m_channel1; }
- void setChannel1(float value) { this->m_channel1 = value; }
- const float getChannel2() { return this->m_channel2; }
- void setChannel2(float value) { this->m_channel2 = value; }
- const float getChannel3() { return this->m_channel3; }
- void setChannel3(float value) { this->m_channel3 = value; }
- const float getChannel4() { return this->m_channel4; }
- void setChannel4(const float value) { this->m_channel4 = value; }
+ const float getChannel1() { return this->m_color[0]; }
+ void setChannel1(float value) { this->m_color[0] = value; }
+ const float getChannel2() { return this->m_color[1]; }
+ void setChannel2(float value) { this->m_color[1] = value; }
+ const float getChannel3() { return this->m_color[2]; }
+ void setChannel3(float value) { this->m_color[2] = value; }
+ const float getChannel4() { return this->m_color[3]; }
+ void setChannel4(const float value) { this->m_color[3] = value; }
void setChannels(const float value[4])
{
- this->m_channel1 = value[0];
- this->m_channel2 = value[1];
- this->m_channel3 = value[2];
- this->m_channel4 = value[3];
+ copy_v4_v4(this->m_color, value);
}
/**
More information about the Bf-blender-cvs
mailing list