Defines an abstract cell of an unstructured surface mesh. More...
#include <MeshVizXLM/mesh/cell/MiSurfaceCell.h>
Public Member Functions | |
virtual size_t | getSubTriangleNodesIndex (std::vector< size_t > &triangleNodeIds) const |
A surface cell is a polygonal element that connects adjacent nodes of a surface mesh.
This class defines the method getSubTriangleNodesIndex(), which is only useful for non linear 2D cells. For linear 2D cells, the application only needs to implement the methods defined in MiCell without overriding getSubTriangleNodesIndex().
When the result of getSubTriangleNodesIndex() is > 0, the cell is considered a non linear cell. In that case, the given sub triangulation is used by various extractors (for instance MiTessellatedSurfaceExtract) and mesh representation classes (for instance MoMeshSurface, MoMeshCellShape). Furthermore if an MiTessellator is given, each sub triangle is tessellated by the method MiTessellator::tessellateSurfaceCell().
The utility classes MxXXXCellExtract can be used to help the application implement the various methods of MiCell and MiSurfaceCell. These classes provide static implementations of the necessary methods for the most common linear and quadratic surface cells.
virtual size_t MiSurfaceCell::getSubTriangleNodesIndex | ( | std::vector< size_t > & | triangleNodeIds | ) | const [inline, virtual] |
Get a decomposition of this surface cell into sub triangles.
This method must be overridden to correctly handle non-linear cells. For instance an implementation of this method for a quadratic triangle like the following one
Triangulation of a quadratic triangle.
should return 4, and triangleNodeIds = {0,3,5, 3,1,4, 3,4,5, 5,4,2}. (provided that getNodeIndex() follows this triangle node numbering).
By default the method returns 0 and the argument triangleNodeIds is not modified. It must not be overridden for a linear cell.
[out] | triangleNodeIds | sub-triangle node id (where: 0 <= triangleNodeIds[i] < getNumNodes() for each i). |