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>2009-08-18 09:24:15 +0000
committerStijn Buys <ingar@osirion.org>2009-08-18 09:24:15 +0000
commitf030154fe727e25a2afe1f78b3998c2d2dba95e4 (patch)
treecd92baf9e4fa8a136523b9eb570e9811846c9250 /src/math/color.h
parent5636fad174f0bcff857c357c394c4cc8d424b302 (diff)
astyle cleanup, corrects not loading of material textures
Diffstat (limited to 'src/math/color.h')
-rw-r--r--src/math/color.h32
1 files changed, 16 insertions, 16 deletions
diff --git a/src/math/color.h b/src/math/color.h
index 762ac94..8996af2 100644
--- a/src/math/color.h
+++ b/src/math/color.h
@@ -19,12 +19,12 @@ public:
/// create the default color, white
Color();
/// create a color from float RGBA value
- Color(float red, float green, float blue, float alpha=1.0f);
+ Color(float red, float green, float blue, float alpha = 1.0f);
/// create a greyscale color
- Color(const float grey, const float=1.0f);
+ Color(const float grey, const float = 1.0f);
/// create a copy from an existing color
Color(Color const & other);
-
+
/// red channel value
float red() const;
/// green channel value
@@ -33,22 +33,22 @@ public:
float blue() const;
/// alpha channel value
float alpha() const;
-
+
/// assignment
void assign(Color const & other);
/// assignment
- void assign(float red, float green, float blue, float alpha=1.0f);
+ void assign(float red, float green, float blue, float alpha = 1.0f);
/// assignment
- void assign(float grey, float alpha=1.0f);
+ void assign(float grey, float alpha = 1.0f);
/// assignment operator
Color const &operator=(Color const & other);
-
+
/// multiply rgb values with scalar value.
Color operator*(const float scalar) const;
-
+
/// multiply rgb values with scalar value.
Color & operator*=(const float scalar);
-
+
/// assign a value to an element of this color
/*! WARNING: range is not checked
* @param index the index of the element to assign to ( 0 <= index < 4 )
@@ -56,7 +56,7 @@ public:
inline float& operator[](const size_t index) {
return rgba_data[index];
}
-
+
/// returns the value of an element of this color
/*! WARNING: range is not checked
* @param index the index of the element to return ( 0 <= index < 4 )
@@ -64,22 +64,22 @@ public:
inline float operator[](const size_t index) const {
return rgba_data[index];
}
-
-
+
+
/// pointer to the internal data
inline float *ptr() const {
return (float *) rgba_data;
}
-
+
/// clamp color values to the 0-1 range
void clamp();
-
+
float &r;
float &g;
float &b;
float &a;
-
-
+
+
private:
float rgba_data[4];
};