YafaRay Core  v3.2.0-ALPHA-10-g60452c5
Public Member Functions | Public Attributes | Friends | List of all members
color_t Class Reference

#include <color.h>

Inheritance diagram for color_t:
Inheritance graph
[legend]

Public Member Functions

 color_t ()
 
 color_t (float r, float g, float b)
 
 color_t (float g)
 
 color_t (float af[3])
 
bool isBlack () const
 
bool isNaN () const
 
bool isInf () const
 
 ~color_t ()
 
void set (float r, float g, float b)
 
color_toperator+= (const color_t &c)
 
color_toperator-= (const color_t &c)
 
color_toperator*= (const color_t &c)
 
color_toperator*= (float f)
 
float energy () const
 
float col2bri () const
 
float abscol2bri () const
 
void gammaAdjust (float g)
 
void expgam_Adjust (float e, float g, bool clamp_rgb)
 
float getR () const
 
float getG () const
 
float getB () const
 
void invertRGB ()
 
void absRGB ()
 
void darkenRGB (const color_t &col)
 
void lightenRGB (const color_t &col)
 
void black ()
 
float minimum () const
 
float maximum () const
 
float absmax () const
 
void clampRGB0 ()
 
void clampRGB01 ()
 
void blend (const color_t &col, float blend_factor)
 
void ceil ()
 
void clampProportionalRGB (float maxValue)
 
float linearRGB_from_sRGB (float value_sRGB)
 
float sRGB_from_linearRGB (float value_linearRGB)
 
void linearRGB_from_ColorSpace (colorSpaces_t colorSpace, float gamma)
 
void ColorSpace_from_linearRGB (colorSpaces_t colorSpace, float gamma)
 
void rgb_to_hsv (float &h, float &s, float &v) const
 
void hsv_to_rgb (const float &h, const float &s, const float &v)
 
void rgb_to_hsl (float &h, float &s, float &l) const
 
void hsl_to_rgb (const float &h, const float &s, const float &l)
 
template<class Archive >
void serialize (Archive &ar, const unsigned int version)
 

Public Attributes

float R
 
float G
 
float B
 

Friends

class boost::serialization::access
 
color_t operator* (const color_t &a, const color_t &b)
 
color_t operator* (const float f, const color_t &b)
 
color_t operator* (const color_t &b, const float f)
 
color_t operator/ (const color_t &b, const float f)
 
color_t operator+ (const color_t &a, const color_t &b)
 
color_t operator- (const color_t &a, const color_t &b)
 
float maxAbsDiff (const color_t &a, const color_t &b)
 
YAFRAYCORE_EXPORT void operator>> (unsigned char *data, color_t &c)
 
YAFRAYCORE_EXPORT void operator<< (unsigned char *data, const color_t &c)
 
YAFRAYCORE_EXPORT void operator>> (float *data, color_t &c)
 
YAFRAYCORE_EXPORT void operator<< (float *data, const color_t &c)
 
YAFRAYCORE_EXPORT std::ostream & operator<< (std::ostream &out, const color_t c)
 
YAFRAYCORE_EXPORT color_t mix (const color_t &a, const color_t &b, float point)
 
YAFRAYCORE_EXPORT color_t convergenceAccell (const color_t &cn_1, const color_t &cn0, const color_t &cn1)
 

Detailed Description

Definition at line 49 of file color.h.

Constructor & Destructor Documentation

color_t::color_t ( )
inline

Definition at line 66 of file color.h.

color_t::color_t ( float  r,
float  g,
float  b 
)
inline

Definition at line 67 of file color.h.

color_t::color_t ( float  g)
inline

Definition at line 68 of file color.h.

color_t::color_t ( float  af[3])
inline

Definition at line 69 of file color.h.

color_t::~color_t ( )
inline

Definition at line 73 of file color.h.

Member Function Documentation

float color_t::abscol2bri ( ) const
inline

Definition at line 84 of file color.h.

float color_t::absmax ( ) const
inline

Definition at line 115 of file color.h.

void color_t::absRGB ( )
inline

Definition at line 98 of file color.h.

void color_t::black ( )
inline

Definition at line 112 of file color.h.

void color_t::blend ( const color_t col,
float  blend_factor 
)
inline

Definition at line 130 of file color.h.

void color_t::ceil ( )
inline

Definition at line 137 of file color.h.

void color_t::clampProportionalRGB ( float  maxValue)
inline

Definition at line 477 of file color.h.

void color_t::clampRGB0 ( )
inline

Definition at line 116 of file color.h.

void color_t::clampRGB01 ( )
inline

Definition at line 123 of file color.h.

float color_t::col2bri ( ) const
inline

Definition at line 83 of file color.h.

void color_t::ColorSpace_from_linearRGB ( colorSpaces_t  colorSpace,
float  gamma 
)
inline

Definition at line 453 of file color.h.

void color_t::darkenRGB ( const color_t col)
inline

