MxPolyhedronCellExtract Class Reference
[Cell]

MeshViz Utility class for polyhedron cells. More...

#include <MeshVizXLM/extractors/MxPolyhedronCellExtract.h>

List of all members.

Static Public Member Functions

static void getWeight (const MiGeometryI &meshGeometry, const MiVolumeCell *polyhedronCell, const MbVec3d &point, std::vector< double > &weights)
static double getLongestDistance (const MiGeometryI &meshGeometry, const MiVolumeCell *polyhedronCell)
static double getShortestDistance (const MiGeometryI &meshGeometry, const MiVolumeCell *polyhedronCell)
static bool isPointInsideCell (const MiGeometryI &meshGeometry, const MiVolumeCell *polyhedronCell, const MbVec3d &point, std::vector< double > &weights)
static MbVec3d getFacetNormal (size_t facet, const MiGeometryI &meshGeometry, const MiVolumeCell *polyhedronCell)

Detailed Description

MeshViz 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 counter-clockwise direction looking from the inside).


Member Function Documentation

static MbVec3d MxPolyhedronCellExtract::getFacetNormal ( size_t  facet,
const MiGeometryI meshGeometry,
const MiVolumeCell polyhedronCell 
) [static]

Computes the average normal to a planar or almost-planar 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.
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.
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.
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,N-1], 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)
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,N-1], 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:

Open Inventor Toolkit reference manual, generated on 12 Feb 2024
Copyright © Thermo Fisher Scientific All rights reserved.
http://www.openinventor.com/