Defines a mesh of hexahedrons. More...
#include <MeshViz/3Ddata/PbHexahedronMesh3D.h>
Public Member Functions | |
PbHexahedronMesh3D (SbBool isDataDuplicate=TRUE) | |
PbHexahedronMesh3D (const PbHexahedronMesh3D &mesh) | |
PbHexahedronMesh3D (int num_nodes, const float *x_nod, const float *y_nod, const float *z_nod, int num_hexahedrons, const int *hexahedron_index, SbBool is_data_duplicate=TRUE) | |
~PbHexahedronMesh3D () | |
PbHexahedronMesh3D & | operator= (const PbHexahedronMesh3D &mesh) |
void | setGeometry (int num_nodes, const float *x_nod, const float *y_nod, const float *z_nod, int num_hexahedrons, const int *hexahedron_index) |
void | getGeometry (int &num_nodes, const float *&x_nod, const float *&y_nod, const float *&z_nod, int &num_hexahedrons, const int *&hexahedron_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 PbHexahedronMesh3D &m1, const PbHexahedronMesh3D &m2) |
int | operator!= (const PbHexahedronMesh3D &m1, const PbHexahedronMesh3D &m2) |
Deprecated | |
| |
SoDEPRECATED void | getGeometry (int &num_nodes, const float *&x_nod, const float *&y_nod, const float *&z_nod, int &num_hexahedrons, const int **&hexahedron_index) const |
Class to define an indexed 3D mesh made up of hexahedrons. This mesh is defined by a list of hexahedrons. Each hexahedron is defined by 8 indices of nodes.
The nodes coordinates are defined by 3 arrays x_nod, y_nod, z_nod of num_nodes floats. The hexahedrons are defined by the array hexahedron_index of num_hexahedrons*8 integers. hexahedron_index[(n*8)+p] is the p-th node index of the n-th hexahedron of the mesh (0 <= p <= 7). Each hexahedron must be numbered by repecting the following rule : the 4 first indices define a facet of the hexahedron and orient it towards the interior of the hexahedron.
Each facet of a hexahedron may have 2 references in the mesh, that is, one facet is common to 2 hexahedrons. 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.
PbHexahedronMesh3D::PbHexahedronMesh3D | ( | SbBool | isDataDuplicate = TRUE |
) |
Constructor of a default simple mesh.
See also PbMesh for more explanations about data duplication.
PbHexahedronMesh3D::PbHexahedronMesh3D | ( | const PbHexahedronMesh3D & | mesh | ) |
Copy constructor.
PbHexahedronMesh3D::PbHexahedronMesh3D | ( | int | num_nodes, | |
const float * | x_nod, | |||
const float * | y_nod, | |||
const float * | z_nod, | |||
int | num_hexahedrons, | |||
const int * | hexahedron_index, | |||
SbBool | is_data_duplicate = TRUE | |||
) |
Constructor of a volume mesh.
See also PbMesh for more explanations about data duplication.
PbHexahedronMesh3D::~PbHexahedronMesh3D | ( | ) |
Destructor.
virtual const PbCell* PbHexahedronMesh3D::getCell | ( | int | cell_index | ) | const [virtual] |
Gets the cell which index is cell_index.
Returns NULL if the cell does not exist, otherwise returns always a PbHexahedronCell 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.
SoDEPRECATED void PbHexahedronMesh3D::getGeometry | ( | int & | num_nodes, | |
const float *& | x_nod, | |||
const float *& | y_nod, | |||
const float *& | z_nod, | |||
int & | num_hexahedrons, | |||
const int **& | hexahedron_index | |||
) | const |
Gets the current mesh geometry.
hexahedron_index must be used like a matrix. (i.e. hexahedron_index[cell_index][n], with 0 <= n <= 7)
void PbHexahedronMesh3D::getGeometry | ( | int & | num_nodes, | |
const float *& | x_nod, | |||
const float *& | y_nod, | |||
const float *& | z_nod, | |||
int & | num_hexahedrons, | |||
const int *& | hexahedron_index | |||
) | const |
Gets the current mesh geometry.
hexahedron_index must be used like a vector (i.e. hexahedron_index[n])
virtual void PbHexahedronMesh3D::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.
PbHexahedronMesh3D& PbHexahedronMesh3D::operator= | ( | const PbHexahedronMesh3D & | mesh | ) |
Assignment operator.
Reimplemented from PbIndexedMesh3D.
void PbHexahedronMesh3D::setGeometry | ( | int | num_nodes, | |
const float * | x_nod, | |||
const float * | y_nod, | |||
const float * | z_nod, | |||
int | num_hexahedrons, | |||
const int * | hexahedron_index | |||
) |
Sets a new geometry.
int operator!= | ( | const PbHexahedronMesh3D & | m1, | |
const PbHexahedronMesh3D & | m2 | |||
) | [friend] |
Inequality comparison operator.
Reimplemented from PbIndexedMesh3D.
int operator== | ( | const PbHexahedronMesh3D & | m1, | |
const PbHexahedronMesh3D & | m2 | |||
) | [friend] |
Equality comparison operator.
Reimplemented from PbIndexedMesh3D.