walberla::pe::raytracing::Color Class Reference

#include <Color.h>

+ Inheritance diagram for walberla::pe::raytracing::Color:

Public Member Functions

Color mulComponentWise (const Color &other) const
 Multiply this color with another component wise. More...
 
void clamp ()
 Clamps this colors component values between 0 and 1. More...
 
Constructors
 Color ()
 Instantiation constructor for the Color class. More...
 
 Color (real_t r, real_t g, real_t b)
 Instantiation constructor for the Color class. More...
 
 Color (const Vec3 &vector)
 Instantiation constructor for the Color class. More...
 

Static Public Member Functions

static Color colorFromHSV (real_t hue, real_t saturation, real_t value)
 Create a Color object from HSV values. More...
 

Constructor & Destructor Documentation

walberla::pe::raytracing::Color::Color ( )
inline

Instantiation constructor for the Color class.

Defaults to white.

walberla::pe::raytracing::Color::Color ( real_t  r,
real_t  g,
real_t  b 
)
inline

Instantiation constructor for the Color class.

Parameters
rRed component
gGreen component
bBlue component Instantiation constructor for the Color class with RGB components. Each value should be between 0 and 1 (soft limits)
walberla::pe::raytracing::Color::Color ( const Vec3 vector)
inline

Instantiation constructor for the Color class.

Parameters
rRed component
gGreen component
bBlue component Instantiation constructor for the Color class with RGB components. Each value should be between 0 and 1 (soft limits)

Member Function Documentation

void walberla::pe::raytracing::Color::clamp ( )
inline

Clamps this colors component values between 0 and 1.

Color walberla::pe::raytracing::Color::colorFromHSV ( real_t  hue,
real_t  saturation,
real_t  value 
)
static

Create a Color object from HSV values.

Parameters
hueHue value in degrees from 0-360
saturationSaturation value from 0-1
valueValue from 0-1
Color walberla::pe::raytracing::Color::mulComponentWise ( const Color other) const
inline

Multiply this color with another component wise.

Returns
Color with components of this and other multiplied.

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