Definition at line 99 of file color.h.

float color_t::energy ( ) const
inline

Definition at line 81 of file color.h.

void color_t::expgam_Adjust ( float  e,
float  g,
bool  clamp_rgb 
)
inline

Definition at line 266 of file color.h.

void color_t::gammaAdjust ( float  g)
inline

Definition at line 85 of file color.h.

float color_t::getB ( ) const
inline

Definition at line 89 of file color.h.

float color_t::getG ( ) const
inline

Definition at line 88 of file color.h.

float color_t::getR ( ) const
inline

Definition at line 87 of file color.h.

void color_t::hsl_to_rgb ( const float &  h,
const float &  s,
const float &  l 
)
inline

Definition at line 596 of file color.h.

void color_t::hsv_to_rgb ( const float &  h,
const float &  s,
const float &  v 
)
inline

Definition at line 554 of file color.h.

void color_t::invertRGB ( )
inline

Definition at line 92 of file color.h.

bool color_t::isBlack ( ) const
inline

Definition at line 70 of file color.h.

bool color_t::isInf ( ) const
inline

Definition at line 72 of file color.h.

bool color_t::isNaN ( ) const
inline

Definition at line 71 of file color.h.

void color_t::lightenRGB ( const color_t col)
inline

Definition at line 105 of file color.h.

void color_t::linearRGB_from_ColorSpace ( colorSpaces_t  colorSpace,
float  gamma 
)
inline

Definition at line 431 of file color.h.

float color_t::linearRGB_from_sRGB ( float  value_sRGB)
inline

Definition at line 417 of file color.h.

float color_t::maximum ( ) const
inline

Definition at line 114 of file color.h.

float color_t::minimum ( ) const
inline

Definition at line 113 of file color.h.

color_t & color_t::operator*= ( const color_t c)
inline

Definition at line 351 of file color.h.

color_t & color_t::operator*= ( float  f)
inline

Definition at line 353 of file color.h.

color_t & color_t::operator+= ( const color_t c)
inline

Definition at line 349 of file color.h.

color_t & color_t::operator-= ( const color_t c)
inline

Definition at line 355 of file color.h.

void color_t::rgb_to_hsl ( float &  h,
float &  s,
float &  l 
) const
inline

Definition at line 574 of file color.h.

void color_t::rgb_to_hsv ( float &  h,
float &  s,
float &  v 
) const
inline

Definition at line 532 of file color.h.

template<class Archive >
void color_t::serialize ( Archive &  ar,
const unsigned int  version 
)
inline

Definition at line 160 of file color.h.

void color_t::set ( float  r,
float  g,
float  b 
)
inline

Definition at line 74 of file color.h.

float color_t::sRGB_from_linearRGB ( float  value_linearRGB)
inline

Definition at line 424 of file color.h.

Friends And Related Function Documentation

friend class boost::serialization::access
friend

Definition at line 159 of file color.h.

YAFRAYCORE_EXPORT color_t convergenceAccell ( const color_t cn_1,
const color_t cn0,
const color_t cn1 
)
friend

Definition at line 126 of file color.cc.

float maxAbsDiff ( const color_t a,
const color_t b 
)
friend

Definition at line 394 of file color.h.

YAFRAYCORE_EXPORT color_t mix ( const color_t a,
const color_t b,
float  point 
)
friend

Definition at line 110 of file color.cc.

color_t operator* ( const color_t a,
const color_t b 
)
friend

Definition at line 303 of file color.h.

color_t operator* ( const float  f,
const color_t b 
)
friend

Definition at line 308 of file color.h.

color_t operator* ( const color_t b,
const float  f 
)
friend

Definition at line 313 of file color.h.

color_t operator+ ( const color_t a,
const color_t b 
)
friend

Definition at line 323 of file color.h.

color_t operator- ( const color_t a,
const color_t b 
)
friend

Definition at line 328 of file color.h.

color_t operator/ ( const color_t b,
const float  f 
)
friend

Definition at line 318 of file color.h.

YAFRAYCORE_EXPORT void operator<< ( unsigned char *  data,
const color_t c 
)
friend

Definition at line 35 of file color.cc.

YAFRAYCORE_EXPORT void operator<< ( float *  data,
const color_t c 
)
friend

Definition at line 74 of file color.cc.

YAFRAYCORE_EXPORT std::ostream& operator<< ( std::ostream &  out,
const color_t  c 
)
friend
YAFRAYCORE_EXPORT void operator>> ( unsigned char *  data,
color_t c 
)
friend

Definition at line 28 of file color.cc.

YAFRAYCORE_EXPORT void operator>> ( float *  data,
color_t c 
)
friend

Definition at line 66 of file color.cc.

Member Data Documentation

float color_t::B

Definition at line 157 of file color.h.

float color_t::G

Definition at line 157 of file color.h.

float color_t::R

Definition at line 157 of file color.h.


The documentation for this class was generated from the following file: