Defines a mesh of tetrahedrons. More...
#include <MeshViz/3Ddata/PbTetrahedronMesh3D.h>
Public Member Functions | |
PbTetrahedronMesh3D (SbBool isDataDuplicate=TRUE) | |
PbTetrahedronMesh3D (const PbTetrahedronMesh3D &mesh) | |
PbTetrahedronMesh3D (int num_nodes, const float *x_nod, const float *y_nod, const float *z_nod, int num_tetrahedrons, const int *tetrahedron_index, SbBool is_data_duplicate=TRUE) | |
~PbTetrahedronMesh3D () | |
PbTetrahedronMesh3D & | operator= (const PbTetrahedronMesh3D &mesh) |
virtual void | setGeometry (int num_nodes, const float *x_nod, const float *y_nod, const float *z_nod, int num_tetrahedrons, const int *tetrahedron_index) |
virtual void | getGeometry (int &num_nodes, const float *&x_nod, const float *&y_nod, const float *&z_nod, int &num_tetrahedrons, const int *&tetrahedron_index) const |
virtual void | getNodesOwnerCellsInd (const PbArrayOfInt &nod_indices, PbArrayOfInt &owner_cells) const |
virtual const PbCell * | getCell (int cell_index) const |
Friends | |
int | operator== (const PbTetrahedronMesh3D &m1, const PbTetrahedronMesh3D &m2) |
int | operator!= (const PbTetrahedronMesh3D &m1, const PbTetrahedronMesh3D &m2) |
Deprecated | |
| |
virtual SoDEPRECATED void | getGeometry (int &num_nodes, const float *&x_nod, const float *&y_nod, const float *&z_nod, int &num_tetrahedrons, const int **&tetrahedron_index) const |
Class to define an indexed 3D mesh made up of tetrahedrons. This mesh is defined by a list of tetrahedrons. Each tetrahedron is defined by 4 indices of nodes.
The nodes coordinates are defined by 3 arrays x_nod, y_nod, z_nod of num_nodes floats. The tetrahedrons are defined by the array tetrahedron_index of num_tetrahedrons*4 integers. tetrahedron_index[(n*4)+p] is the p-th node index of the n-th tetrahedron of the mesh (0 <= p <= 3). Each tetrahedron must be numbered by repecting the following rule : the 3 first indices define a facet of the tetrahedron and orient it towards the interior of the tetrahedron.
Each facet of a tetrahedron may have 2 references in the mesh, that is, one facet is common to 2 tetrahedrons. The facets which are referred to once in the mesh define the mesh skin.
The values on the mesh nodes are defined by the PbMesh::addValuesSet(set_index,val) method, where val argument is an array of num_nodes floats.
PbTetrahedronMesh3D::PbTetrahedronMesh3D | ( | SbBool | isDataDuplicate = TRUE |
) |
Constructor of a default simple mesh.
See also PbMesh for more explanations about data duplication.
PbTetrahedronMesh3D::PbTetrahedronMesh3D | ( | const PbTetrahedronMesh3D & | mesh | ) |
Copy constructor.
PbTetrahedronMesh3D::PbTetrahedronMesh3D | ( | int | num_nodes, | |
const float * | x_nod, | |||
const float * | y_nod, | |||
const float * | z_nod, | |||
int | num_tetrahedrons, | |||
const int * | tetrahedron_index, | |||
SbBool | is_data_duplicate = TRUE | |||
) |
Constructor of a volume mesh.
See also PbMesh for more explanations about data duplication.
PbTetrahedronMesh3D::~PbTetrahedronMesh3D | ( | ) |
Destructor.
virtual const PbCell* PbTetrahedronMesh3D::getCell | ( | int | cell_index | ) | const [virtual] |
Gets the cell which index is cell_index.
Returns NULL if the cell does not exist or if it is incorrect (flat), otherwise returns always a PbTetrahedronCell object. Attention! this method returns always the same adress of an internal private cell. This private cell is updated each time getCell is called.
Reimplemented from PbIndexedMesh3D.
virtual SoDEPRECATED void PbTetrahedronMesh3D::getGeometry | ( | int & | num_nodes, | |
const float *& | x_nod, | |||
const float *& | y_nod, | |||
const float *& | z_nod, | |||
int & | num_tetrahedrons, | |||
const int **& | tetrahedron_index | |||
) | const [virtual] |
Gets the current mesh geometry.
tetrahedron_index must be used like a matrix. (i.e. tetrahedron_index[cell_index][n], with 0 <= n <= 3)
virtual void PbTetrahedronMesh3D::getGeometry | ( | int & | num_nodes, | |
const float *& | x_nod, | |||
const float *& | y_nod, | |||
const float *& | z_nod, | |||
int & | num_tetrahedrons, | |||
const int *& | tetrahedron_index | |||
) | const [virtual] |
Gets the current mesh geometry.
tetrahedron_index must be used like a vector (i.e. tetrahedron_index[n])
virtual void PbTetrahedronMesh3D::getNodesOwnerCellsInd | ( | const PbArrayOfInt & | nod_indices, | |
PbArrayOfInt & | owner_cells | |||
) | const [virtual] |
Gets the list of index of cells that own the list of node "nod_indices" (for example nod_indices can be the list of indices of a facet, an edge.
..)
Reimplemented from PbMesh.
PbTetrahedronMesh3D& PbTetrahedronMesh3D::operator= | ( | const PbTetrahedronMesh3D & | mesh | ) |
Assignment operator.
Reimplemented from PbIndexedMesh3D.
virtual void PbTetrahedronMesh3D::setGeometry | ( | int | num_nodes, | |
const float * | x_nod, | |||
const float * | y_nod, | |||
const float * | z_nod, | |||
int | num_tetrahedrons, | |||
const int * | tetrahedron_index | |||
) | [virtual] |
Sets a new geometry.
int operator!= | ( | const PbTetrahedronMesh3D & | m1, | |
const PbTetrahedronMesh3D & | m2 | |||
) | [friend] |
Inequality comparison operator.
Reimplemented from PbIndexedMesh3D.
int operator== | ( | const PbTetrahedronMesh3D & | m1, | |
const PbTetrahedronMesh3D & | m2 | |||
) | [friend] |
Equality comparison operator.
Reimplemented from PbIndexedMesh3D.