|
enum class | PaletteType {
Custom
,
Qualitative
,
Sequential
,
Diverging
,
FlexibleDiverging
} |
|
| SBDPaletteDiverging () |
| Default constructor.
|
|
| SBDPaletteDiverging (int hue1, int hue2, int chroma1=50, int maximumChroma=50, int luminance1=70, int luminance2=70, float chromaPower=1.0f, float luminancePower=1.0f, float neutralPoint=0.5f, std::string name=std::string("")) |
|
| SBDPaletteDiverging (const SBDPaletteDiverging &otherColorPalette) |
| Copy constructor.
|
|
virtual | ~SBDPaletteDiverging () |
|
int | getHue1 () const |
| Returns the starting value for the first coordinate.
|
|
void | setHue1 (int hue1) |
| Sets the starting value for the first coordinate.
|
|
int | getHue2 () const |
| Returns the end value for the first coordinate.
|
|
void | setHue2 (int hue2) |
| Sets the end value for the first coordinate.
|
|
void | setHue (int hue1, int hue2) |
| Sets the parameters for the first coordinate.
|
|
int | getChroma1 () const |
| Returns the starting value for the second coordinate.
|
|
void | setChroma1 (int chroma1) |
| Sets the starting value for the second coordinate.
|
|
int | getMaximumChroma () const |
| Returns the max value for the second coordinate for the triangular trajectory.
|
|
void | setMaximumChroma (int maximumChroma) |
| Sets the max value for the second coordinate for the triangular trajectory, if it is less the chroma1 or chroma2 then it is not used and the linear trajectory is computed.
|
|
float | getChromaPower () const |
| Returns the power of the intensity value for the computation of the second coordinate.
|
|
void | setChromaPower (float chromaPower) |
| Sets the power of the intensity value for the computation of the second coordinate, the power should be greater than 0.
|
|
void | setChroma (int chroma1, int maximumChroma, float chromaPower=1.0f) |
| Sets the parameters for the second coordinate.
|
|
int | getLuminance1 () const |
| Returns the starting value for the third coordinate.
|
|
void | setLuminance1 (int luminance1) |
| Sets the starting value for the third coordinate.
|
|
int | getLuminance2 () const |
| Returns the end value for the third coordinate.
|
|
void | setLuminance2 (int luminance2) |
| Sets the end value for the third coordinate.
|
|
float | getLuminancePower () const |
| Returns the power of the intensity value for the computation of the third coordinate.
|
|
void | setLuminancePower (float luminancePower) |
| Sets the power of the intensity value for the computation of the third coordinate, the power should be greater than 0.
|
|
void | setLuminance (int luminance1, int luminance2, float luminancePower=1.0f) |
| Sets the parameters for the third coordinate.
|
|
float | getNeutralPoint () const |
| Returns the neutral point position.
|
|
void | setNeutralPoint (float neutralPoint) |
| Sets the neutral point position, should be in the range [0.0, 1.0].
|
|
| SBDPalette () |
| Default constructor.
|
|
virtual | ~SBDPalette () |
|
PaletteType | getType () const |
| Returns the type of the color palette.
|
|
void | setType (SBDPalette::PaletteType paletteType) |
| Sets the type of the color palette.
|
|
const std::string & | getName () const |
| Returns the palette's name.
|
|
void | setName (const std::string &name) |
| Sets the palette's name to name .
|
|
bool | getReverseFlag () const |
| Returns the reverse flag - whether the color palette is mirrored or not.
|
|
void | setReverseFlag (bool b) |
| Sets the reverse flag - whether to mirror or not the color palette.
|
|
SBColor | getColor (float value) const |
| Returns SBColor based on the palette and an intensity value value .
|
|
static float | getValueAlongLinearTrajectory (float y1, float y2, float power, float x) |
| Returns a value along the "linear" trajectory.
|
|
static float | getValueAlongTriangularTrajectory (float y1, float ymax, float y2, float power, float x) |
| Returns a value along "triangular" trajectory.
|
|
int | hue1 |
| The starting value for the first coordinate.
|
|
int | hue2 |
| The end value for the first coordinate.
|
|
int | chroma1 |
| The starting value for the second coordinate.
|
|
int | maximumChroma |
| The max value for the second coordinate for the triangular trajectory, if it is less the chroma1 or chroma2 then it is not used and the linear trajectory is computed.
|
|
float | chromaPower |
| The power of the intensity value for the computation of the second coordinate, the power should be greater than 0.0.
|
|
int | luminance1 |
| The starting value for the third coordinate.
|
|
int | luminance2 |
| The end value for the third coordinate.
|
|
float | luminancePower |
| The power of the intensity value for the computation of the third coordinate, the power should be greater than 0.0.
|
|
float | neutralPoint |
| The neutral point position, should be in the range [0.0, 1.0].
|
|
PaletteType | paletteType |
| The palette's type.
|
|
std::string * | name |
| The palette's name.
|
|
bool | reverseFlag |
| Reverse flag: if true, then the palette is reversed/mirrored.
|
|
A diverging palette is constructed in a 3D color coordinate space with coordinates named Hue, Chroma, and Luminance. The diverging palette can be represented as two sequential palettes: one to the left (left arm) and another one to the right (right arm) from the diverging point (neutral point). The value for Hue is constant for both arms: hue = hue1 for the left arm (the intensity value less or equal than neutralPoint); hue = hue2 for the right arm (the intensity value greater than neutralPoint). In each arms the Chroma value changes from chroma1 to 0.0 through maximumChroma (if present and if maximumChroma > chroma1) in the same way as in the sequential palette. In each arms the Luminance value changes from luminance1 to luminance2 as in the sequential palette.