Added red, green, blue and alpha values.

This commit is contained in:
Robert Osfield 2005-02-01 09:00:32 +00:00
parent c3c3ed8519
commit 7be056275b
2 changed files with 21 additions and 0 deletions

View File

@ -94,6 +94,17 @@ class Vec4d
inline value_type z() const { return _v[2]; }
inline value_type w() const { return _v[3]; }
inline value_type& red() { return _v[0]; }
inline value_type& green() { return _v[1]; }
inline value_type& blue() { return _v[2]; }
inline value_type& alpha() { return _v[3]; }
inline value_type red() const { return _v[0]; }
inline value_type green() const { return _v[1]; }
inline value_type blue() const { return _v[2]; }
inline value_type alpha() const { return _v[3]; }
inline unsigned long asABGR() const
{
return (unsigned long)clampTo((_v[0]*255.0),0.0,255.0)<<24 |

View File

@ -88,6 +88,16 @@ class Vec4f
inline value_type z() const { return _v[2]; }
inline value_type w() const { return _v[3]; }
inline value_type& red() { return _v[0]; }
inline value_type& green() { return _v[1]; }
inline value_type& blue() { return _v[2]; }
inline value_type& alpha() { return _v[3]; }
inline value_type red() const { return _v[0]; }
inline value_type green() const { return _v[1]; }
inline value_type blue() const { return _v[2]; }
inline value_type alpha() const { return _v[3]; }
inline unsigned long asABGR() const
{
return (unsigned long)clampTo((_v[0]*255.0f),0.0f,255.0f)<<24 |