Class to build a label field. More...
#include <MeshViz/graph/PoLabel.h>
Public Types | |
enum | ValueType { VALUE, NAME } |
enum | Position { VALUE_POS, MIDDLE_POS, THRESHOLD_POS } |
enum | Axis { X, Y } |
Public Member Functions | |
virtual SoType | getTypeId () const |
virtual const SoNodekitCatalog * | getNodekitCatalog () const |
PoLabel () | |
Static Public Member Functions | |
static SoType | getClassTypeId () |
static const SoNodekitCatalog * | getClassNodekitCatalog () |
Public Attributes | |
SoSFInt32 | stringsIndex |
SoSFEnum | axis |
SoSFBitMask | valueType |
SoSFEnum | position |
SoSFFloat | threshold |
SoMFVec3f | offset |
SoSFFloat | fontSize |
Builds a 2D label field on 1D mesh (PoIrregularMesh1D or PoRegularMesh1D). The abscissas of the labels are given by the geometry of the current mesh 1D, and the ordinates are given by one of the value-set of the current mesh 1D specified by the field yValuesIndex. Names attached to each label are given by one of the string-set of the current mesh 1D specified by the field stringsIndex.
The fields position, threshold and offset allows the user to set the label position and the field valueType set the values to display as labels. This class also takes into account of the current mesh 1D hints (PoMesh1DHints), and the current mesh 1D filter (PoMesh1DFilter) to filter the geometry of the current mesh 1D. The current label hints (PoLabelHints) is used to specify the appearance of labels. If the offset is different from null and, if the field isLabelLineVisible of the current label hints is set to TRUE then, a line representing the offset is drawn. All labels depend on the current miscellaneous text attributes which defines the font names, line length and so on (PoMiscTextAttr). All numerical values depend on the current numerical display format (PoNumericDisplayFormat).
The interpretation of colorBinding is the following :
colorBinding | INHERITED |
yValuesIndex | -1 |
colorValuesIndex | 1 |
material | NULL |
stringsIndex | 0 |
axis | X |
valueType | VALUE |
position | VALUE_POS |
threshold | 0. |
offset | 0. 0. 0. |
fontSize | 0.0 |
PoLabel {
Separator alternateRep (from PoBase) {
AppearanceKit appearance (from PoBase)
Specifies the appearance of all the kit. By default lightModel.model=PHONG.
MatrixTransform domainTransform (from PoBase)
Corresponds to the domain transformation.
Group label
Contains a list of couple SoMaterial and SoText3/SoAnnoText3/SoAsciiText (cf PoBase::setTextType() and PoBase::setVRML2Mode() for choosing the text type) if the field colorBinding is different from INHERITED, a list of SoText3/SoAnnoText3/SoAsciiText otherwise.
Separator labelLineSep {
Contains properties and shapes to draw the label lines.
AppearanceKit labelLineApp
Specifies the appearance of the label lines.
Group labelLine
Contains a SoLineSet shape to draw the label lines.
}
}
}
enum PoLabel::Axis |
enum PoLabel::Position |
Position of the labels.
enum PoLabel::ValueType |
PoLabel::PoLabel | ( | ) |
Constructor.
static const SoNodekitCatalog* PoLabel::getClassNodekitCatalog | ( | ) | [static] |
Returns the SoNodekitCatalog for this class.
Reimplemented from PoChart.
static SoType PoLabel::getClassTypeId | ( | ) | [static] |
Returns the type identifier for this class.
Reimplemented from PoChart.
virtual const SoNodekitCatalog* PoLabel::getNodekitCatalog | ( | ) | const [virtual] |
Returns the SoNodekitCatalog for this instance.
Reimplemented from PoChart.
virtual SoType PoLabel::getTypeId | ( | ) | const [virtual] |
Returns the type identifier for this specific instance.
Reimplemented from PoChart.
Defines from which axis the position and type of displayed values computation is done.
All values in brackets correspond to the Y-axis.
Font size of labels.
If this value is less or equal to 0, the font size is fixed at 0.04. This value is a percentage of the current domain (cf PoBase description).
Defines an offset applied to the label.
This offset is combinated with the label position. If the number of offsets is inferior to the number of labels, they are cyclically used.
Defines the position of the labels.
There are three ways to define this position :
Defines the index of the set of strings used for the names attached to labels when valueType is equal to NAME.
If the field value is negative, no names is attached to labels.
Defines the threshold used to the set position of the label.
Defines the type of values displayed by the labels.
There are two ways to display the labels :