#include <IGColor.h>
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>>. |
|
default constructor produces black, can be used to produce gray tone.
Definition at line 29 of file IGColor.cpp.
|
|
Definition at line 46 of file IGColor.cpp.
|
Definition at line 55 of file IGColor.cpp.
|
|
|
clamps v to interval 0..1.
Definition at line 23 of file IGColor.cpp.
Referenced by IGColor(), and operator >>().
|
|
|
|
|
|
Definition at line 62 of file IGColor.cpp.
|
reads the color from the input stream NOTE: is not the inverse of the operator<<.
Definition at line 73 of file IGColor.cpp.
|
writes the color to the output stream NOTE: is not the inverse of the operator>>.
Definition at line 84 of file IGColor.cpp.
|
|
|