Nori  23
Color3f Struct Reference

Represents a linear RGB color value. More...

#include <color.h>

Inheritance diagram for Color3f:
Collaboration diagram for Color3f:

Public Types

typedef Eigen::Array3f Base
 

Public Member Functions

 Color3f (float value=0.f)
 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 >
Color3foperator= (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)
 
Color3f clamp () const
 Clamp to the positive range.
 
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.
 
std::string toString () const
 Return a human-readable string summary.
 

Detailed Description

Represents a linear RGB color value.

Definition at line 29 of file color.h.


The documentation for this struct was generated from the following files: