Open Inventor Release 2024.2.1
 
Loading...
Searching...
No Matches
MxPolygonCellExtract Class Reference

MeshViz 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)
 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.
 

Detailed Description

MeshViz 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.

Member Function Documentation

◆ getArea()

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).

Parameters
[in]meshGeometryThe geometry of the mesh.
[in]polygonCellThe input cell.

◆ getLongestEdgeLength()

static double MxPolygonCellExtract::getLongestEdgeLength ( const MiGeometryI meshGeometry,
const MiSurfaceCell polygonCell 
)
static

Gets the longest edge of a polygon cell.

◆ getNormal()

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.

Parameters
[in]meshGeometryThe geometry of the mesh.
[in]polygonCellThe 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]meshGeometryThe geometry of the mesh.
[in]polygonCellThe input cell.
[in]pointThe input point given in the same space coordinate as meshGeometry.
[out]weightsThis 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]meshGeometryThe geometry of the mesh.
[in]polygonCellThe input cell.
[in]pointThe input point given in the same space coordinate as meshGeometry.
[out]weightsThis 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: