Defines an hexahedron cell of a volume mesh. More...
#include <MeshViz/3Ddata/PbHexahedronCell.h>
Public Member Functions | |
PbHexahedronCell (const PbMesh *owner_mesh) | |
PbHexahedronCell (const PbHexahedronCell &cell) | |
~PbHexahedronCell () | |
PbHexahedronCell & | operator= (const PbHexahedronCell &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 |
void | getDerivs (const SbVec3f &pcoord, float *weight) const |
An hexahedron cell has 6 facets which can be in any plane of the 3D space. Each facet is a quadrangle not necessarily a square. The 4 first indices defines a facet oriented towards the interior of the cell.
Facets, nodes and edges are numbered as following :
4-----------7 facet 0 = 0374 edge 0 = 01 /| /| facet 1 = 1562 edge 1 = 12 / | / | facet 2 = 0451 edge 2 = 23 / | / | facet 3 = 3267 edge 3 = 30 5----------6 | facet 4 = 0123 edge 4 = 45 | | | | facet 5 = 4765 edge 5 = 56 | 0----|------3 edge 6 = 67 | / | / edge 7 = 74 | / | / edge 8 = 04 |/ | / edge 9 = 15 1----------2 edge10 = 26 edge11 = 37
PbHexahedronCell::PbHexahedronCell | ( | const PbMesh * | owner_mesh | ) |
Constructor of a default simple cell.
PbHexahedronCell::PbHexahedronCell | ( | const PbHexahedronCell & | cell | ) |
Copy constructor.
PbHexahedronCell::~PbHexahedronCell | ( | ) |
Destructor.
virtual float PbHexahedronCell::getArea | ( | ) | const [inline, virtual] |
Returns always 0.
Implements PbCell.
void PbHexahedronCell::getDerivs | ( | const SbVec3f & | pcoord, | |
float * | weight | |||
) | const |
Gets the derivs of a point defined by its parametric coordinates.
virtual float PbHexahedronCell::getLongestEdgeLength | ( | ) | const [virtual] |
Gets the length of the longest edge of the cell.
Implements PbCell.
virtual void PbHexahedronCell::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 < 12)
Implements PbCell.
virtual void PbHexahedronCell::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 and < 6)
Implements PbCell.
virtual void PbHexahedronCell::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 < 12. Each index in nodes_index is >=0 and < 8.
Implements PbCell.
virtual void PbHexahedronCell::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 and < 6. Each index is >=0 and < 8.
Implements PbCell.
virtual float PbHexahedronCell::getVolume | ( | ) | const [virtual] |
Gets the volume of the cell.
Implements PbCell.
virtual void PbHexahedronCell::getWeight | ( | const SbVec3f & | pcoord, | |
float * | weight | |||
) | const [virtual] |
Gets the 8 weights of a point defined by its parametric coordinates.
Implements PbCell.
virtual int PbHexahedronCell::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 .
Implements PbCell.
PbHexahedronCell& PbHexahedronCell::operator= | ( | const PbHexahedronCell & | cell | ) |
Assignment operator.
Reimplemented from PbCell.