Class MoDrawStyle
- All Implemented Interfaces:
SafeDisposable
This node specifies the draw style to be used in subsequent nodes inheriting
from MoMeshRepresentation
and defining a surface or a line:
- the
displayFaces
field controls drawing cell faces as solid - the
displayEdges
field controls drawing cell edges - the
displayPoints
field controls drawing node points - the
fadingThreshold
field controls fading out on node points and cell edges from surfaces
No Edge Fading | Edge Fading |
![]() |
![]() |
See MoMaterial
for setting the rendering attributes of facets, edges
and points.
Use this node, for example, to efficiently render a colored surface and the outlines of its cells using a single rendering node.
When the fields displayFaces
and
displayEdges
are true, it is possible that a surface (for
instance extracted by a MoMeshSkin or a MoMeshSlab) is rendered in 2 passes.
The first pass draws the cell faces of the surface, and the second pass draws
the cell edges in addition to the faces. The rendering in 2 passes can occur
only for very large surface (containing millions of triangles or quadrangles)
where the first pass can be done quickly before starting additional
computations to display the edges.
Note: The rendering of surfaces extracted from an unstructured grid is always
done in one pass.
- See Also:
-
Nested Class Summary
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 TypeFieldDescriptionThe display mode for mesh edges.
When set totrue
the edges of cells are displayed.The display mode for mesh faces.
When set totrue
(default), the surface of mesh representations are filled.The display mode for mesh node points.
When set totrue
, the node points are displayed.Threshold allowing to fade out extra styles of a surface representation as it gets away from the view point.
If fadingThreshold is 0, no fading is done.Fields inherited from class com.openinventor.inventor.Inventor
VERBOSE_LEVEL, ZeroHandle
-
Constructor Summary
ConstructorsConstructorDescriptionConstructs a property node with draw style set to default values. -
Method Summary
Methods inherited from class com.openinventor.meshvizxlm.mapping.nodes.MoActionNode
callback, distribute, getBoundingBox, getMatrix, getPrimitiveCount, getRenderEngineMode, GLRender, handleEvent, pick, rayPick
Methods inherited from class com.openinventor.inventor.nodes.SoNode
affectsState, copy, copy, getAlternateRep, getByName, getRenderUnitID, GLRenderBelowPath, GLRenderInPath, GLRenderOffPath, grabEventsCleanup, grabEventsSetup, isBoundingBoxIgnoring, isOverride, 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, set, 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
-
displayFaces
The display mode for mesh faces.
When set totrue
(default), the surface of mesh representations are filled. Otherwise, they are not filled. -
displayEdges
The display mode for mesh edges.
When set totrue
the edges of cells are displayed. Otherwise, they are not displayed (default). -
displayPoints
The display mode for mesh node points.
When set totrue
, the node points are displayed. Otherwise, they are not displayed (default). -
fadingThreshold
Threshold allowing to fade out extra styles of a surface representation as it gets away from the view point.
If fadingThreshold is 0, no fading is done. This is the default behavior. If fadingThreshold>
0, a fading effect may occur on the rendering.
In many cases, this field is just interpreted as a boolean value (fading/no fading) for edges rendering. That means that in many cases, the edge fading is done automatically without needing any threshold value, i.e. the floating value of the field is just ignored.
However in some cases, we have some limitation that needs to use a threshold value. For those cases, this threshold defines the pixel length limit on screen under which edges start fading out. Setting the threshold to 5 leads to fade out edges with less than 5 pixels on screen.
Rendering a surface containing some polygons with more than 8 edges is a typical example where the threshold value is needed.
In any case, the floating value of the threshold is used to fade out the points.Note: when the fading is activated, a transparency is required so be sure to check
SoGLRenderAction.TransparencyTypes
documentation in order to be aware of known transparency limitations (AA compatibility).
-
-
Constructor Details
-
MoDrawStyle
public MoDrawStyle()Constructs a property node with draw style set to default values.displayFaces = true
displayEdges = false
displayPoints = false
fadingThreshold = 0
-
-
Method Details