Classes | Public Member Functions

pav::lib::ColorMapper Class Reference

List of all members.

Classes

class  ColorMapperImpl
class  Colors
class  Constant
class  TwoColors

Public Member Functions

void setColor (int color)
void setColor (int a, int b, int mode)
void setColor (float[] thresholds, int[] colors, int mode)
void setRange (float min, float max)
int map (float value)

Detailed Description

Maps values to colors.

Author:
christopher

Member Function Documentation

int pav::lib::ColorMapper::map ( float  value  )  [inline]

Maps a value to a color.

Parameters:
value The value
Returns:
The color
void pav::lib::ColorMapper::setColor ( int  a,
int  b,
int  mode 
) [inline]

Sets two colors to interpolate between.

Parameters:
a The color to start from
b The color to interpolate to
mode The color mode to use. Must be either PApplet.RGB or PApplet.HSB
void pav::lib::ColorMapper::setColor ( int  color  )  [inline]

Sets the static color to use.

Parameters:
color The color
void pav::lib::ColorMapper::setColor ( float[]  thresholds,
int[]  colors,
int  mode 
) [inline]

Sets the colors to interpolate between.

Parameters:
thresholds The relative thresholds to use. Values must be between 0 and 1 and sorted. The first element must be 0, the last 1. Must be of same length as colors
colors The The colors to use. Must be of same length as thresholds
mode The color mode to use. Must be either PApplet.RGB or PApplet.HSB
void pav::lib::ColorMapper::setRange ( float  min,
float  max 
) [inline]

Sets the minimum and maximum value.

Parameters:
min The minimum value
max The maximum value

The documentation for this class was generated from the following file:
 All Classes Functions Variables