#include <vlcolor.h>
Inheritance diagram for vlColor3< T >:

Public Types | |
| typedef enum vlColor3::_ColorType | ColorType |
| Enum to define what type of color it is : RGB, HSV etc. | |
| enum | _ColorType { RGB, HSV, UnknownColorType } |
| Enum to define what type of color it is : RGB, HSV etc. More... | |
Public Member Functions | |
| vlColor3 (T x=0.0, T y=0.0, T z=0.0) | |
| Default constructor. | |
| ~vlColor3 () | |
| Default destructor. | |
| ColorType | type () |
| Returns the type of the color : RGB, CMY etc. | |
For storing/using RGB color, use vlColorRGB. The components of vlColorRGB can be accessed using r(), g() and b() making your code more readable. If you want a 4 component color (RGB/HSV/CMY etc + Alpha), then use vlColor4 (generic) or vlColorRGBA.
Other types of color HSV, CMY, etc. will be implemented as and when needed. Please feel free to add their support. Constructors will be added to each color type to convert between the colors.
Definition at line 53 of file vlcolor.h.
|
|||||
|
Referenced by vlColor3< uint8 >::type(). |
|
|||||
|
|
|
||||||||||||||||||||
|
|
|
|||||||||
|
|
|
|||||||||
|
The base class will always return UnknownColorType. Only when you use one of the derived classes will it tell you which color it is. This is because the color type is not stored in the base class.. as it increases the storage space needed for the class. This makes it possible to defined a volume of vlColor w/o additional space overhead. Reimplemented in vlColorRGB< T >. |
1.3.3