#include <rgb.h>
List of all members.
Public Member Functions |
bool | operator!= (const Rgb< T > &c) const |
template<class T2 > |
Rgb< T > & | operator= (const Rgb< T2 > &c) |
Rgb< T > & | operator= (const Rgb< T > &c) |
bool | operator== (const Rgb< T > &c) const |
template<class S > |
| Rgb (const Rgb< S > &rgb) |
| Rgb (T r, T g, T b) |
| Rgb () |
| Default constructor. Does nothing.
|
Public Attributes |
T | blue |
| The blue component.
|
T | green |
| The green component.
|
T | red |
| The red component.
|
Related Functions |
(Note that these are not member functions.)
|
std::ostream & | operator<< (std::ostream &os, const Rgb< byte > &x) |
std::ostream & | operator<< (std::ostream &os, const Rgb< char > &x) |
template<class T > |
std::ostream & | operator<< (std::ostream &os, const Rgb< T > &x) |
Detailed Description
template<class T>
class CVD::Rgb< T >
A colour consisting of red, green and blue components. Often used to store 24-bit colour information, i.e. CVD::Rgb<CVD::byte>
- Parameters:
-
| T | The datatype of each component |
Definition at line 46 of file rgb.h.
Constructor & Destructor Documentation
Default constructor. Does nothing.
Definition at line 50 of file rgb.h.
Constructs a colour as specified
- Parameters:
-
| r | The red component |
| g | The green component |
| b | The blue component |
Definition at line 55 of file rgb.h.
template<class T>
template<class S >
Definition at line 56 of file rgb.h.
Member Function Documentation
template<class T>
bool CVD::Rgb< T >::operator!= |
( |
const Rgb< T > & |
c |
) |
const [inline] |
Logical not-equals operator. Returns true unless each component is the same.
- Parameters:
-
Definition at line 74 of file rgb.h.
template<class T>
template<class T2 >
Assignment operator between two different storage types, using the standard casts as necessary
- Parameters:
-
| c | The colour to copy from |
Definition at line 80 of file rgb.h.
Assignment operator
- Parameters:
-
| c | The colour to copy from |
Definition at line 64 of file rgb.h.
template<class T>
bool CVD::Rgb< T >::operator== |
( |
const Rgb< T > & |
c |
) |
const [inline] |
Logical equals operator. Returns true if each component is the same.
- Parameters:
-
Definition at line 69 of file rgb.h.
Friends And Related Function Documentation
template<class T>
std::ostream & operator<< |
( |
std::ostream & |
os, |
|
|
const Rgb< byte > & |
x | |
|
) |
| | [related] |
Read a colour from a stream, interpreting three numbers as byte
s
- Parameters:
-
| os | The stream |
| x | The colour object |
Definition at line 111 of file rgb.h.
template<class T>
std::ostream & operator<< |
( |
std::ostream & |
os, |
|
|
const Rgb< char > & |
x | |
|
) |
| | [related] |
Read a colour from a stream, interpreting three numbers as char
s
- Parameters:
-
| os | The stream |
| x | The colour object |
Definition at line 100 of file rgb.h.
template<class T >
std::ostream & operator<< |
( |
std::ostream & |
os, |
|
|
const Rgb< T > & |
x | |
|
) |
| | [related] |
Write the colour to a stream in the format "(red,green,blue)"
- Parameters:
-
| os | The stream |
| x | The colour object |
Definition at line 90 of file rgb.h.
Member Data Documentation
The blue component.
Definition at line 60 of file rgb.h.
The green component.
Definition at line 59 of file rgb.h.
The red component.
Definition at line 58 of file rgb.h.
The documentation for this class was generated from the following file:
libcvd
Author(s): Edward Rosten, Paul Smith, Tom Drummond, Gerhard Reitmayr, Ethan Eade, Timothy Gan, Chris Kemp, Georg Klein
autogenerated on Fri Jan 11 09:13:52 2013