Rendering node that displays a legend. More...
#include <MeshVizXLM/mapping/nodes/MoLegend.h>
Public Types | |
enum | Position { POS_BOTTOM, POS_TOP, POS_RIGHT, POS_LEFT } |
enum | Notation { NOTATION_DEFAULT, NOTATION_FIXED, NOTATION_SCIENTIFIC } |
Public Member Functions | |
virtual SoType | getTypeId () const |
MoLegend () | |
Static Public Member Functions | |
static SoType | getClassTypeId () |
Public Attributes | |
SoSFVec2f | bottomLeft |
SoSFVec2f | topRight |
SoSFDouble | minValue |
SoSFDouble | maxValue |
SoSFBool | vertical |
SoSFString | title |
SoSFFloat | titleFontSize |
SoSFColor | titleColor |
SoSFEnum | titlePosition |
SoSFBool | displayValues |
SoSFInt32 | numValues |
SoSFColor | valuesColor |
SoSFFloat | valuesFontSize |
SoSFEnum | valueNotation |
SoSFUInt32 | valuePrecision |
Displays a legend representing the current colormap. A colormap is specified using the MoColorMapping derived nodes. However, the legend does not take into account the MoCombineColorMapping node.
The legend is drawn in a rectangle defined by the bottomLeft and topRight 2D points given in Normalized Device Coordinates [0..1].
bottomLeft | SbVec3f(0,0) |
topRight | SbVec3f(0,1) |
minValue | 0 |
maxValue | 0 |
vertical | FALSE |
title | "" |
titleColor | 0.8 0.8 0.8 |
titleFontSize | 10 |
titlePosition | POS_BOTTOM |
displayValues | FALSE |
valuesColor | 0.8 0.8 0.8 |
valuesFontSize | 10 |
valueNotation; | NOTATION_DEFAULT |
valuePrecision | 0 |
enum MoLegend::Notation |
enum MoLegend::Position |
MoLegend::MoLegend | ( | ) |
Constructor.
static SoType MoLegend::getClassTypeId | ( | ) | [static] |
Returns the type identifier for this class.
Reimplemented from MoMeshBaseRepresentation.
virtual SoType MoLegend::getTypeId | ( | ) | const [virtual] |
Returns the type identifier for this specific instance.
Reimplemented from MoMeshBaseRepresentation.
Bottom left corner of the rectangle in which the legend will be drawn.
In NDC units [0..1]. Default is (0,0).
If TRUE, display numValues values starting from the minimal to the maximal values of the colormap.
Default FALSE.
The maximum value defining the range of data to display in the legend.
Default 0.
The minimum value defining the range of data to display in the legend.
Default 0.
The number of values displayed near the colorbar.
This field is ignored if displayValues is FALSE. Default 2.
The title of the legend.
Color for the title of the legend.
The size of the font for the title of the legend.
Default 10 pixels.
The position of the title relative to the legend box.
Use enum Position. Default is POS_BOTTOM.
Top-right corner of the rectangle in which the legend will be drawn.
In NDC units [0..1]. Default is (0,1).
Defines the notation type (fixed or scientific) used to display the values of this legend.
Use enum Notation. Default is DEFAULT_NOTATION.
Note: The field valuePrecision is interpreted according to valueNotation.
NOTE: field available since Open Inventor 9.6Defines the maximum number of significant digits to display, or the maximum number of digits after the decimal point depending on the value of the field valueNotation.
Default value is 0.
When using NOTATION_DEFAULT the valuePrecision field specifies the maximum number of meaningful digits to display in total counting both those before and those after the decimal point. Notice that it is not a minimum, and therefore it does not pad the displayed number with trailing zeros if the number can be displayed with less digits than the precision.
When using NOTATION_FIXED or NOTATION_SCIENTIFIC, the precision field specifies exactly how many digits to display after the decimal point, even if this includes trailing decimal zeros. The digits before the decimal point are not relevant for the precision in this case.
NOTE: field available since Open Inventor 9.6Color for the values of the legend.
The size of the font for the values of the legend.
Default 10 pixels.
If TRUE, the legend is vertical.
Otherwise it is horizontal. Default FALSE (horizontal)