Project::OSiRiON - Git repositories
Project::OSiRiON
News . About . Screenshots . Downloads . Forum . Wiki . Tracker . Git
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorStijn Buys <ingar@osirion.org>2008-03-09 18:40:31 +0000
committerStijn Buys <ingar@osirion.org>2008-03-09 18:40:31 +0000
commit517d35b2bbaeb3ee4b7e29301cd41bb58628bf3e (patch)
tree5473c128e64029b35ecfe22c9e48628c02af5407 /src/math/color.cc
parent289bf4b622b95b794e438ac257d75ea437e3e023 (diff)
parse of light entities in models
Diffstat (limited to 'src/math/color.cc')
-rw-r--r--src/math/color.cc12
1 files changed, 8 insertions, 4 deletions
diff --git a/src/math/color.cc b/src/math/color.cc
index 05f3b4c..ecdfd2f 100644
--- a/src/math/color.cc
+++ b/src/math/color.cc
@@ -10,13 +10,15 @@
namespace math
{
-Color::Color()
+Color::Color() :
+ r(_r), g(_g), b(_b), a(_a)
{
_r = _g = _b = 0.0f;
_a = 1.0f;
}
-Color::Color(const float red, const float green , const float blue , const float alpha)
+Color::Color(const float red, const float green , const float blue , const float alpha) :
+ r(_r), g(_g), b(_b), a(_a)
{
_r = red;
_g = green;
@@ -24,13 +26,15 @@ Color::Color(const float red, const float green , const float blue , const float
_a = alpha;
}
-Color::Color(const float grey, const float alpha)
+Color::Color(const float grey, const float alpha) :
+ r(_r), g(_g), b(_b), a(_a)
{
_r = _g = _b = grey;
_a = alpha;
}
-Color::Color(const Color &other)
+Color::Color(const Color &other) :
+ r(_r), g(_g), b(_b), a(_a)
{
this->operator=(other);
}