Representation of cross section of a volume mesh. More...
#include <MeshViz/3Ddata/PoMeshCrossSection.h>
Public Types | |
enum | CrossSectionMethod { DEFAULT, ISOSURFACE, INTERSECTION } |
Public Member Functions | |
virtual SoType | getTypeId () const |
virtual const SoNodekitCatalog * | getNodekitCatalog () const |
PoMeshCrossSection () | |
virtual void | rebuild () |
void | setCrossSectionMethod (CrossSectionMethod method=DEFAULT) |
Static Public Member Functions | |
static SoType | getClassTypeId () |
static const SoNodekitCatalog * | getClassNodekitCatalog () |
Public Attributes | |
SoSFPlane | plane |
Class to build a filled representation of a cross-section in a volume mesh.
If the field PoMesh::valuesIndex is not defined (or if coloringType = COLOR_INHERITED), the representation uses only one inherited color. If the field PoMesh::valuesIndex is defined (and if coloringType != COLOR_INHERITED), the representation is colored by using the current data mapping applied to each mesh node value. (see PoMesh for more explanations about the current data-mapping).
The vector data of the mesh for this representation is unused.
When using the ISOSURFACE mode, the cross section can be generated by using either a triangle strip set or an indexed face set depending on the preference variable SoPreference::OIV_3DDATA_USE_TRIANGLE_STRIP_SET
plane | Z=0 plane |
valuesIndex | -1 |
coloringType | COLOR_INHERITED |
vecsIndex | -1 |
valuesIndexForCellFilter | -1 |
moduleDataMapping | NULL |
Specifies the method used to compute intersections.
DEFAULT |
Depending on the mesh type the cross section is computed either like an isosurface or by doing classic intersection. Classic intersections are done for PbParalCartesianGrid3D and PbRegularCartesianGrid3D. An isosurface is computed for all other mesh types. |
ISOSURFACE |
The cross section is computed like an isosurface. |
INTERSECTION |
The cross section is computed by doing classic intersections Be careful, this method doesn't support cell filtering (PoCellFilter). |
PoMeshCrossSection::PoMeshCrossSection | ( | ) |
Constructor.
static const SoNodekitCatalog* PoMeshCrossSection::getClassNodekitCatalog | ( | ) | [static] |
Returns the SoNodekitCatalog for this class.
Reimplemented from PoMesh3D.
static SoType PoMeshCrossSection::getClassTypeId | ( | ) | [static] |
Returns the type identifier for this class.
Reimplemented from PoMesh3D.
virtual const SoNodekitCatalog* PoMeshCrossSection::getNodekitCatalog | ( | ) | const [virtual] |
Returns the SoNodekitCatalog for this instance.
Reimplemented from PoMesh3D.
virtual SoType PoMeshCrossSection::getTypeId | ( | ) | const [virtual] |
Returns the type identifier for this specific instance.
Reimplemented from PoMesh3D.
virtual void PoMeshCrossSection::rebuild | ( | ) | [virtual] |
void PoMeshCrossSection::setCrossSectionMethod | ( | CrossSectionMethod | method = DEFAULT |
) | [inline] |
Specifies the method used to build this shape.
By default PoMeshCrossSection builds a shape by computing an isosurface on a non regular mesh. The node's data are the distances to the plane. This method is safe but it uses a significant amount of memory for each instance of PoMeshCrossSection.
Calling setCrossSectionMethod(INTERSECTION) forces the use of the classic method. The classic method computes the shapes by intersecting each cell with the plane. However it can be risky as it assumes that each mesh's cell is convex and therefore that the intersection of a plane and a cell's face can produce only one edge. Using the classic method with concave faces may produce unpredictable results or an infinite loop.
The environment variable OIV_3DDATA_CROSS_SECTION_METHOD can also be set to specify the method used to build this shape. It can take the values INTERSECTION or ISOSURFACE. However, calling setCrossSectionMethod overrides this environment variable.
method | DEFAULT by default. |
Position of the cross section.
Z=0 plane by default.