Open Inventor Release 2024.1.3
 
Loading...
Searching...
No Matches
MxTriangleCellExtract Class Reference

MeshViz Utility class for triangle cells. More...

#include <MeshVizXLM/extractors/MxTriangleCellExtract.h>

Static Public Member Functions

static MbVec3d getIsoParametricCoord (const MiGeometryI &meshGeometry, const MiSurfaceCell *triangleCell, const MbVec3d &point)
 Computes the iso parametric coordinates of the given point in the given cell with the given geometry.
 
static MbVec3d getIsoParametricCoord (size_t nodeIndex)
 Returns the iso parametric coordinates of one of the 3 nodes of a triangle cell.
 
static void getWeight (const MiGeometryI &meshGeometry, const MiSurfaceCell *triangleCell, const MbVec3d &point, std::vector< double > &weights)
 Gets the weights in the given cell of the given point.
 
static void getWeight (const MbVec3d &ipcoord, std::vector< double > &weights)
 Gets the weights of a point defined by its iso parametric coordinates.
 
static bool isPointInsideCell (const MiGeometryI &meshGeometry, const MiSurfaceCell *triangleCell, const MbVec3d &point, std::vector< double > &weights)
 Checks if a point is inside or outside a triangle cell.
 
static double getLongestEdgeLength (const MiGeometryI &meshGeometry, const MiSurfaceCell *cell)
 Gets the longest edge of a triangle cell.
 
static double getShortestEdgeLength (const MiGeometryI &meshGeometry, const MiSurfaceCell *cell)
 Gets the shortest edge of a triangle cell.
 

Detailed Description

MeshViz Utility class for triangle cells.

Utility class that provides a static implementation of the MiSurfaceCell's methods in a triangle cell. This class is provided to make easier the creation of a class in the application that implements the MiSurfaceCell
interface for a triangle cell.

The following image shows the nodes numbering used by this class. The weights (see getWeight()), and parametric coordinates (see getIsoParametricCoord()) are defined according to this node numbering.

Nodes numbering

Definition at line 56 of file MxTriangleCellExtract.h.

Member Function Documentation

◆ getIsoParametricCoord() [1/2]

static MbVec3d MxTriangleCellExtract::getIsoParametricCoord ( const MiGeometryI meshGeometry,
const MiSurfaceCell triangleCell,
const MbVec3d point 
)
static

Computes the iso parametric coordinates of the given point in the given cell with the given geometry.

As computing the iso parametric coordinates of a point needs the coordinates of the cell's nodes, the given triangleCell is assumed to contain 3 nodes.

Note
Each node coordinate of the given cell is retrieved in the following way:
 meshGeometry.getCoord(triangleCell->getNodeIndex(i)) 
for each i in the range [0-2].
Parameters
[in]meshGeometryThe geometry of the mesh.
[in]triangleCellThe input cell.
[in]pointThe input point given in the same space coordinate as meshGeometry.

◆ getIsoParametricCoord() [2/2]

static MbVec3d MxTriangleCellExtract::getIsoParametricCoord ( size_t  nodeIndex)
static

Returns the iso parametric coordinates of one of the 3 nodes of a triangle cell.

This static method helps to implement the method MiCell::getIsoParametricCoord().

Parameters
[in]nodeIndexMust be defined in the range [0-2]

◆ getLongestEdgeLength()

static double MxTriangleCellExtract::getLongestEdgeLength ( const MiGeometryI meshGeometry,
const MiSurfaceCell cell 
)
static

Gets the longest edge of a triangle cell.

◆ getShortestEdgeLength()

static double MxTriangleCellExtract::getShortestEdgeLength ( const MiGeometryI meshGeometry,
const MiSurfaceCell cell 
)
static

Gets the shortest edge of a triangle cell.

◆ getWeight() [1/2]

static void MxTriangleCellExtract::getWeight ( const MbVec3d ipcoord,
std::vector< double > &  weights 
)
inlinestatic

Gets the weights of a point defined by its iso parametric coordinates.

This static method helps to implement the method MiCell::getWeight(ipcoord,weights) for a triangle cell.

Parameters
[in]ipcoordThe iso parametric coordinates of the input point. The reference space for the iso parametric coordinates is assumed to be [0-1]. Thus any point inside the cell has iso parametric coordinates in the interval [0-1].
[out]weightsThis method computes the 3 values weights[0-2].
It assumes the weights vector array has been already allocated. Its size must be set to 3 (at least) before calling this method, using for instance the weights::resize(3)

Definition at line 118 of file MxTriangleCellExtract.h.

◆ getWeight() [2/2]

static void MxTriangleCellExtract::getWeight ( const MiGeometryI meshGeometry,
const MiSurfaceCell triangleCell,
const MbVec3d point,
std::vector< double > &  weights 
)
inlinestatic

Gets the weights in the given cell of the given point.

This static method helps to implement the method MiCell::getWeight(meshGeometry,point,weights) for a triangle cell. As computing the weights of a point needs the coordinates of the cell's nodes, the given triangleCell is assumed to contain 3 nodes.

Note
Each node coordinate of the given cell is retrieved in the following way:
 meshGeometry.getCoord(triangleCell->getNodeIndex(i)) 
for each i in the range [0-2].
Parameters
[in]meshGeometryThe geometry of the mesh.
[in]triangleCellThe input cell.
[in]pointThe input point given in the same space coordinate as meshGeometry.
[out]weightsThis method computes the 3 values weights[0-2]. It assumes the weights vector array has been already allocated. Its size must be set to 3 (at least) before calling this method, using for instance the weights.resize(3)

Definition at line 101 of file MxTriangleCellExtract.h.

◆ isPointInsideCell()

static bool MxTriangleCellExtract::isPointInsideCell ( const MiGeometryI meshGeometry,
const MiSurfaceCell triangleCell,
const MbVec3d point,
std::vector< double > &  weights 
)
inlinestatic

Checks if a point is inside or outside a triangle cell.

This static method helps to implement the method MiCell::isPointInsideCell(meshGeometry,point,weights) for a triangle cell.

Parameters
[in]meshGeometryThe geometry of the mesh.
[in]triangleCellThe input cell.
[in]pointThe input point given in the same space coordinate as meshGeometry.
[out]weightsThis method computes the 3 values weights[0-2] if the point is inside the cell. It assumes the weights vector array has been already allocated. Its size must be set to 3 (at least) before calling this method, using for instance the weights::resize(3)
Returns
true if the point is inside the cell.

Definition at line 138 of file MxTriangleCellExtract.h.


The documentation for this class was generated from the following file: