Defines a triangle cell of a surface mesh.
More...
#include <MeshViz/3Ddata/PbTriangleCell.h>
Public Member Functions | |
| PbTriangleCell (const PbMesh *owner_mesh) | |
| PbTriangleCell (const PbTriangleCell &cell) | |
| ~PbTriangleCell () | |
| PbTriangleCell & | operator= (const PbTriangleCell &cell) |
| virtual float | getLongestEdgeLength () const |
| virtual float | getVolume () const |
| virtual float | getArea () const |
| virtual void | getNodesIndexOfEdge (int edge, PbArrayOfInt &nodes_index) const |
| virtual void | getNodesIndexOfFacet (int facet, PbArrayOfInt &nodes_index) const |
| virtual void | getNodesLocalIndexOfEdge (int edge, PbArrayOfInt &nodes_index) const |
| virtual void | getNodesLocalIndexOfFacet (int facet, PbArrayOfInt &nodes_index) const |
| virtual int | locatePoint (const SbVec3f &coord, float tolerance, SbVec3f &pcoord) const |
| virtual void | getWeight (const SbVec3f &pcoord, float *weight) const |
Defines a triangle cell of a surface mesh.
Nodes and edges are numbered as following :
n2
x
/ \
/ \ edge 0 = 01
/ \ edge 1 = 12
/ \ edge 2 = 20
/ \
/ \
n0 x-------------x n1
| PbTriangleCell::PbTriangleCell | ( | const PbMesh * | owner_mesh | ) |
Constructor of a default simple cell.
| PbTriangleCell::PbTriangleCell | ( | const PbTriangleCell & | cell | ) |
Copy constructor.
| PbTriangleCell::~PbTriangleCell | ( | ) |
Destructor.
| virtual float PbTriangleCell::getArea | ( | ) | const [virtual] |
Gets the area of a cell.
Implements PbCell.
| virtual float PbTriangleCell::getLongestEdgeLength | ( | ) | const [virtual] |
Gets the length of the longest edge of the cell.
Implements PbCell.
| virtual void PbTriangleCell::getNodesIndexOfEdge | ( | int | edge, | |
| PbArrayOfInt & | nodes_index | |||
| ) | const [virtual] |
Gets the array of 2 index mesh's nodes that belongs to a given edge of this cell.
(edge must be >=0 and < 3)
Implements PbCell.
| virtual void PbTriangleCell::getNodesIndexOfFacet | ( | int | facet, | |
| PbArrayOfInt & | nodes_index | |||
| ) | const [virtual] |
Gets the array of index mesh's nodes that belongs to a given facet of this cell.
(facet must be == 0).
Implements PbCell.
| virtual void PbTriangleCell::getNodesLocalIndexOfEdge | ( | int | edge, | |
| PbArrayOfInt & | nodes_index | |||
| ) | const [virtual] |
Gets the array of 2 nodes index that belongs to a given edge of this cell.
edge must be >=0 and < 3. Each index is >=0 and < 3
Implements PbCell.
| virtual void PbTriangleCell::getNodesLocalIndexOfFacet | ( | int | facet, | |
| PbArrayOfInt & | nodes_index | |||
| ) | const [virtual] |
Gets the array of node index that belongs to a given facet of this cell.
facet must be == 0. Each index is >=0 and < 3.
Implements PbCell.
| virtual float PbTriangleCell::getVolume | ( | ) | const [inline, virtual] |
Returns always 0.
Implements PbCell.
| virtual void PbTriangleCell::getWeight | ( | const SbVec3f & | pcoord, | |
| float * | weight | |||
| ) | const [virtual] |
Gets the 3 weights of a point defined by its parametric coordinates.
Implements PbCell.
| virtual int PbTriangleCell::locatePoint | ( | const SbVec3f & | coord, | |
| float | tolerance, | |||
| SbVec3f & | pcoord | |||
| ) | const [virtual] |
Returns 1 if the point is inside the cell, 0 otherwise.
Gets also the parametric coordinate of the point and its weights
Implements PbCell.
| PbTriangleCell& PbTriangleCell::operator= | ( | const PbTriangleCell & | cell | ) |
Assignment operator.
Reimplemented from PbCell.