From f030154fe727e25a2afe1f78b3998c2d2dba95e4 Mon Sep 17 00:00:00 2001 From: Stijn Buys Date: Tue, 18 Aug 2009 09:24:15 +0000 Subject: astyle cleanup, corrects not loading of material textures --- src/math/color.h | 32 ++++++++++++++++---------------- 1 file changed, 16 insertions(+), 16 deletions(-) (limited to 'src/math/color.h') 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]; }; -- cgit v1.2.3