Property node that defines the draw style of representations. More...
#include <MeshVizXLM/mapping/nodes/MoDrawStyle.h>
Public Member Functions | |
virtual SoType | getTypeId () const |
MoDrawStyle () | |
Static Public Member Functions | |
static SoType | getClassTypeId () |
Public Attributes | |
SoSFBool | displayFaces |
SoSFBool | displayEdges |
SoSFBool | displayPoints |
SoSFFloat | fadingThreshold |
This node specifies the draw style to be used in subsequent nodes inheriting from MoMeshRepresentation and defining a surface or a line.
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.
displayFaces | TRUE |
displayEdges | FALSE |
displayPoints | FALSE |
fadingThreshold | 0 |
PEBIMeshViz, QuadraticWheelHexa27, Turbine, CellShapeConnectedFromSkin, ClipLine, ClipLineOnSkin, ElevatedPlaneSLice, EnhancedColoring, FenceSlice, FenceSliceSelection, Isoline, Legend, MaterialAndDrawStyle, Polyhedron, QuadraticHexa20, QuadraticHexa27, QuadraticTetra10, QuadraticTube, QuadraticWedge18, QuadraticWheelHexa20, QuadraticWheelTetra10, QuadraticWheelWedge18, SphereCylinderPlaneSlices, Streamlines, TutorialPicking1, TutorialPicking2, TutorialPicking3, TutorialPicking4, TutorialPicking5, TutorialPicking6, TutorialPicking7, TutorialPicking8, TutorialPicking9, WheelHexa8
MoDrawStyle::MoDrawStyle | ( | ) |
Constructor.
static SoType MoDrawStyle::getClassTypeId | ( | ) | [static] |
Returns the type identifier for this class.
Reimplemented from MoActionNode.
virtual SoType MoDrawStyle::getTypeId | ( | ) | const [virtual] |
Returns the type identifier for this specific instance.
Reimplemented from MoActionNode.
The display mode for mesh edges.
When set to TRUE, the edges of faces are displayed. Otherwise, they are not displayed (Default).
The display mode for mesh faces.
When set to TRUE (default), the surface of mesh representations are filled. Otherwise, they are not filled.
The display mode for mesh node points.
When set to TRUE, the node points are displayed. Otherwise, they are not displayed (Default).
Threshold allowing to fade out extra styles of a 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::TransparencyType documentation in order to be aware of known transparency limitations (AA compatibility).