| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
tlp::ColorScale Class Reference Use this class to create a color scale and perform color mapping. The color scale can be either gradient or predefined colors steps. If the color scale is a gradient, returned color 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:
![]() Public Member Functions
Protected Attributes
Detailed DescriptionUse this class to create a color scale and perform color mapping. The color scale can be either gradient or predefined colors steps. If the color scale is a gradient, returned color 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. vector<color> colors; colors.push_back(Color(0,0,255)); colors.push_back(Color(255,0,0)); colorScale.setColorScale(colors,true); \//Get the color for the position 0.5 eq Color(127,0,127). colorScale.getColorAtPos(0.5); \//Reinit 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(colors,false); \//Get the color for the position 0.3 eq Color(0,0,255). colorScale.getColorAtPos(0.3); \//Get the color for the position 0.7 eq Color(255,0,0). colorScale.getColorAtPos(0.7); Constructor & Destructor Documentation
Member Function Documentation
Return true is the color scale was initialized.
Compute the color for the given value.
Return a map corresponding to the color scale. The index of the map is the position for the corresponding color in the color scale.
Return true if the color scale is a gradient.
Add a color to color scale at specific position. This method is used to add a color to the color scale at a specific position.
Configure the color scale. This method is used to configure the color scale. If the scale was previously configured the old configuration is lost.
Member Data Documentation
|
| Tulip Software by LaBRI Visualization Team 2001 - 2011 |