MbTriangleCell Class Reference
[Cell]

MeshViz Build a triangle cell. More...

#include <MeshVizXLM/mesh/cell/MbTriangleCell.h>

Inheritance diagram for MbTriangleCell:
MiSurfaceCell MiCell

List of all members.

Public Member Functions

 MbTriangleCell (size_t n0, size_t n1, size_t n2)
virtual size_t getNumEdges () const
virtual size_t getNumNodes () const
virtual size_t getNodeIndex (size_t nod) const
virtual double getRelativeSize (const MiGeometryI *meshGeometry) const
virtual bool isPointInsideCell (const MiGeometryI &meshGeometry, const MbVec3d &point, std::vector< double > &weights) const

Detailed Description

MeshViz Build a triangle cell.


Constructor & Destructor Documentation

MbTriangleCell::MbTriangleCell ( size_t  n0,
size_t  n1,
size_t  n2 
)

Construct a triangle defined by its list of indices.


Member Function Documentation

virtual size_t MbTriangleCell::getNodeIndex ( size_t  nod  )  const [inline, virtual]

Gets a node id of this cell.

For instance getNodeIndex(0) returns the first node id of this cell.

Parameters:
nod must be in the interval [0-2]

Implements MiCell.

virtual size_t MbTriangleCell::getNumEdges (  )  const [virtual]

Gets the number of edges.

virtual size_t MbTriangleCell::getNumNodes (  )  const [virtual]

Gets the number of nodes.

Implements MiCell.

virtual double MbTriangleCell::getRelativeSize ( const MiGeometryI meshGeometry  )  const [inline, virtual]

Gets the relative size of the cell.


This method is used only by the MoMeshCellShape to display node names if using the relative offset feature and the streamline extraction to adapt the step integration to the size of the cell. getRelativeSize() should return a value depending on the size of the cell even if the default implementation returns 1. For instance, getRelativeSize() can return the length of the longest edge of this cell, or the length of its diagonal.

If getRelativeSize() returns a constant value for any cell, the stream line extraction uses a constant number of step integration anywhere in the mesh. Returning a constant implies that all the cells are supposed to have the same size. getRelativeSize() must not return 0.

Parameters:
[in] meshGeometry the geometry of the mesh. Used to retrieve the node coordinates of this cell.
Returns:
1 by default.

Reimplemented from MiCell.

virtual bool MbTriangleCell::isPointInsideCell ( const MiGeometryI meshGeometry,
const MbVec3d point,
std::vector< double > &  weights 
) const [inline, virtual]

Checks if a point is inside or outside a cell.


This method is not pure virtual because it is not used by all extraction classes. However using an extraction class that uses this method (i.e. streamline) will generate an exception. An application does not need to override this method if no such extraction class is used.

Parameters:
[in] meshGeometry The geometry of the mesh. Used to retrieve the node coordinates of this cell.
[in] point The point to be checked.
[out] weights Must contain at least as many elements as the number of nodes in this cell (see getWeight()).
Returns:
True if the point is inside the cell.
Note:
For extraction purpose only, it is not nessessary to resize the weight vector array since extraction classes are optimized such as weight vectors passed to this method are already allocated and large enough to retrieve all the computed weights. Thus the following assignment is then sufficient:
  weight[i] = wi
  
for each i with 0 <= i < getNumNodes()

Reimplemented from MiCell.


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

Open Inventor by FEI reference manual, generated on 19 Aug 2019
Copyright © FEI S.A.S. All rights reserved.
http://www.openinventor.com/