| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
tlp::ColorScale Class Reference This class represents a color scale to perform color mapping. The color scale can be either gradient or predefined colors steps. If the color scale is a gradient, returned colors are interpolated in function of the position. If the color scale isn't a gradient returned colors are the predefined colors steps. More...
Inheritance diagram for tlp::ColorScale:
![]()
Collaboration diagram for tlp::ColorScale:
![]()
Detailed DescriptionThis class represents a color scale to perform color mapping. The color scale can be either gradient or predefined colors steps. If the color scale is a gradient, returned colors are interpolated in function of the position. If the color scale isn't a gradient returned colors are the predefined colors steps. \// Creating the color scale.
ColorScale colorScale;
\// Color scale initialization : from blue to red with gradient.
colorScale.setColorAtPos(0.0, Color(0,0,255));
colorScale.setColorAtPos(1.0, Color(255,0,0));
\// Get the color for the position 0.5, i.e. Color(127,0,127).
colorScale.getColorAtPos(0.5);
\// Reinitialize the color scale : from blue to red without gradient.
vector<color> newColors;
newColors.push_back(Color(0,0,255));
newColors.push_back(Color(255,0,0));
colorScale.setColorScale(newColors,false);
\// Get the color for the position 0.3, i.e. Color(0,0,255).
colorScale.getColorAtPos(0.3);
\// Get the color for the position 0.7, i.e. Color(255,0,0).
colorScale.getColorAtPos(0.7);
Constructor & Destructor Documentation
Initializes a color scale with a default set of colors.
Initializes a color scale with a set of colors passed as parameter
Member Function Documentation
Returns true is the color scale was initialized.
Returns the color for a given position in the color scale. This method computes the color associated to a specific position in the color scale and returns it.
Returns a map corresponding to the color scale. The index of the map is the position for the corresponding color in the color scale.
Returns true if the color scale is a gradient.
Adds a color to the color scale at specific position. This method adds a color to the color scale at a specific position.
Configures the color scale. This method configures the color scale. If the scale was previously configured the old configuration is lost.
Member Data Documentation
|
Tulip Software by LaBRI Visualization Team 2001 - 2012 |