Open Inventor Release 2024.1.3
 
Loading...
Searching...
No Matches
MiSurfaceCell Class Reference

MeshViz Defines an abstract cell of an unstructured surface mesh. More...

#include <MeshVizXLM/mesh/cell/MiSurfaceCell.h>

+ Inheritance diagram for MiSurfaceCell:

Public Member Functions

virtual size_t getSubTriangleNodesIndex (std::vector< size_t > &triangleNodeIds) const
 Get a decomposition of this surface cell into sub triangles.
 
- Public Member Functions inherited from MiCell
virtual ~MiCell ()
 Virtual destructor.
 
virtual size_t getNumNodes () const =0
 Gets the number of nodes.
 
virtual size_t getNodeIndex (size_t node) const =0
 Gets the index (in the mesh) of a node.
 
virtual double getRelativeSize (const MiGeometryI *meshGeometry) const
 Gets the relative size of the cell.
 
virtual void getWeight (const MbVec3d &ipcoord, std::vector< double > &weight) const
 Gets the weights of a point defined by its iso parametric coordinates.
 
virtual MbVec3d getIsoParametricCoord (size_t nodeIndex) const
 Gets the iso parametric coordinates of a cell's node.
 
virtual MbVec3d getCenter (const MiGeometryI &geometry) const
 Gets the center of the cell.
 
virtual bool isPointInsideCell (const MiGeometryI &meshGeometry, const MbVec3d &point, std::vector< double > &weights) const
 Checks if a point is inside or outside a cell.
 

Additional Inherited Members

- Protected Member Functions inherited from MiCell
virtual std::ostream & toStream (std::ostream &s) const
 Performs an output operation on a stream which is returned afterward.
 

Detailed Description

MeshViz Defines an abstract cell of an unstructured surface mesh.

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.

The implementation of all the methods of this class must be thread-safe because it might be called concurrently by multiple threads. If the implementation can't be thread-safe, MeshViz XLM must be forced to use only 1 thread. It can be done by calling MiMeshViz::init(1) or MoMeshViz::init(1) or setting the parallel argument to false for each extractor instantiation. For instance by calling MiSkinExtractUnstructured::getNewInstance(&mesh, false);

See also
MeXSurfaceCell
MiSurfaceTopologyExplicitI
MiTessellator
MxTriangleCellExtract, MxTriangle6CellExtract
MxQuadrangleCellExtract, MxQuadrangle8CellExtract, MxQuadrangle9CellExtract

Definition at line 69 of file MiSurfaceCell.h.

Member Function Documentation

◆ getSubTriangleNodesIndex()

virtual size_t MiSurfaceCell::getSubTriangleNodesIndex ( std::vector< size_t > &  triangleNodeIds) const
inlinevirtual

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.

Parameters
[out]triangleNodeIdssub-triangle node id (where: 0 <= triangleNodeIds[i] < getNumNodes() for each i).
Returns
the number of sub-triangles in this cell.

Definition at line 89 of file MiSurfaceCell.h.


The documentation for this class was generated from the following file: