CMSC23700 Common Code Library
Support code for CS23700 programming projects
cs237::color4f Struct Reference

#include <cs237-color.hxx>

Public Member Functions

 color4f ()
 
 color4f (color3f const &c)
 
 color4f (color3f const &c, float alpha)
 
 color4f (color4f const &c)
 
 color4f (color4ub const &c)
 convert a color4ub to a color4f value More...
 
 color4f (float grey)
 
 color4f (float rr, float gg, float bb)
 
 color4f (float rr, float gg, float bb, float aa)
 
float & operator[] (unsigned int const &i)
 
float const & operator[] (unsigned int const &i) const
 
color4foperator= (color4ub const &c)
 convert a color4ub value to a color4f l-value More...
 
color4foperator+= (float const &s)
 
color4foperator+= (color4f const &c)
 
color4foperator-= (float const &s)
 
color4foperator-= (color4f const &c)
 
color4foperator*= (float const &s)
 
color4foperator*= (color4f const &c)
 
color4fclamp ()
 

Public Attributes

float r
 
float g
 
float b
 
float a
 

Constructor & Destructor Documentation

cs237::color4f::color4f ( )
inline
cs237::color4f::color4f ( color3f const &  c)
inlineexplicit
cs237::color4f::color4f ( color3f const &  c,
float  alpha 
)
inlineexplicit
cs237::color4f::color4f ( color4f const &  c)
inline
cs237::color4f::color4f ( color4ub const &  c)
inlineexplicit

convert a color4ub to a color4f value

cs237::color4f::color4f ( float  grey)
inlineexplicit
cs237::color4f::color4f ( float  rr,
float  gg,
float  bb 
)
inlineexplicit
cs237::color4f::color4f ( float  rr,
float  gg,
float  bb,
float  aa 
)
inline

Member Function Documentation

color4f & cs237::color4f::clamp ( )
inline
color4f & cs237::color4f::operator*= ( float const &  s)
inline
color4f & cs237::color4f::operator*= ( color4f const &  c)
inline
color4f & cs237::color4f::operator+= ( float const &  s)
inline
color4f & cs237::color4f::operator+= ( color4f const &  c)
inline
color4f & cs237::color4f::operator-= ( float const &  s)
inline
color4f & cs237::color4f::operator-= ( color4f const &  c)
inline
color4f & cs237::color4f::operator= ( color4ub const &  c)
inline

convert a color4ub value to a color4f l-value

float & cs237::color4f::operator[] ( unsigned int const &  i)
inline
float const & cs237::color4f::operator[] ( unsigned int const &  i) const
inline

Member Data Documentation

float cs237::color4f::a
float cs237::color4f::b
float cs237::color4f::g
float cs237::color4f::r

The documentation for this struct was generated from the following files: