Defines a cartesian grid surface mesh. More...
#include <MeshViz/3Ddata/PbCartesianGrid2D.h>
Public Member Functions | |
PbCartesianGrid2D (SbBool is_data_duplicated=TRUE) | |
PbCartesianGrid2D (const PbCartesianGrid2D &) | |
PbCartesianGrid2D (int num_x, int num_y, const float *x, const float *y, SbBool is_data_duplicated=TRUE) | |
PbCartesianGrid2D (int num_x, int num_y, const float *x, const float *y, const float *z, SbBool is_data_duplicated=TRUE) | |
~PbCartesianGrid2D () | |
PbCartesianGrid2D & | operator= (const PbCartesianGrid2D &mesh) |
void | getGeometry (int &num_x, int &num_y, const float **&xa, const float **&ya) const |
void | getGeometry (int &num_x, int &num_y, const float **&xa, const float **&ya, const float **&za) const |
void | getGeometry (int &num_x, int &num_y, const float *&xa, const float *&ya) const |
void | getGeometry (int &num_x, int &num_y, const float *&xa, const float *&ya, const float *&za) const |
virtual const PbCell * | getCell (int cell_index) const |
virtual SbVec3f | getNodeCoord (int nod_index) const |
virtual SbVec3f | getNodeCoord (int i, int j) const |
Friends | |
int | operator== (const PbCartesianGrid2D &m1, const PbCartesianGrid2D &m2) |
int | operator!= (const PbCartesianGrid2D &m1, const PbCartesianGrid2D &m2) |
Class to define a mesh represented by a grid with cartesian coordinates. This mesh is defined by a matrix num_x * num_y points forming (num_x - 1) * (num_y - 1) quadrangles. Each point with index (i, j) in the mesh (except for points along the mesh border) is connected to four points with indices (i+1,j), (i,j+1), (i-1,j), (i,j-1). x, y and z are array of num_x * num_y floats.
The values on the mesh nodes are defined by the PbMesh::addValuesSet() method, where val argument is an array of num_x * num_y floats.
PbCartesianGrid2D::PbCartesianGrid2D | ( | SbBool | is_data_duplicated = TRUE |
) |
Constructor of a default simple mesh.
See also PbMesh for more explanations about data duplication.
PbCartesianGrid2D::PbCartesianGrid2D | ( | const PbCartesianGrid2D & | ) |
Copy constructor.
PbCartesianGrid2D::PbCartesianGrid2D | ( | int | num_x, | |
int | num_y, | |||
const float * | x, | |||
const float * | y, | |||
SbBool | is_data_duplicated = TRUE | |||
) |
Constructor of a 2D surface mesh.
See also PbMesh for more explanations about data duplication.
PbCartesianGrid2D::PbCartesianGrid2D | ( | int | num_x, | |
int | num_y, | |||
const float * | x, | |||
const float * | y, | |||
const float * | z, | |||
SbBool | is_data_duplicated = TRUE | |||
) |
Constructor of a 3D surface mesh.
See also PbMesh for more explanations about data duplication.
PbCartesianGrid2D::~PbCartesianGrid2D | ( | ) |
Destructor.
virtual const PbCell* PbCartesianGrid2D::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 PbQuadrangleCell object. Attention! this method returns always the same adress of an internal private cell. This private cell is updated each time getCell is called.
Implements PbMesh.
Reimplemented in PbParalCartesianGrid2D.
void PbCartesianGrid2D::getGeometry | ( | int & | num_x, | |
int & | num_y, | |||
const float *& | xa, | |||
const float *& | ya, | |||
const float *& | za | |||
) | const [inline] |
Gets the mesh 3D geometry.
xa-ya-za can be used like a vector (i.e. xa[n]). Attention! For a 2D mesh, z is NULL.
Reimplemented from PbGrid2D.
void PbCartesianGrid2D::getGeometry | ( | int & | num_x, | |
int & | num_y, | |||
const float *& | xa, | |||
const float *& | ya | |||
) | const [inline] |
Gets the mesh 2D geometry.
xa-ya must be used like a vector (i.e. xa[n])
Reimplemented from PbGrid2D.
void PbCartesianGrid2D::getGeometry | ( | int & | num_x, | |
int & | num_y, | |||
const float **& | xa, | |||
const float **& | ya, | |||
const float **& | za | |||
) | const |
Gets the mesh 3D geometry.
xa-ya-za can be used like a matrix (i.e xa[i][j]) Attention! For a 2D mesh, za is NULL.
void PbCartesianGrid2D::getGeometry | ( | int & | num_x, | |
int & | num_y, | |||
const float **& | xa, | |||
const float **& | ya | |||
) | const |
Gets the mesh 2D geometry.
xa-ya can be used like a matrix (i.e xa[i][j])
virtual SbVec3f PbCartesianGrid2D::getNodeCoord | ( | int | i, | |
int | j | |||
) | const [virtual] |
Gets the coordinates of a node defined by its i,j indices on the grid.
Implements PbGrid2D.
Reimplemented in PbParalCartesianGrid2D.
virtual SbVec3f PbCartesianGrid2D::getNodeCoord | ( | int | nod_index | ) | const [virtual] |
Gets the coordinates of a node defined by its index on the grid.
Implements PbGrid2D.
Reimplemented in PbParalCartesianGrid2D.
PbCartesianGrid2D& PbCartesianGrid2D::operator= | ( | const PbCartesianGrid2D & | mesh | ) |
int operator!= | ( | const PbCartesianGrid2D & | m1, | |
const PbCartesianGrid2D & | m2 | |||
) | [friend] |
Inequality comparison operator.
Reimplemented in PbParalCartesianGrid2D.
int operator== | ( | const PbCartesianGrid2D & | m1, | |
const PbCartesianGrid2D & | m2 | |||
) | [friend] |
Equality comparison operator.
Reimplemented in PbParalCartesianGrid2D.