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

#include <cs237-color.hxx>

Public Member Functions

 color3f ()
 
 color3f (color3f const &c)
 
 color3f (color3ub const &c)
 convert a color3ub to a color3f value More...
 
 color3f (float grey)
 
 color3f (float rr, float gg, float bb)
 
float & operator[] (unsigned int const &i)
 
float const & operator[] (unsigned int const &i) const
 
color3foperator= (color3ub const &c)
 convert a color3ub value to a color3f l-value More...
 
color3foperator+= (float const &s)
 
color3foperator+= (color3f const &c)
 
color3foperator-= (float const &s)
 
color3foperator-= (color3f const &c)
 
color3foperator*= (float const &s)
 
color3foperator*= (color3f const &c)
 
color3fclamp ()
 

Public Attributes

float r
 
float g
 
float b
 

Constructor & Destructor Documentation

cs237::color3f::color3f ( )
inline
cs237::color3f::color3f ( color3f const &  c)
inline
cs237::color3f::color3f ( color3ub const &  c)
inlineexplicit

convert a color3ub to a color3f value

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

Member Function Documentation

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

convert a color3ub value to a color3f l-value

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

Member Data Documentation

float cs237::color3f::b
float cs237::color3f::g
float cs237::color3f::r

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