Representation of vectors data of a surface mesh. More...
#include <MeshViz/3Ddata/PoMesh2DVec.h>
Class to build a vectors field on a surface mesh. This class handles all vectors attributes. A vector is represented by an arrow made of 3 parts, the body, the start-shape and the end-shape. The body is a line or a cylinder starting from a node of the mesh. The start-shape is a pattern drawn at the node position. The end-shape is a pattern drawn at the other extremity of the body. Several type of pattern can be used to draw the shape. The 3 parts can be scaled and colored according to the value of the different fields of the class.
The current mesh is used for the representation of vectors. See PoMesh for more explanations about the current mesh. The vectors of the mesh to be drawn, are defined by the method addVecsSet of the current mesh (see PoMeshProperty, PbMesh or PbMesh2D), and by the field PoMesh::vecsIndex. The node of the mesh are used as start point of the representation of the vectors.
density | 1 |
eliminationStatus | NONE |
minLength | 0.0 |
maxLength | 1E30 |
bodyShape | LINE |
bodyLengthType | RELATIVE_LENGTH |
bodyLengthFactor | 1.0 |
bodyRadiusType | CONSTANT_RADIUS |
bodyRadiusFactor | 0.02 |
bodyColoringType | CONSTANT_COLOR |
startArrowShape | NO_SHAPE |
startArrowHeightType | RELATIVE_HEIGHT |
startArrowHeightFactor | 0.1 |
startArrowRadiusFactor | 0.5 |
startArrowColoringType | CONSTANT_COLOR |
endArrowShape | CHEVRON |
endArrowHeightType | RELATIVE_HEIGHT |
endArrowHeightFactor | 0.1 |
endArrowRadiusFactor | 0.5 |
endArrowColoringType | CONSTANT_COLOR |
coloringType | COLOR_INHERITED |
valuesIndex | -1 |
valuesIndexForCellFilter | -1 |
vecsIndex | -1 |
moduleDataMapping | NULL |
zValuesIndex | -1 |
PoMesh2DVec::PoMesh2DVec | ( | ) |
Constructor.
static const SoNodekitCatalog* PoMesh2DVec::getClassNodekitCatalog | ( | ) | [static] |
Returns the SoNodekitCatalog for this class.
Reimplemented from PoMesh2D.
static SoType PoMesh2DVec::getClassTypeId | ( | ) | [static] |
Returns the type identifier for this class.
Reimplemented from PoMesh2D.
virtual const SoNodekitCatalog* PoMesh2DVec::getNodekitCatalog | ( | ) | const [virtual] |
Returns the SoNodekitCatalog for this instance.
Reimplemented from PoMesh2D.
virtual SoType PoMesh2DVec::getTypeId | ( | ) | const [virtual] |
Returns the type identifier for this specific instance.
Reimplemented from PoMesh2D.
virtual void PoMesh2DVec::rebuild | ( | ) | [virtual] |
coloring method of the body.
If bodyColoringType = CONSTANT_COLOR, each vector has the same body color, which is the last found during the scene graph traversal.
If bodyColoringType = MODULE_MAPPING_COLOR, the body's color of a vector depends on its module, and by using the current module-data-mapping (see PoMesh for explanation of the current module-data-mapping).
If bodyColoringType = SCALAR_MAPPING_COLOR, the body's color of a vector depends on the scalar value at the mesh node used as the start point of the body. In this case, the current data-mapping is used to compute the color in relation to the scalar-value (see PoMesh for more explanations about the current data-mapping). Use enum ArrowColoringType.
Length (or length multiplicative factor) of the body shape.
If bodyLengthType = CONSTANT_LENGTH, each vector has the same body length = bodyLengthFactor .
If bodyLengthType = RELATIVE_LENGTH, the body length of a vector is bodyLengthFactor * vector-module.
Radius (or radius multiplicative factor) of the cylinder.
Defines type of method to compute the cylinder's radius.
If bodyRadiusType = CONSTANT_RADIUS, each vector has the same body radius = bodyRadiusFactor . If bodyRadiusType = RELATIVE_RADIUS, the body radius of a vector is bodyRadiusFactor * vector-module. The body radius is either a line-width or a cylinder-radius depending on the field's value bodyShape.
Type of shape (no body, line, cylinder) used to draw the body.
If bodyShape = NO_BODY, the body of each vector is invisible.
Vector field density filter.
If density = 1, each vector of the mesh is drawn. If density = 2, one vector every 2 vectors is drawn...
If eliminationStatus = TOO_SMALL, the vectors which module is lower than minLength are not drawn.
If eliminationStatus = TOO_LONG, the vectors which module is greater than maxLength are not drawn. If eliminationStatus = TOO_SMALL_OR_LONG, the vectors which module is lower than minLength or greater than maxLength are not drawn. If eliminationStatus = NONE, each vector selected by the density filter is drawn.
Coloring method of the end shape.
If endArrowColoringType = CONSTANT_COLOR, each vector has the same end-arrow's color, which is the last found during the scene graph traversal.
If endArrowColoringType = MODULE_MAPPING_COLOR, the end-arrow's color of a vector depends on its module, and by using the current module-data- mapping (see PoMesh for explanation of the current module-data-mapping).
If endArrowColoringType = SCALAR_MAPPING_COLOR, the end-arrow's color of a vector depends on the scalar value at the mesh node used as the end point of the end-arrow. In this case, the current data-mapping is used to compute the color in relation to the scalar-value (see PoMesh for more explanations about the current data-mapping).
Height (or Height multiplicative factor) of the arrow shape.
Defines the type of method to compute the arrow height.
If endArrowHeightType = CONSTANT_HEIGHT, each vector has the same end-shape height = endArrowHeightFactor . If endArrowHeightType = RELATIVE_ HEIGHT, the end-shape height of a vector is endArrowHeightFactor * body's length.
The end-arrow's radius is end-arrow's height * endArrowRadiusFactor.
Type of shape to be drawn at the end point of the body.
If endArrowShape = NO_SHAPE, the end-shape of each vector is invisible.
Maximum length of the vector to be drawn.
Only used when eliminationStatus is TOO_LONG or TOO_SMALL_OR_LONG
Minimum length of the vector to be drawn.
Only used when eliminationStatus is TOO_SMALL or TOO_SMALL_OR_LONG
Coloring method of the start shape.
If startArrowColoringType = CONSTANT_COLOR, each vector has the same start-arrow's color, which is the last found during the scene graph traversal.
If startArrowColoringType = MODULE_MAPPING_COLOR, the start-arrow's color of a vector depends on its module, and by using the current module-data- mapping (see PoMesh for explanation of the current module-data-mapping).
If startArrowColoringType = SCALAR_MAPPING_COLOR, the start-arrow's color of a vector depends on the scalar value at the mesh node used as the start point of the start-arrow. In this case, the current data-mapping is used to compute the color in relation to the scalar-value (see PoMesh for more explanations about the current data-mapping).
Height (or Height multiplicative factor) of the arrow shape.
Defines the type of method to compute the arrow height.
If startArrowHeightType = CONSTANT_HEIGHT, each vector has the same start-shape height = startArrowHeightFactor . If startArrowHeightType = RELATIVE_ HEIGHT, the end-shape height of a vector is startArrowHeightFactor * body's length.
The start-arrow's radius is start-arrow's height * startArrowRadiusFactor.
Type of shape to be drawn at the start point of the body.
If startArrowShape = NO_SHAPE, the start-shape of each vector is invisible.