#include <color.h>
Public Member Functions | |
| Color () | |
| Initializes the color to black (0,0,0). | |
| Color (float _r, float _g, float _b) | |
| Initializes the color to (r,g,b). | |
| Color | operator+ (const Color &c) const |
| Component-wise addition with color. | |
| Color & | operator+= (const Color &c) |
| Component-wise addition with color in place. | |
| Color | operator- () |
| Component-wise negation. | |
| Color | operator- (const Color &c) const |
| Component-wise subtraction with color. | |
| Color & | operator-= (const Color &c) |
| Component-wise subtraction with color in place. | |
| Color | operator * (float s) const |
| Component-wise multiplication with scalar. | |
| Color & | operator *= (float s) |
| Component-wise multiplication with scalar (in place). | |
| Color | operator * (const Color &c) const |
| Component-wise multiplication with color. | |
| Color & | operator *= (const Color &c) |
| Component-wise multiplication with color in place. | |
| Color | operator/ (float s) const |
| Component-wise division with scalar. | |
| Color & | operator/= (float s) |
| Component-wise division with scalar (in place). | |
| Color | operator/ (const Color &c) const |
| Component-wise division with color. | |
| Color & | operator/= (const Color &c) |
| Component-wise division with color in place. | |
Public Attributes | |
| float | r |
| Red component. | |
| float | g |
| Green component. | |
| float | b |
| Blue component. | |
Friends | |
| Color | operator * (float s, const Color &c) |
| Component-wise multiplication with scalar (mixed-mode). | |
| std::ostream & | operator<< (std::ostream &os, const Color &c) |
| Write color values to an output stream in text format. | |
1.4.4