Represents a linear RGB color value.
More...
#include <color.h>
List of all members.
Public Types |
| typedef Eigen::Array3f | Base |
Public Member Functions |
| | Color3f (float value=0) |
| | Initialize the color vector with a uniform value.
|
| | Color3f (float r, float g, float b) |
| | Initialize the color vector with specific per-channel values.
|
| template<typename Derived > |
| | Color3f (const Eigen::ArrayBase< Derived > &p) |
| | Construct a color vector from ArrayBase (needed to play nice with Eigen)
|
| template<typename Derived > |
| Color3f & | operator= (const Eigen::ArrayBase< Derived > &p) |
| | Assign a color vector from ArrayBase (needed to play nice with Eigen)
|
| float & | r () |
| | Return a reference to the red channel.
|
| const float & | r () const |
| | Return a reference to the red channel (const version)
|
| float & | g () |
| | Return a reference to the green channel.
|
| const float & | g () const |
| | Return a reference to the green channel (const version)
|
| float & | b () |
| | Return a reference to the blue channel.
|
| const float & | b () const |
| | Return a reference to the blue channel (const version)
|
| bool | isValid () const |
| | Check if the color vector contains a NaN/Inf/negative value.
|
| Color3f | toLinearRGB () const |
| | Convert from sRGB to linear RGB.
|
| Color3f | toSRGB () const |
| | Convert from linear RGB to sRGB.
|
| float | getLuminance () const |
| | Return the associated luminance.
|
| QString | toString () const |
| | Return a human-readable string summary.
|
Detailed Description
Represents a linear RGB color value.
Definition at line 29 of file color.h.
Member Typedef Documentation
Constructor & Destructor Documentation
| Color3f::Color3f |
( |
float |
value = 0 | ) |
[inline] |
Initialize the color vector with a uniform value.
Definition at line 34 of file color.h.
| Color3f::Color3f |
( |
float |
r, |
|
|
float |
g, |
|
|
float |
b |
|
) |
| [inline] |
Initialize the color vector with specific per-channel values.
Definition at line 37 of file color.h.
template<typename Derived >
| Color3f::Color3f |
( |
const Eigen::ArrayBase< Derived > & |
p | ) |
[inline] |
Construct a color vector from ArrayBase (needed to play nice with Eigen)
Definition at line 40 of file color.h.
Member Function Documentation
| float& Color3f::b |
( |
| ) |
[inline] |
Return a reference to the blue channel.
Definition at line 58 of file color.h.
| const float& Color3f::b |
( |
| ) |
const [inline] |
Return a reference to the blue channel (const version)
Definition at line 60 of file color.h.
| const float& Color3f::g |
( |
| ) |
const [inline] |
Return a reference to the green channel (const version)
Definition at line 56 of file color.h.
| float& Color3f::g |
( |
| ) |
[inline] |
Return a reference to the green channel.
Definition at line 54 of file color.h.
| float Color3f::getLuminance |
( |
| ) |
const |
Return the associated luminance.
| bool Color3f::isValid |
( |
| ) |
const |
Check if the color vector contains a NaN/Inf/negative value.
template<typename Derived >
| Color3f& Color3f::operator= |
( |
const Eigen::ArrayBase< Derived > & |
p | ) |
[inline] |
Assign a color vector from ArrayBase (needed to play nice with Eigen)
Definition at line 44 of file color.h.
| float& Color3f::r |
( |
| ) |
[inline] |
Return a reference to the red channel.
Definition at line 50 of file color.h.
| const float& Color3f::r |
( |
| ) |
const [inline] |
Return a reference to the red channel (const version)
Definition at line 52 of file color.h.
| Color3f Color3f::toLinearRGB |
( |
| ) |
const |
Convert from sRGB to linear RGB.
Convert from linear RGB to sRGB.
| QString Color3f::toString |
( |
| ) |
const [inline] |
Return a human-readable string summary.
Definition at line 75 of file color.h.
The documentation for this struct was generated from the following file: