Utility class for polygon cells.
More...
#include <MeshVizXLM/extractors/MxPolygonCellExtract.h>
|
static void | getWeight (const MiGeometryI &meshGeometry, const MiSurfaceCell *polygonCell, const MbVec3d &point, std::vector< double > &weights) |
| Gets the barycentric weights in the given polygon cell of the given point.
|
|
static double | getLongestEdgeLength (const MiGeometryI &meshGeometry, const MiSurfaceCell *polygonCell) |
| Gets the longest edge of a polygon cell.
|
|
static double | getShortestEdgeLength (const MiGeometryI &meshGeometry, const MiSurfaceCell *polygonCell) |
| Gets the shortest edge of a polygon cell.
|
|
static bool | isPointInsideCell (const MiGeometryI &meshGeometry, const MiSurfaceCell *polygonCell, const MbVec3d &point, std::vector< double > &weights) |
| Checks if a point is inside the given polygon cell.
|
|
static double | getArea (const MiGeometryI &meshGeometry, const MiSurfaceCell *polygonCell) |
| Computes the area of all planar or almost-planar irregular polygon (convex and concave).
|
|
static MbVec3d | getNormal (const MiGeometryI &meshGeometry, const MiSurfaceCell *polygonCell) |
| Computes the average normal to the given planar or almost-planar polygon cell.
|
|
Utility class for polygon cells.
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.
Definition at line 48 of file MxPolygonCellExtract.h.
◆ getArea()
Computes the area of all planar or almost-planar irregular polygon (convex and concave).
- Parameters
-
[in] | meshGeometry | The geometry of the mesh. |
[in] | polygonCell | The input cell. |
◆ getLongestEdgeLength()
static double MxPolygonCellExtract::getLongestEdgeLength |
( |
const MiGeometryI & |
meshGeometry, |
|
|
const MiSurfaceCell * |
polygonCell |
|
) |
| |
|
static |
Gets the longest edge of a polygon cell.
◆ getNormal()
Computes the average normal to the given planar or almost-planar polygon cell.
This is done by using Newell's method.
- Parameters
-
[in] | meshGeometry | The geometry of the mesh. |
[in] | polygonCell | The input cell. |
◆ getShortestEdgeLength()
static double MxPolygonCellExtract::getShortestEdgeLength |
( |
const MiGeometryI & |
meshGeometry, |
|
|
const MiSurfaceCell * |
polygonCell |
|
) |
| |
|
static |
Gets the shortest edge of a polygon cell.
◆ getWeight()
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.
- Note
- Each node coordinate of the given cell is retrieved in the following way:
meshGeometry.getCoord(polygonCell->getNodeIndex(i))
for each i with 0 <= i < polygonCell->getNumNodes()
- Parameters
-
[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) |
◆ isPointInsideCell()
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.
- Note
- Each node coordinate of the given cell is retrieved in the following way:
meshGeometry.getCoord(polygonCell->getNodeIndex(i))
for each i with 0 <= i < polygonCell->getNumNodes()
- Parameters
-
[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) |
The documentation for this class was generated from the following file: