Utility class for polygon cells. More...
#include <MeshVizXLM/extractors/MxPolygonCellExtract.h>
Static Public Member Functions | |
static void | getWeight (const MiGeometryI &meshGeometry, const MiSurfaceCell *polygonCell, const MbVec3d &point, std::vector< double > &weights) |
static double | getLongestEdgeLength (const MiGeometryI &meshGeometry, const MiSurfaceCell *polygonCell) |
static double | getShortestEdgeLength (const MiGeometryI &meshGeometry, const MiSurfaceCell *polygonCell) |
static bool | isPointInsideCell (const MiGeometryI &meshGeometry, const MiSurfaceCell *polygonCell, const MbVec3d &point, std::vector< double > &weights) |
static double | getArea (const MiGeometryI &meshGeometry, const MiSurfaceCell *polygonCell) |
static MbVec3d | getNormal (const MiGeometryI &meshGeometry, const MiSurfaceCell *polygonCell) |
Utility class that provides a static implementation of the MiVolumeCell interface methods for a polygon cell. This class is provided to make it easier to create a class that implements the MiVolumeCell interface for a polygon cell.
static double MxPolygonCellExtract::getArea | ( | const MiGeometryI & | meshGeometry, | |
const MiSurfaceCell * | polygonCell | |||
) | [static] |
Computes the area of all planar or almost-planar irregular polygon (convex and concave).
[in] | meshGeometry | The geometry of the mesh. |
[in] | polygonCell | The input cell. |
static double MxPolygonCellExtract::getLongestEdgeLength | ( | const MiGeometryI & | meshGeometry, | |
const MiSurfaceCell * | polygonCell | |||
) | [static] |
Gets the longest edge of a polygon cell.
static MbVec3d MxPolygonCellExtract::getNormal | ( | const MiGeometryI & | meshGeometry, | |
const MiSurfaceCell * | polygonCell | |||
) | [static] |
Computes the average normal to the given planar or almost-planar polygon cell.
This is done by using Newell's method.
[in] | meshGeometry | The geometry of the mesh. |
[in] | polygonCell | The input cell. |
static double MxPolygonCellExtract::getShortestEdgeLength | ( | const MiGeometryI & | meshGeometry, | |
const MiSurfaceCell * | polygonCell | |||
) | [static] |
Gets the shortest edge of a polygon cell.
static void MxPolygonCellExtract::getWeight | ( | const MiGeometryI & | meshGeometry, | |
const MiSurfaceCell * | polygonCell, | |||
const MbVec3d & | point, | |||
std::vector< double > & | weights | |||
) | [static] |
Gets the barycentric weights in the given polygon cell of the given point.
This static method helps to implement the method MiCell::getWeight(meshGeometry,point,weights) for a polygon cell.
meshGeometry.getCoord(polygonCell->getNodeIndex(i))
[in] | meshGeometry | The geometry of the mesh. |
[in] | polygonCell | 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,N-1], where N=polygonCell->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) |
static bool MxPolygonCellExtract::isPointInsideCell | ( | const MiGeometryI & | meshGeometry, | |
const MiSurfaceCell * | polygonCell, | |||
const MbVec3d & | point, | |||
std::vector< double > & | weights | |||
) | [static] |
Checks if a point is inside the given polygon cell.
meshGeometry.getCoord(polygonCell->getNodeIndex(i))
[in] | meshGeometry | The geometry of the mesh. |
[in] | polygonCell | 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,N-1], where N=polygonCell->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) |