Geogram
Version 1.9.1-rc
A programming library of geometric algorithms
|
A generic color type. More...
#include <geogram/image/color.h>
Public Types | |
typedef vecng< 4, T > | superclass |
The superclass type. | |
Public Types inherited from GEO::vecng< 4, T > | |
typedef vecng< dim, T > | vector_type |
This vector type. More... | |
typedef T | value_type |
The type of the vector coordinates. More... | |
Public Member Functions | |
GenColor (const superclass &rhs) | |
GenColor copy constructor. More... | |
GenColor (const T *rhs) | |
GenColor constructor from T array. More... | |
GenColor (T r=0, T g=0, T b=0, T a=1) | |
GenColor constructor from 4 parameters. More... | |
GenColor & | operator= (const superclass &rhs) |
assignment operator. More... | |
T | r () const |
Gets the red component. More... | |
T | g () const |
Gets the green component. More... | |
T | b () const |
Gets the blue component. More... | |
T | a () const |
Gets the alpha component (transparency). More... | |
void | set_r (T r) |
Sets the red component. More... | |
void | set_g (T g) |
Sets the green component. More... | |
void | set_b (T b) |
Sets the blue component. More... | |
void | set_a (T a) |
Sets the alpha component (transparency). More... | |
Public Member Functions inherited from GEO::vecng< 4, T > | |
vecng () | |
Default vector constructor. More... | |
vecng (T x_in, T y_in, T z_in, T w_in) | |
Constructs a vector from coordinates. More... | |
template<class T2 > | |
vecng (const vecng< dim, T2 > &v) | |
Constructs a vector by copy. More... | |
template<class T2 > | |
vecng (const T2 *v) | |
Constructs a vector from an array. More... | |
vecng (const std::initializer_list< T > &Vi) | |
T | length2 () const |
Gets the squared length of the vector. More... | |
T | length () const |
Gets the length of the vector. More... | |
T | distance2 (const vector_type &v) const |
Gets the squared distance to a vector. More... | |
T | distance (const vector_type &v) const |
Gets the distance to a vector. More... | |
index_t | dimension () const |
Gets the vector dimension. More... | |
vector_type & | operator+= (const vector_type &v) |
Adds a vector in place. More... | |
vector_type & | operator-= (const vector_type &v) |
Subtracts a vector in place. More... | |
template<class T2 > | |
vector_type & | operator*= (T2 s) |
Multiplies by a scalar in place. More... | |
template<class T2 > | |
vector_type & | operator/= (T2 s) |
Divides by a scalar in place. More... | |
vector_type | operator+ (const vector_type &v) const |
Adds 2 vectors. More... | |
vector_type | operator- (const vector_type &v) const |
Subtracts 2 vectors. More... | |
template<class T2 > | |
vector_type | operator* (T2 s) const |
Multiplies a vector by a scalar. More... | |
template<class T2 > | |
vector_type | operator/ (T2 s) const |
Divides a vector by a scalar. More... | |
vector_type | operator- () const |
Negates a vector. More... | |
T * | data () |
Gets modifiable vector data. More... | |
const T * | data () const |
Gets non-modifiable vector data. More... | |
T & | operator[] (index_t i) |
Gets a modifiable vector coordinate. More... | |
const T & | operator[] (index_t i) const |
Gets a non-modifiable vector coordinate. More... | |
Additional Inherited Members | |
Public Attributes inherited from GEO::vecng< 4, T > | |
T | x |
Vector x coordinate. | |
T | y |
Vector y coordinate. | |
T | z |
Vector z coordinate. | |
T | w |
Vector w coordinate. | |
Static Public Attributes inherited from GEO::vecng< 4, T > | |
static const index_t | dim = 4 |
The dimension of the vector. More... | |
A generic color type.
T | type of the components |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |