23#ifndef _MiVolumeCell_H
24#define _MiVolumeCell_H
27# pragma warning( push )
28# pragma warning(disable:4250)
34#include <Inventor/STL/vector>
35#include <Inventor/STL/utility>
133 virtual size_t getSubTriangleNodesIndex(
size_t SO_UNUSED_PARAM(facet), std::vector<size_t>& SO_UNUSED_PARAM(triangleNodeIds))
const
176 throw MiAbstractMethodError(
"MiVolumeCell::appendLocalNodesIndexOfFacet(size_t facet, std::vector<size_t>& facetNodes)");
213 virtual void getIsosurfTopology(
unsigned char caseId, std::vector< std::pair<size_t,size_t> >& edgeList )
const = 0;
229 virtual unsigned char getMarchingCaseId(std::vector<bool> &nodesSign,
size_t beginNodeId=0)
const;
242 virtual MbVec3d getFacetCenter(
size_t SO_UNUSED_PARAM(facet),
const MiGeometryI& SO_UNUSED_PARAM(geometry))
const;
248 virtual std::ostream&
toStream(std::ostream& s)
const;
256 unsigned char caseId = 0;
257 unsigned char maxId = 0;
261 if (nodesSign[
getNodeIndex(i)-beginNodeId]) caseId |= (1<<i);
273 std::vector<size_t> facetNodes;
276 for (
size_t n = 0; n < numFacetNodes; ++n)
277 facetCenter += geometry.getCoord(facetNodes[n]);
278 return ( facetCenter / (
double) numFacetNodes );
285 s <<
"# num cell's facets" << std::endl;
288 s <<
"# num cell's nodes" << std::endl;
291 std::vector<size_t> facetNodes;
295 s << std::endl <<
"[";
297 for (
size_t j=0; j<facetNodes.size(); ++j)
298 s << facetNodes[j] <<
" ";
308# pragma warning( pop )
#define MESHVIZXLM_EXTR_API
<a href="IconLegend.html"><img src="extMV.gif" alt="MeshViz" border="0"></a> Exception handler for Me...
<a href="IconLegend.html"><img src="extMV.gif" alt="MeshViz" border="0"></a> Defines an abstract cell...
virtual size_t getNodeIndex(size_t node) const =0
Gets the index (in the mesh) of a node.
virtual size_t getNumNodes() const =0
Gets the number of nodes.
virtual std::ostream & toStream(std::ostream &s) const
Performs an output operation on a stream which is returned afterward.
<a href="IconLegend.html"><img src="extMV.gif" alt="MeshViz" border="0"></a> Generic geometry interfa...
<a href="IconLegend.html"><img src="extMV.gif" alt="MeshViz" border="0"></a> Defines an abstract cell...
virtual size_t appendLocalNodesIndexOfFacet(size_t facet, std::vector< size_t > &facetNodes) const
Appends the array of local node indices belonging to a given facet to facetNodes.
virtual size_t getSubTriangleNodesIndex(size_t facet, std::vector< size_t > &triangleNodeIds) const
Get a triangulation of the given facet of a non linear volume cell.
virtual void getIsosurfTopology(unsigned char caseId, std::vector< std::pair< size_t, size_t > > &edgeList) const =0
Gets the list of topological polygons defining the part of the isosurface topology in this cell.
virtual unsigned char getMarchingCaseId(std::vector< bool > &nodesSign, size_t beginNodeId=0) const
Gets the isosurface "marching cube" entry according to the sign of each node in the cell.
virtual size_t getNumFacets() const =0
Gets the number of facets.
virtual size_t getSubTetrahedronNodesIndex(std::vector< size_t > &tetrahedronNodeIds) const
Get a decomposition in sub-tetrahedra of this volume cell.
virtual std::ostream & toStream(std::ostream &s) const
Performs an output operation on a stream which is returned afterward.
virtual size_t appendNodesIndexOfFacet(size_t facet, std::vector< size_t > &facetNodes) const =0
Appends the array of node indices belonging to a given facet to facetNode.
virtual MbVec3d getFacetCenter(size_t facet, const MiGeometryI &geometry) const
Gets the center of the specified cell facet.