Build a Polyhedronal cell.
More...
#include <MeshVizXLM/mesh/cell/MbPolyhedronCell.h>
Public Member Functions | |
template<typename _FacetNodeIter , typename _NumNodeIter > | |
MbPolyhedronCell (_FacetNodeIter beginFacetNode, _FacetNodeIter endFacetNode, _NumNodeIter beginNum, _NumNodeIter endNum) | |
virtual void | getIsosurfTopology (unsigned char, std::vector< std::pair< size_t, size_t > > &) const |
virtual size_t | getNumFacets () const |
virtual size_t | getNumEdges () const |
virtual size_t | getNumNodes () const |
virtual size_t | getNodeIndex (size_t nod) const |
virtual size_t | appendNodesIndexOfFacet (size_t facet, std::vector< size_t > &facetNodes) const |
virtual size_t | appendLocalNodesIndexOfFacet (size_t facet, std::vector< size_t > &facetNodes) const |
virtual bool | isPointInsideCell (const MiGeometryI &meshGeometry, const MbVec3d &point, std::vector< double > &weights) const |
virtual double | getRelativeSize (const MiGeometryI *meshGeometry) const |
MbPolyhedronCell::MbPolyhedronCell | ( | _FacetNodeIter | beginFacetNode, | |
_FacetNodeIter | endFacetNode, | |||
_NumNodeIter | beginNum, | |||
_NumNodeIter | endNum | |||
) | [inline] |
Construct a Polyhedron defined by its list of facet indices and number of indices per facet.
size_t MbPolyhedronCell::appendLocalNodesIndexOfFacet | ( | size_t | facet, | |
std::vector< size_t > & | facetNodes | |||
) | const [inline, virtual] |
Appends the array of local node indices belonging to a given facet to facetNodes.
[in] | facet | The index of the facet (where 0 <= facet < getNumFacets()). |
facetNodes | A vector in which the local node indices of the facet will be appended. The given vector should not be cleared by this method. The implementation must use the push_back() method to add elements to the vector. |
Reimplemented from MiVolumeCell.
size_t MbPolyhedronCell::appendNodesIndexOfFacet | ( | size_t | facet, | |
std::vector< size_t > & | facetNodes | |||
) | const [inline, virtual] |
Gets the node ids of the given face.
For instance appendNodesIndexOfFacet(0,facetNodes) append in the array facetNodes the node ids of the first face of this cell. the first node id of this cell.
facet | must be in the interval [0-getNumFacets()] | |
facetNodes | the returned list of facet nodes indices |
Implements MiVolumeCell.
virtual void MbPolyhedronCell::getIsosurfTopology | ( | unsigned | caseId, | |
std::vector< std::pair< size_t, size_t > > & | edgeList | |||
) | const [inline, virtual] |
Gets the list of topological polygons defining the part of the isosurface topology in this cell.
This method is used during isosurface and slice extraction on an unstructured mesh (for instance MoMeshPlaneSlice, MoMeshIsosurface, MiIsosurfExtractUnstructured). Static implementations are provided for the most common basic volume cells:
For polyhedral cells and non linear cells (for which no static implementation is available), returning an empty list can produce a hole in the isosurface. To avoid such a hole, this kind of cell must provide a decomposition into sub tetrahedra by the method getSubTetrahedronNodesIndex(). In case of polyhedral cells, one can also simply provide a polyhedral tessellator (
caseId | the isosurf "marching cube" entry for this cell. This is the value returned by getMarchingCaseId | |
edgeList | the list of pairs of nodes defining the isosurface topology in this cell. The given vector should not be cleared by this method. New pairs of node ids are appended to this vector. Each pair of nodes must correspond to an edge of the cell which is cut by the isosurface. An edge is cut by the isosurface when the two nodes of the edge have different signs. The pair of nodes must be correctly ordered to define a non manifold polygon. When the isosurface part is made up of several polygons, extra polygons must be separated by specific pairs (for instance <-1,-1> for mandatory polygons and <-1,0> for optional polygons). |
Implements MiVolumeCell.
size_t MbPolyhedronCell::getNodeIndex | ( | size_t | node | ) | const [inline, virtual] |
Gets the index (in the mesh) of a node.
[in] | node | Node number (where: 0 <= node < getNumNodes()). |
Implements MiCell.
size_t MbPolyhedronCell::getNumEdges | ( | ) | const [inline, virtual] |
Gets the number of edges.
size_t MbPolyhedronCell::getNumFacets | ( | ) | const [inline, virtual] |
Gets the number of facets.
Implements MiVolumeCell.
size_t MbPolyhedronCell::getNumNodes | ( | ) | const [inline, virtual] |
Gets the number of nodes.
Implements MiCell.
double MbPolyhedronCell::getRelativeSize | ( | const MiGeometryI * | meshGeometry | ) | const [inline, virtual] |
Gets the relative size of the cell.
Reimplemented from MiCell.
bool MbPolyhedronCell::isPointInsideCell | ( | const MiGeometryI & | meshGeometry, | |
const MbVec3d & | point, | |||
std::vector< double > & | weights | |||
) | const [inline, virtual] |
Checks if a point is inside or outside a cell.
Reimplemented from MiCell.