Class PoMeshContouring
- All Implemented Interfaces:
SafeDisposable
PoMesh.setIsovaluesList()
method or by the current PoIsovaluesList
node during the traversal.
All contour lines can have the same color (PoMesh.coloringType
= COLOR_INHERITED) or can have a color depending on the values of the contouring lines (PoMesh.coloringType
!= COLOR_INHERITED).
Contour lines are separated into 2 groups: major contour lines which can be annotated by their value, and minor contour lines which cannot be annotated. Major contour line are defined by the value of fields majorPeriod and firstMajor. They are annotated only if the field annotIsVisible is true. The way of putting annotations along contour lines is defined by the value of the fields annotPath, annotCrossStatus, annotGap and annotClippingPolygon.
When the annotation are visible, the way of drawing the text of the level values depends on the current numeric display format and also on the current miscellaneous text attributes. If the method setFormat(format) is called, the current numerical display format is "format". Otherwise the current numerical display format is specified in the current inherited state (cf property node PoNumericDisplayFormat
). If the method setMiscTextAttr(textAttr) is called, the current miscellaneous text attributes are defined by "textAttr". Otherwise the current miscellaneous text attributes are specified in the current inherited state (cf property node PoMiscTextAttr
).
Note: Contour line annotations are not displayed if the mesh is not defined in the XY plane. For example, if a 2D mesh is defined as follows: X coordinates are constant, Y coordinates vary, and Z coordinates vary, (and zValuesIndex set with a value different from -1), the contour lines will be not annotated. In order to annotate contour lines for a mesh not defined in the XY plane, define it in the XY plane and apply a rotation.
File format/default:
valuesIndex | -1 |
coloringType | COLOR_INHERITED |
zValuesIndex | -1 |
vecsIndex | -1 |
valuesIndexForCellFilter | -1 |
moduleDataMapping | NULL |
majorPeriod | 3 |
firstMajor | 1 |
annotIsVisible | false |
annotPath | TANGENTIAL_PATH |
annotCrossStatus | CROSS_CONTOUR |
annotIsBackground | false |
annotIsContourClip | false |
annotGap | 1 |
annotClippingPolygon | 0 0 |
annotFontSize | 0 |
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic enum
Controls the annotations of contour lines.static enum
Type of annotations path.Nested classes/interfaces inherited from class com.openinventor.meshviz.data.PoMesh
PoMesh.ColoringTypes
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
FieldsModifier and TypeFieldDescriptionfinal SoMFVec2f
This is a polygon where no annotations are present outside it.Controls the annotations and contour lines crossing.final SoSFFloat
Font size factor of annotations of contour lines.final SoSFFloat
Font size of annotations of contour lines.final SoSFFloat
Curvilinear distance between two annotations of a same contour line.final SoSFBool
Defines if the annotations are framed by a background.final SoSFBool
Defines if the contour lines are clipped by the annotations.final SoSFBool
Contour lines annotations visibility.Annotations path.final SoSFUShort
Defines the first major contour lines.final SoSFUShort
Defines the major and the minor contour lines.Fields inherited from class com.openinventor.meshviz.data.PoMesh2D
zValuesIndex
Fields inherited from class com.openinventor.meshviz.data.PoMesh
coloringType, creaseAngle, moduleDataMapping, smoothTextureContouring, valuesIndex, valuesIndexForCellFilter, vecsIndex
Fields inherited from class com.openinventor.inventor.nodekits.SoBaseKit
boundingBoxIgnoring
Fields inherited from class com.openinventor.inventor.Inventor
VERBOSE_LEVEL, ZeroHandle
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic SoNodekitCatalog
Returns theSoNodekitCatalog
for this class.Gets the reference to aPbNumericDisplayFormat
.Gets a reference toPbMiscTextAttr
object.void
setFormat
(PbNumericDisplayFormat format) Sets a reference to aPbNumericDisplayFormat
object for the numerical display format for annotations of contour lines.void
setMiscTextAttr
(PbMiscTextAttr textAttr) Sets a reference toPbMiscTextAttr
object for miscellaneous text attributes of annotations of contour lines.Methods inherited from class com.openinventor.meshviz.data.PoMesh
getDataMapping, getIsovaluesList, getModuleDataMapping, setDataMapping, setIsovaluesList, setMesh, setModuleDataMapping
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 Details
-
majorPeriod
Defines the major and the minor contour lines. majorPeriod is the period of major contour lines. Only major contour lines can be annotated. See also firstMajor. By default, majorPeriod = 3. -
firstMajor
Defines the first major contour lines. See also majorPeriod. By default, firstMajor = 1. -
annotIsVisible
Contour lines annotations visibility. By default, annotIsVisible = false -
annotPath
Annotations path.- TANGENTIAL_PATH, annotations are tangential to the contour lines.
- HORIZONTAL_PATH, annotations are horizontal.
- VERTICAL_PATH, annotations are vertical.
By default, annotPath = TANGENTIAL_PATH.
-
annotCrossStatus
Controls the annotations and contour lines crossing.- CROSS_CONTOUR, annotations may cross contour lines.
- CROSS_MINOR_CONTOUR, annotations may cross only minor contour lines (but not major contour lines).
- DONT_CROSS_CONTOUR annotations do not cross any contour lines.
By default, annotCrossStatus = CROSS_CONTOUR.
Note that annotations may always cross the annotated contour line, however this field prevents annotations from crossing other contour lines.
-
annotIsBackground
Defines if the annotations are framed by a background. By default, annotIsBackground = false -
annotIsContourClip
Defines if the contour lines are clipped by the annotations. By default, annotIsContourClip = false -
annotGap
Curvilinear distance between two annotations of a same contour line. It is a multiplicative factor of the domain size or of the clipping polygon size (if it is defined). The distance used is equal to annotGap * Ds, where Ds is the max of the width and the height of the domain or of the polygon. By default, annotGap = 1. -
annotClippingPolygon
This is a polygon where no annotations are present outside it. If the point list is empty, the mesh limits will be used instead. By default, annotClippingPolygon = (0,0) -
annotFontSize
Font size of annotations of contour lines. This value is a multiplicative factor of the domain size or of the clipping polygon size (if it is defined). The font size used is equal to annotFontSize * Ds, where Ds is the max of the width and the height of the domain or of the clipping polygon. If this value is <= 0, the annotations font size is fixed at 0.04. By default, annotFontSize = 0. -
annotFontFactor
Font size factor of annotations of contour lines. This field is only interpreted when anSoProjection
node is applicable to contouring. By default, annotFontFactor = 1.
-
-
Constructor Details
-
PoMeshContouring
public PoMeshContouring()Constructor.
-
-
Method Details
-
setMiscTextAttr
Sets a reference toPbMiscTextAttr
object for miscellaneous text attributes of annotations of contour lines. If this method is not called the text attributes used are those of the default constructor ofPbMiscTextAttr
. -
getMiscTextAttr
Gets a reference toPbMiscTextAttr
object. See setMiscTextAttr. -
getFormat
Gets the reference to aPbNumericDisplayFormat
. See setFormat. -
getClassNodekitCatalog
Returns theSoNodekitCatalog
for this class. -
setFormat
Sets a reference to aPbNumericDisplayFormat
object for the numerical display format for annotations of contour lines. If this method is not called the format used is the one of the default constructor ofPbNumericDisplayFormat
.
-