Class PoMeshContouring
- java.lang.Object
-
- All Implemented Interfaces:
SafeDisposable
public class PoMeshContouring extends PoMesh2D
Class to build contour lines on a 2D mesh. Builds contour lines on a 2D mesh. These contour lines are computed from a level values list and the nodes scalar values of the mesh. The level value list is defined by thePoMesh.setIsovaluesList()
method or by the currentPoIsovaluesList
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 nodePoMiscTextAttr
).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 <!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML//EN"> <html> <head> <link REL="stylesheet" TYPE="text/css" HREF="../../stylesheet.css" TITLE="Style"> <title></title> </head> <BODY> <h1></h1> <h4> <A NAME="Heading1009">CATALOG PARTS</A></h4> <ul><b>PoMeshContouring</b> {</ul> <ul><ul><b>Separator</b> <tt>alternateRep</tt> (from PoBase) {<br> </ul></ul> <ul><ul><ul><b>AppearanceKit</b> <tt>appearance</tt> (from PoBase)</ul></ul></ul> <ul><ul><ul><i>Specifies the appearance of all the kit. By default lightModel.model=BASE_COLOR.</i></ul></ul></ul> <ul><ul><ul><b>MatrixTransform</b> <tt>domainTransform</tt> (from PoBase)</ul></ul></ul> <ul><ul><ul><i>Corresponds to the domain transformation.</i></ul></ul></ul> <ul><ul><ul><b>Separator</b> <tt>majorContourLineSep</tt> {</ul></ul></ul> <ul><ul><ul><i>Contains properties and shapes to draw major contour lines.</i></ul></ul></ul> <ul><ul><ul><ul><b>AppearanceKit</b> <tt>majorContourLineApp</tt></ul></ul></ul></ul> <ul><ul><ul><ul><i>Specifies the appearance of major contour lines.</i></ul></ul></ul></ul> <ul><ul><ul><ul><b>Group</b> <tt>majorContourLine</tt></ul></ul></ul></ul> <ul><ul><ul><ul><i>Contains a SoLineSet shape to draw major contour lines.</i></ul></ul></ul></ul> <ul><ul><ul>}<br> <b>Separator</b> <tt>minorContourLineSep</tt> {</ul></ul></ul> <ul><ul><ul><i>Contains properties and shapes to draw minor contour lines.</i></ul></ul></ul> <ul><ul><ul><ul><b>AppearanceKit</b> <tt>minorContourLineApp</tt></ul></ul></ul></ul> <ul><ul><ul><ul><i>Specifies the appearance of minor contour lines.</i></ul></ul></ul></ul> <ul><ul><ul><ul><b>Group</b> <tt>minorContourLine</tt></ul></ul></ul></ul> <ul><ul><ul><ul><i>Contains a SoLineSet shape to draw minor contour lines.</i></ul></ul></ul></ul> <ul><ul><ul>}<br> <br> <b>Separator</b> <tt>annotBackgroundSep</tt> {</ul></ul></ul> <ul><ul><ul><i>Contains properties and shapes to draw background of annotations.</i></ul></ul></ul> <ul><ul><ul><ul><b>AppearanceKit</b> <tt>annotBackgroundApp</tt></ul></ul></ul></ul> <ul><ul><ul><ul><i>Specifies the appearance of background of annotations.</i></ul></ul></ul></ul> <ul><ul><ul><ul><b>Group</b> <tt>annotBackground</tt></ul></ul></ul></ul> <ul><ul><ul><ul><i>Contains a SoFaceSet shape to draw background of annotations.</i></ul></ul></ul></ul> <ul><ul><ul>}<br> <br> <b>Separator</b> <tt>annotBackgroundBorderSep</tt> {</ul></ul></ul> <ul><ul><ul><i>Contains properties and shapes to draw background border of annotations.</i></ul></ul></ul> <ul><ul><ul><ul><b>AppearanceKit</b> <tt>annotBackgroundBorderApp</tt></ul></ul></ul></ul> <ul><ul><ul><ul><i>Specifies the appearance of background border of annotations.</i></ul></ul></ul></ul> <ul><ul><ul><ul><b>Group</b> <tt>annotBackgroundBorder</tt></ul></ul></ul></ul> <ul><ul><ul><ul><i>Contains a SoLineSet shape to draw background border of annotations.</i></ul></ul></ul></ul> <ul><ul><ul>}<br> <br> <b>Separator</b> <tt>annotTextSep</tt> {</ul></ul></ul> <ul><ul><ul><i>Contains properties and shapes to draw the text of annotations.</i></ul></ul></ul> <ul><ul><ul><ul><b>AppearanceKit</b> <tt>annotTexApp</tt></ul></ul></ul></ul> <ul><ul><ul><ul><i>Specifies the appearance of the text of annotations. By default drawStyle.style=LINES. font.size and font.name are set when the kit is rebuilt.</i></ul></ul></ul></ul> <ul><ul><ul><ul><b>Group</b> <tt>annotText</tt></ul></ul></ul></ul> <ul><ul><ul><ul><i>Contains a list of SoAnnoText3 shapes to draw the text of annotations.</i></ul></ul></ul></ul> <ul><ul><ul>}</ul></ul></ul> <ul><ul>}</ul></ul> <ul>}</ul> <ul><ul><br> </ul></ul> </body> </html>
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
PoMeshContouring.AnnotCrossStatusType
Controls the annotations of contour lines.static class
PoMeshContouring.AnnotPaths
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
Fields Modifier and Type Field Description SoMFVec2f
annotClippingPolygon
This is a polygon where no annotations are present outside it.SoSFEnum<PoMeshContouring.AnnotCrossStatusType>
annotCrossStatus
Controls the annotations and contour lines crossing.SoSFFloat
annotFontFactor
Font size factor of annotations of contour lines.SoSFFloat
annotFontSize
Font size of annotations of contour lines.SoSFFloat
annotGap
Curvilinear distance between two annotations of a same contour line.SoSFBool
annotIsBackground
Defines if the annotations are framed by a background.SoSFBool
annotIsContourClip
Defines if the contour lines are clipped by the annotations.SoSFBool
annotIsVisible
Contour lines annotations visibility.SoSFEnum<PoMeshContouring.AnnotPaths>
annotPath
Annotations path.SoSFUShort
firstMajor
Defines the first major contour lines.SoSFUShort
majorPeriod
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 Constructor Description PoMeshContouring()
Constructor.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static SoNodekitCatalog
getClassNodekitCatalog()
Returns theSoNodekitCatalog
for this class.PbNumericDisplayFormat
getFormat()
Gets the reference to aPbNumericDisplayFormat
.PbMiscTextAttr
getMiscTextAttr()
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 Detail
-
majorPeriod
public final SoSFUShort 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
public final SoSFUShort firstMajor
Defines the first major contour lines. See also majorPeriod. By default, firstMajor = 1.
-
annotIsVisible
public final SoSFBool annotIsVisible
Contour lines annotations visibility. By default, annotIsVisible = false
-
annotPath
public final SoSFEnum<PoMeshContouring.AnnotPaths> 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
public final SoSFEnum<PoMeshContouring.AnnotCrossStatusType> 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
public final SoSFBool annotIsBackground
Defines if the annotations are framed by a background. By default, annotIsBackground = false
-
annotIsContourClip
public final SoSFBool annotIsContourClip
Defines if the contour lines are clipped by the annotations. By default, annotIsContourClip = false
-
annotGap
public final SoSFFloat 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
public final SoMFVec2f 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
public final SoSFFloat 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
public final SoSFFloat 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.
-
-
Method Detail
-
setMiscTextAttr
public void setMiscTextAttr(PbMiscTextAttr textAttr)
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
public PbMiscTextAttr getMiscTextAttr()
Gets a reference toPbMiscTextAttr
object. See setMiscTextAttr.
-
getFormat
public PbNumericDisplayFormat getFormat()
Gets the reference to aPbNumericDisplayFormat
. See setFormat.
-
getClassNodekitCatalog
public static SoNodekitCatalog getClassNodekitCatalog()
Returns theSoNodekitCatalog
for this class.
-
setFormat
public void setFormat(PbNumericDisplayFormat format)
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
.
-
-