Class PoLabel
- java.lang.Object
-
- All Implemented Interfaces:
SafeDisposable
public class PoLabel extends PoChart
Class to build a label field. Builds a 2D label field on 1D mesh (PoIrregularMesh1D
orPoRegularMesh1D
). 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 :
- INHERITED: All labels are colored with the same inherited color.
- PER_PART, PER_VERTEX: A color is used for each label.
File format/default:
PoLabel
{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 <html> <head> <link REL="stylesheet" TYPE="text/css" HREF="../../stylesheet.css" TITLE="Style"> <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1"> <meta name="GENERATOR" content="Microsoft FrontPage 3.0"> <title></title> </head> <body> <h4><a name="Heading249">CATALOG PARTS</a></h4> <blockquote> <p><b>PoLabel</b> {</p> </blockquote> <blockquote> <blockquote> <p><b>Separator</b> <tt>alternateRep</tt> (from PoBase) {</p> </blockquote> <blockquote> <blockquote> <p><b>AppearanceKit</b> <tt>appearance</tt> (from PoBase)</p> </blockquote> </blockquote> <blockquote> <blockquote> <p><i>Specifies the appearance of all the kit. By default lightModel.model=PHONG.</i></p> </blockquote> </blockquote> <blockquote> <blockquote> <p><b>MatrixTransform</b> <tt>domainTransform</tt> (from PoBase)</p> </blockquote> </blockquote> <blockquote> <blockquote> <p><i>Corresponds to the domain transformation.</i></p> <p><b>Group</b> <tt>label</tt></p> </blockquote> </blockquote> <blockquote> <blockquote> <p><i>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.</i></p> <b><p>Separator</b> <tt>labelLineSep</tt> {</p> <i><p>Contains properties and shapes to draw the label lines.</i><ul> <b><p>AppearanceKit</b> <tt>labelLineApp</tt></p> </ul> <ul> <i><p>Specifies the appearance of the label lines.</i></p> </ul> <ul> <b><p>Group</b> <tt>labelLine</tt></p> </ul> <ul> <i><p>Contains a SoLineSet shape to draw the label lines.</i></p> </ul> <p>}</p> </blockquote> <p>}</p> </blockquote> </blockquote> <blockquote> <p>}</p> </blockquote> </body> </html>
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
PoLabel.AxisType
values computation.static class
PoLabel.Positions
Position of the labels.static class
PoLabel.ValueTypes
Type of value displayed by the labels.-
Nested classes/interfaces inherited from class com.openinventor.meshviz.graph.PoChart
PoChart.ColorBindings
-
Nested classes/interfaces inherited from class com.openinventor.meshviz.graph.PoBase
PoBase.NodeWriteFormats, PoBase.TextTypes, PoBase.UpdateMethodTypes
-
Nested classes/interfaces inherited from class com.openinventor.inventor.nodes.SoNode
SoNode.RenderModes
-
Nested classes/interfaces inherited from class com.openinventor.inventor.Inventor
Inventor.ConstructorCommand
-
-
Field Summary
Fields Modifier and Type Field Description SoSFEnum<PoLabel.AxisType>
axis
Defines from which axis the position and type of displayed values computation is done.SoSFFloat
fontSize
Font size of labels.SoMFVec3f
offset
Defines an offset applied to the label.SoSFEnum<PoLabel.Positions>
position
Defines the position of the labels.SoSFInt32
stringsIndex
Defines the index of the set of strings used for the names attached to labels when valueType is equal to NAME.SoSFFloat
threshold
Defines the threshold used to the set position of the label.SoSFBitMask<PoLabel.ValueTypes>
valueType
Defines the type of values displayed by the labels.-
Fields inherited from class com.openinventor.meshviz.graph.PoChart
colorBinding, colorValuesIndex, material, yValuesIndex
-
Fields inherited from class com.openinventor.inventor.nodekits.SoBaseKit
boundingBoxIgnoring
-
Fields inherited from class com.openinventor.inventor.Inventor
VERBOSE_LEVEL, ZeroHandle
-
-
Constructor Summary
Constructors Constructor Description PoLabel()
Constructor.
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static SoNodekitCatalog
getClassNodekitCatalog()
Returns theSoNodekitCatalog
for this class.-
Methods inherited from class com.openinventor.meshviz.graph.PoBase
addPostRebuildCallback, addPreRebuildCallback, getDomain, getNodeWriteFormat, getTextType, getUpdateMethod, isBuilt, isModified, isVRML2Mode, rebuild, setDomain, setNodeWriteFormat, setTextType, setUpdateMethod, setVRML2Mode, touchKit
-
Methods inherited from class com.openinventor.inventor.nodekits.SoBaseKit
getNodekitCatalog, getPart, getPart, getPartString, getViewportIsEnabled, getViewportOrigin, getViewportSize, isSearchingChildren, set, set, setPart, setSearchingChildren
-
Methods inherited from class com.openinventor.inventor.nodes.SoNode
affectsState, callback, copy, copy, distribute, doAction, getAlternateRep, getBoundingBox, getByName, getMatrix, getPrimitiveCount, getRenderEngineMode, getRenderUnitID, GLRender, GLRenderBelowPath, GLRenderInPath, GLRenderOffPath, grabEventsCleanup, grabEventsSetup, handleEvent, isBoundingBoxIgnoring, isOverride, pick, rayPick, search, setOverride, touch, write
-
Methods inherited from class com.openinventor.inventor.fields.SoFieldContainer
copyFieldValues, copyFieldValues, enableNotify, fieldsAreEqual, get, getAllFields, getEventIn, getEventOut, getField, getFieldName, hasDefaultValues, isNotifyEnabled, setToDefaults
-
Methods inherited from class com.openinventor.inventor.misc.SoBase
dispose, getName, isDisposable, isSynchronizable, setName, setSynchronizable
-
Methods inherited from class com.openinventor.inventor.Inventor
getNativeResourceHandle
-
-
-
-
Field Detail
-
stringsIndex
public final SoSFInt32 stringsIndex
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.
-
axis
public final SoSFEnum<PoLabel.AxisType> axis
Defines from which axis the position and type of displayed values computation is done. All values in brackets correspond to the Y-axis.
-
valueType
public final SoSFBitMask<PoLabel.ValueTypes> valueType
Defines the type of values displayed by the labels. There are two ways to display the labels :- VALUE: The values displayed correspond to the the ordinates (resp. abscissas) of the current mesh 1D geometry.
- NAME: The values displayed correspond to the names associated to the strings-set specified by the field stringsIndex.
-
position
public final SoSFEnum<PoLabel.Positions> position
Defines the position of the labels. There are three ways to define this position :- VALUE_POS: The label position is the given by the current mesh geometry.
- MIDDLE_POS: The abscissas (resp. ordinate) is given by the current mesh geometry and the ordinate (resp. abscissas) is at the middle between the mesh ordinate (reps. abscissas) and a threshold.
- THRESHOLD_POS: The abscissas (resp. ordinate) is given by the current mesh geometry and the ordinate (resp. abscissas) is the threshold field.
-
threshold
public final SoSFFloat threshold
Defines the threshold used to the set position of the label.
-
offset
public final SoMFVec3f offset
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.
-
-
Method Detail
-
getClassNodekitCatalog
public static SoNodekitCatalog getClassNodekitCatalog()
Returns theSoNodekitCatalog
for this class.
-
-