Utility class for polyhedron cells.
More...
#include <MeshVizXLM/extractors/MxPolyhedronCellExtract.h>

static void  getWeight (const MiGeometryI &meshGeometry, const MiVolumeCell *polyhedronCell, const MbVec3d &point, std::vector< double > &weights) 
 Gets the barycentric weights in the given polyhedron cell of the given point.


static double  getLongestDistance (const MiGeometryI &meshGeometry, const MiVolumeCell *polyhedronCell) 
 Gets the longest distance inside the given polyhedron cell.


static double  getShortestDistance (const MiGeometryI &meshGeometry, const MiVolumeCell *polyhedronCell) 
 Gets the shortest distance inside the given polyhedron cell.


static bool  isPointInsideCell (const MiGeometryI &meshGeometry, const MiVolumeCell *polyhedronCell, const MbVec3d &point, std::vector< double > &weights) 
 Checks if a point is inside the given polyhedron cell.


static MbVec3d  getFacetNormal (size_t facet, const MiGeometryI &meshGeometry, const MiVolumeCell *polyhedronCell) 
 Computes the average normal to a planar or almostplanar polygon facet of a the given polyhedron cell.


Utility class for polyhedron cells.
Utility class that provides a static implementation of the MiVolumeCell's methods for a polyhedron cell. This class is provided to make easier the creation of a class that implements the MiVolumeCell interface for a polyhedron cell.
This implementation of getWeight() method assumes that a polyhedron is defined as a set of oriented polygons such that their normal is pointing to the inside ( each facet vertices are ordered in an counterclockwise direction looking from the inside).
Definition at line 53 of file MxPolyhedronCellExtract.h.
◆ getFacetNormal()
Computes the average normal to a planar or almostplanar polygon facet of a the given polyhedron cell.
This is done by using Newell's method.
 Parameters

[in]  facet  The number of the facet in the polyhedron cell. 
[in]  meshGeometry  The geometry of the mesh. 
[in]  polyhedronCell  The input cell. 
◆ getLongestDistance()
static double MxPolyhedronCellExtract::getLongestDistance 
( 
const MiGeometryI & 
meshGeometry, 


const MiVolumeCell * 
polyhedronCell 

) 
 

static 
Gets the longest distance inside the given polyhedron cell.
 Parameters

[in]  meshGeometry  The geometry of the mesh. 
[in]  polyhedronCell  The input cell. 
◆ getShortestDistance()
static double MxPolyhedronCellExtract::getShortestDistance 
( 
const MiGeometryI & 
meshGeometry, 


const MiVolumeCell * 
polyhedronCell 

) 
 

static 
Gets the shortest distance inside the given polyhedron cell.
 Parameters

[in]  meshGeometry  The geometry of the mesh. 
[in]  polyhedronCell  The input cell. 
◆ getWeight()
static void MxPolyhedronCellExtract::getWeight 
( 
const MiGeometryI & 
meshGeometry, 


const MiVolumeCell * 
polyhedronCell, 


const MbVec3d & 
point, 


std::vector< double > & 
weights 

) 
 

static 
Gets the barycentric weights in the given polyhedron cell of the given point.
 Note
 Each node coordinate of the given cell is retrieved in the following way:
meshGeometry.getCoord(polyhedronCell>getNodeIndex(i))
for each i with 0 <= i < polyhedronCell>getNumNodes()
 Parameters

[in]  meshGeometry  The geometry of the mesh. 
[in]  polyhedronCell  The input cell. 
[in]  point  The input point given in the same space coordinate as meshGeometry. 
[out]  weights  This method computes the N values weights[0,N1], where N=polyhedronCell>getNumNodes(). It assumes the weights vector array has been already allocated. Its size must be set to N (at least) before calling this method, using for instance the weights.resize(N) 
◆ isPointInsideCell()
static bool MxPolyhedronCellExtract::isPointInsideCell 
( 
const MiGeometryI & 
meshGeometry, 


const MiVolumeCell * 
polyhedronCell, 


const MbVec3d & 
point, 


std::vector< double > & 
weights 

) 
 

static 
Checks if a point is inside the given polyhedron cell.
All weights must be positive. This static method helps to implement the method MiCell::isPointInsideCell(meshGeometry,point,weights) for a polyhedron cell.
 Note
 Each node coordinate of the given cell is retrieved in the following way:
meshGeometry.getCoord(polyhedronCell>getNodeIndex(i))
for each i with 0 <= i < polyhedronCell>getNumNodes()
 Parameters

[in]  meshGeometry  The geometry of the mesh. 
[in]  polyhedronCell  The input cell. 
[in]  point  The input point given in the same space coordinate as meshGeometry. 
[out]  weights  This method computes the N values weights[0,N1], where N=polyhedronCell>getNumNodes(). It assumes the weights vector array has been already allocated. Its size must be set to N (at least) before calling this method, using for instance the weights.resize(N) 
The documentation for this class was generated from the following file: