diff options
author | Campbell Barton <ideasman42@gmail.com> | 2012-08-14 15:17:06 +0400 |
---|---|---|
committer | Campbell Barton <ideasman42@gmail.com> | 2012-08-14 15:17:06 +0400 |
commit | 53333c78ce113ef1c47e2b6dbdad0912b0038712 (patch) | |
tree | 48f4928627461e43f026e7c6dac4eae06263e585 /source/blender/compositor/operations/COM_SetColorOperation.h | |
parent | 9fd6c535cabbcf4ec12c21bc9229c94944bc6c91 (diff) |
use vector for color operation internal storage.
Diffstat (limited to 'source/blender/compositor/operations/COM_SetColorOperation.h')
-rw-r--r-- | source/blender/compositor/operations/COM_SetColorOperation.h | 26 |
1 files changed, 10 insertions, 16 deletions
diff --git a/source/blender/compositor/operations/COM_SetColorOperation.h b/source/blender/compositor/operations/COM_SetColorOperation.h index a6ff390c3c9..7895c34620b 100644 --- a/source/blender/compositor/operations/COM_SetColorOperation.h +++ b/source/blender/compositor/operations/COM_SetColorOperation.h @@ -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 @@ public: */ 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); } /** |