Main Page   Class Hierarchy   Alphabetical List   Compound List   File List   Compound Members   File Members  

IGColor Class Reference

#include <IGColor.h>

List of all members.

Public Methods

 IGColor (double gray=0.0)
 default constructor produces black, can be used to produce gray tone.

 IGColor (double r, double g, double b)
 constructs color with given RGB-values.

 IGColor (const IGColor& C)
 ~IGColor ()
void SetColor (void) const
IGColor& operator= (const IGColor& C)
double Red (void) const
 returns red component as rvalue.

double& Red (void)
 returns red component as lvalue.

double Green (void) const
 returns green component as rvalue.

double& Green (void)
 returns green component as lvalue.

double Blue (void) const
 returns blue component as rvalue.

double& Blue (void)
 returns blue component as lvalue.


Private Methods

double Clamp (double v) const
 clamps v to interval 0..1.


Private Attributes

double red
 the red component in the RGB-model.

double green
 the green component in the RGB-model.

double blue
 the blue component in the RGB-model.


Friends

istream& operator >> (istream& in, IGColor& C)
 reads the color from the input stream NOTE: is not the inverse of the operator<<.

ostream& operator<< (ostream& out, const IGColor& C)
 writes the color to the output stream NOTE: is not the inverse of the operator>>.


Constructor & Destructor Documentation

IGColor::IGColor ( double gray = 0.0 )

default constructor produces black, can be used to produce gray tone.

Definition at line 29 of file IGColor.cpp.

IGColor::IGColor ( double r,
double g,
double b )

constructs color with given RGB-values.

Definition at line 35 of file IGColor.cpp.

IGColor::IGColor ( const IGColor & C )

Definition at line 46 of file IGColor.cpp.

IGColor::~IGColor ( )

Definition at line 55 of file IGColor.cpp.


Member Function Documentation

double & IGColor::Blue ( void ) [inline]

returns blue component as lvalue.

Definition at line 59 of file IGColor.h.

double IGColor::Blue ( void ) const [inline]

returns blue component as rvalue.

Definition at line 57 of file IGColor.h.

double IGColor::Clamp ( double v ) const [private]

clamps v to interval 0..1.

Definition at line 23 of file IGColor.cpp.

Referenced by IGColor(), and operator >>().

double & IGColor::Green ( void ) [inline]

returns green component as lvalue.

Definition at line 55 of file IGColor.h.

double IGColor::Green ( void ) const [inline]

returns green component as rvalue.

Definition at line 53 of file IGColor.h.

double & IGColor::Red ( void ) [inline]

returns red component as lvalue.

Definition at line 51 of file IGColor.h.

double IGColor::Red ( void ) const [inline]

returns red component as rvalue.

Definition at line 49 of file IGColor.h.

void IGColor::SetColor ( void ) const

Definition at line 57 of file IGColor.cpp.

Referenced by IGPoint::Draw().

IGColor & IGColor::operator= ( const IGColor & C )

Definition at line 62 of file IGColor.cpp.


Friends And Related Function Documentation

istream & operator >> ( istream & in,
IGColor & C ) [friend]

reads the color from the input stream NOTE: is not the inverse of the operator<<.

Definition at line 73 of file IGColor.cpp.

ostream & operator<< ( ostream & out,
const IGColor & C ) [friend]

writes the color to the output stream NOTE: is not the inverse of the operator>>.

Definition at line 84 of file IGColor.cpp.


Member Data Documentation

double IGColor::blue [private]

the blue component in the RGB-model.

Definition at line 34 of file IGColor.h.

double IGColor::green [private]

the green component in the RGB-model.

Definition at line 32 of file IGColor.h.

double IGColor::red [private]

the red component in the RGB-model.

Definition at line 30 of file IGColor.h.


The documentation for this class was generated from the following files:
Generated at Wed May 30 11:16:29 2001 for Computer Graphics Course by doxygen1.1.5 written by Dimitri van Heesch, © 1997-2000