Defines an abstract cell of a mesh. More...
#include <MeshViz/3Ddata/PbCell.h>
Public Member Functions | |
PbCell () | |
Constructor. | |
PbCell (const PbCell &cell) | |
Copy constructor. | |
~PbCell () | |
Destructor. | |
PbCell & | operator= (const PbCell &cell) |
Assignment operator. | |
virtual float | getLongestEdgeLength () const =0 |
Gets the length of the longest edge of the cell. | |
virtual SbBox3f | getBoundingBox () const |
Gets the cell's bounding box. | |
virtual void | getBounds (float &xmin, float &ymin, float &zmin, float &xmax, float &ymax, float &zmax) const |
Gets the cell's bounds. | |
virtual SbVec3f | getCenter () const |
Gets the cell's geometric center. | |
virtual float | getVolume () const =0 |
Gets the volume of the cell. | |
virtual float | getArea () const =0 |
Gets the area of a cell. | |
int | getNumFacets () const |
Gets the number of facets. | |
int | getNumEdges () const |
Gets the number of edges. | |
int | getNumNodes () const |
Gets the number of nodes. | |
int | getIndex () const |
Gets the index of the cell in the mesh. | |
SbVec3f | getNodeCoord (int nod) const |
Gets the coordinate of the nod (nod must be >=0 and < getNumNodes()). | |
int | getNodeIndex (int nod) const |
Gets the index (in the mesh) of a nod (nod must be >=0 and < getNumNodes()). | |
void | getNodesIndex (PbArrayOfInt &nodes_index) const |
Gets the array of index mesh's nodes that belongs to this cell. | |
virtual void | getNodesIndexOfEdge (int edge, PbArrayOfInt &nodes_index) const =0 |
Gets the array of 2 index mesh's nodes that belongs to a given edge of this cell. | |
virtual void | getNodesIndexOfFacet (int facet, PbArrayOfInt &nodes_index) const =0 |
Gets the array of index mesh's nodes that belongs to a given facet of this cell. | |
virtual void | getNodesLocalIndexOfEdge (int edge, PbArrayOfInt &nodes_index) const =0 |
Gets the array of 2 nodes index that belongs to a given edge of this cell. | |
virtual void | getNodesLocalIndexOfFacet (int facet, PbArrayOfInt &nodes_index) const =0 |
Gets the array of node index that belongs to a given facet of this cell. | |
virtual int | locatePoint (const SbVec3f &coord, float tolerance, SbVec3f &pcoord) const =0 |
Returns 1 if the point is inside the cell, 0 otherwise. | |
virtual void | getWeight (const SbVec3f &pcoord, float *weight) const =0 |
Gets the weights of a point defined by its parametric coordinates. | |
virtual float | getValue (const SbVec3f &pcoord, const float *s) const |
Get the scalar value of a point in the cell. | |
virtual SbVec3f | getValue (const SbVec3f &pcoord, const SbVec3f *v) const |
Get the vector value of a point in the cell. | |
float | getValue (const float *weight, const float *s) const |
Gets the scalar value of a point in this cell, given the point's weights. | |
SbVec3f | getValue (const float *weight, const SbVec3f *v) const |
Gets the vector value of a point in this cell, given the point's weights. | |
Public Member Functions inherited from PbBase | |
void | enableConnection (SbBool flag) |
Activates/deactivates the mechanism of connection. | |
SbBool | isConnectionEnabled () const |
Returns TRUE if the connection mechanism is active, otherwise FALSE. | |
void | touch () |
Simulates the changing of an instance of this object, so all connected objects are informed of this change. | |
PbBase & | operator= (const PbBase &base) |
Assignment operator. | |
Defines an abstract cell of a mesh.
A cell is a "simple" basic volume or surface element that connects adjacent nodes of a mesh.
PbCell::PbCell | ( | ) |
Constructor.
PbCell::PbCell | ( | const PbCell & | cell | ) |
Copy constructor.
PbCell::~PbCell | ( | ) |
Destructor.
|
pure virtual |
Gets the area of a cell.
Implemented in PbHexahedronCell, PbPixelCell, PbPyramidCell, PbQuadrangleCell, PbTetrahedronCell, PbTriangleCell, PbVoxelCell, and PbWedgeCell.
|
virtual |
Gets the cell's bounding box.
Reimplemented in PbPixelCell, and PbVoxelCell.
|
virtual |
Gets the cell's bounds.
Similar to getBoundingBox() but it does not use any SbBox object.
Reimplemented in PbPixelCell, and PbVoxelCell.
|
virtual |
Gets the cell's geometric center.
Reimplemented in PbPixelCell, and PbVoxelCell.
|
inline |
|
pure virtual |
Gets the length of the longest edge of the cell.
Implemented in PbHexahedronCell, PbPixelCell, PbPyramidCell, PbQuadrangleCell, PbTetrahedronCell, PbTriangleCell, PbVoxelCell, and PbWedgeCell.
|
inline |
Gets the coordinate of the nod (nod must be >=0 and < getNumNodes()).
|
inline |
Gets the index (in the mesh) of a nod (nod must be >=0 and < getNumNodes()).
void PbCell::getNodesIndex | ( | PbArrayOfInt & | nodes_index | ) | const |
Gets the array of index mesh's nodes that belongs to this cell.
|
pure virtual |
Gets the array of 2 index mesh's nodes that belongs to a given edge of this cell.
(edge must be >=0 and < getNumEdges())
Implemented in PbHexahedronCell, PbPixelCell, PbPyramidCell, PbQuadrangleCell, PbTetrahedronCell, PbTriangleCell, PbVoxelCell, and PbWedgeCell.
|
pure virtual |
Gets the array of index mesh's nodes that belongs to a given facet of this cell.
(facet must be >=0 and < getNumFacets()).
Implemented in PbHexahedronCell, PbPixelCell, PbPyramidCell, PbQuadrangleCell, PbTetrahedronCell, PbTriangleCell, PbVoxelCell, and PbWedgeCell.
|
pure virtual |
Gets the array of 2 nodes index that belongs to a given edge of this cell.
edge must be >=0 and < getNumEdges(). each index is >=0 and < getNumNodes()
Implemented in PbHexahedronCell, PbPixelCell, PbPyramidCell, PbQuadrangleCell, PbTetrahedronCell, PbTriangleCell, PbVoxelCell, and PbWedgeCell.
|
pure virtual |
Gets the array of node index that belongs to a given facet of this cell.
facet must be >=0 and < getNumFacets(). each index is >=0 and < getNumNodes().
Implemented in PbHexahedronCell, PbPixelCell, PbPyramidCell, PbQuadrangleCell, PbTetrahedronCell, PbTriangleCell, PbVoxelCell, and PbWedgeCell.
|
inline |
|
inline |
|
inline |
float PbCell::getValue | ( | const float * | weight, |
const float * | s | ||
) | const |
Gets the scalar value of a point in this cell, given the point's weights.
Gets the vector value of a point in this cell, given the point's weights.
|
virtual |
Get the scalar value of a point in the cell.
pcoord | [in] Parametric [0..1] coordinate of the point inside the cell. |
s | [in] The scalar dataset to interpolate |
Reimplemented in PbPixelCell, and PbVoxelCell.
Get the vector value of a point in the cell.
pcoord | [in] Parametric [0..1] coordinate of the point inside the cell. |
v | [in] The vector dataset to interpolate |
Reimplemented in PbPixelCell, and PbVoxelCell.
|
pure virtual |
Gets the volume of the cell.
Returns always 0 for a 2D cell.
Implemented in PbHexahedronCell, PbPixelCell, PbPyramidCell, PbQuadrangleCell, PbTetrahedronCell, PbTriangleCell, PbVoxelCell, and PbWedgeCell.
|
pure virtual |
Gets the weights of a point defined by its parametric coordinates.
Implemented in PbHexahedronCell, PbPixelCell, PbPyramidCell, PbQuadrangleCell, PbTetrahedronCell, PbTriangleCell, PbVoxelCell, and PbWedgeCell.
|
pure virtual |
Returns 1 if the point is inside the cell, 0 otherwise.
Gets also the parametric coordinate of the point and its weights
Implemented in PbHexahedronCell, PbPixelCell, PbPyramidCell, PbQuadrangleCell, PbTetrahedronCell, PbTriangleCell, PbVoxelCell, and PbWedgeCell.