Mana
Loading...
Searching...
No Matches
Classes | Public Member Functions | Private Attributes | List of all members
DyePalette Class Reference

Class for performing a linear interpolation between colors. More...

#include <dye.h>

Classes

struct  Color
 

Public Member Functions

 DyePalette (const std::string &description)
 Creates a palette based on the given string.
 
void getColor (int intensity, int color[3]) const
 Gets a pixel color depending on its intensity.
 
void getColor (double intensity, int color[3]) const
 Gets a pixel color depending on its intensity.
 

Private Attributes

std::vector< ColormColors
 

Detailed Description

Class for performing a linear interpolation between colors.

Definition at line 30 of file dye.h.

Constructor & Destructor Documentation

◆ DyePalette()

DyePalette::DyePalette ( const std::string &  description)

Creates a palette based on the given string.

The string is either a file name or a sequence of hexadecimal RGB values separated by ',' and starting with '#'.

Definition at line 29 of file dye.cpp.

Member Function Documentation

◆ getColor() [1/2]

void DyePalette::getColor ( double  intensity,
int  color[3] 
) const

Gets a pixel color depending on its intensity.

Definition at line 134 of file dye.cpp.

◆ getColor() [2/2]

void DyePalette::getColor ( int  intensity,
int  color[3] 
) const

Gets a pixel color depending on its intensity.

First color is implicitly black (0, 0, 0).

Definition at line 88 of file dye.cpp.

Member Data Documentation

◆ mColors

std::vector<Color> DyePalette::mColors
private

Definition at line 59 of file dye.h.


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