Defines a polar grid surface mesh. More...
#include <MeshViz/3Ddata/PbPolarGrid2D.h>
Public Member Functions | |
PbPolarGrid2D (SbBool isDataDuplicate=TRUE) | |
Constructor of a default simple mesh. | |
PbPolarGrid2D (const PbPolarGrid2D &mesh) | |
Copy constructor. | |
PbPolarGrid2D (int num_r, int num_t, const float *r, const float *t, SbBool isDataDuplicate=TRUE) | |
Constructor of a 2D surface mesh. | |
PbPolarGrid2D (int num_r, int num_t, const float *r, const float *t, const float *z, SbBool isDataDuplicate=TRUE) | |
Constructor of a 3D surface mesh. | |
~PbPolarGrid2D () | |
Destructor. | |
PbPolarGrid2D & | operator= (const PbPolarGrid2D &mesh) |
Assignment operator. | |
virtual const PbCell * | getCell (int cell_index) const |
Returns always NULL. | |
virtual SbVec3f | getNodeCoord (int nod_index) const |
Gets the coordinates of a node defined by its index on the grid. | |
virtual SbVec3f | getNodeCoord (int i, int j) const |
Gets the coordinates of a node defined by its i,j indices on the grid. | |
Public Member Functions inherited from PbGrid2D | |
PbGrid2D (SbBool is_data_duplicate=TRUE) | |
Constructor. | |
PbGrid2D (const PbGrid2D &mesh) | |
Copy constructor. | |
~PbGrid2D () | |
Destructor. | |
PbGrid2D & | operator= (const PbGrid2D &mesh) |
Assignment operator. | |
void | setGeometry (int num_x, int num_y, const float *x, const float *y) |
Defines a 2D surface mesh geometry. | |
void | setGeometry (int num_x, int num_y, const float *x, const float *y, const float *z) |
Defines a 3D surface mesh geometry. | |
void | getGeometry (int &num_x, int &num_y, const float *&x, const float *&y) const |
Gets the mesh 2D geometry. | |
void | getGeometry (int &num_x, int &num_y, const float *&x, const float *&y, const float *&z) const |
Gets the mesh 3D geometry. | |
void | getDim (int &num_x, int &num_y) const |
Gets the dimensions num_x, num_y of the grid. | |
virtual void | getNodeOwnerCellsInd (int nod_index, PbArrayOfInt &owner_cells) const |
Gets the list of index of cells that own the node "nod_index". | |
virtual void | getAdjacentCellsIndByNode (int cell_index, PbArrayOfInt &adjacent_cells) const |
Gets the list of index of cells that are adjacent (by a node) to cell_index. | |
virtual void | getAdjacentCellsIndByFacet (int cell_index, PbArrayOfInt &adjacent_cells) const |
Gets the list of index of cells that are adjacent (by an edge) to cell_index. | |
void | getNodeIndices (int nod_index, int &i, int &j) const |
Calculates indices i,j that verify nod_index = i*num_y + j. | |
void | getCellIndices (int cell_index, int &i, int &j) const |
Calculates indices i,j that verify cell_index = i*(num_y-1) + j. | |
Public Member Functions inherited from PbMesh2D | |
void | addVecsSet (int set_index, const SbVec2f *val, const SbString &setName="") |
Adds a set of 2D vectors on the mesh. | |
virtual SbBox2f | getBoundingBox () const |
Gets the 2D mesh's bounding box. | |
virtual float | getVolume () const |
Always returns 0. | |
virtual float | getArea () const |
Gets the area of the mesh. | |
PbMesh2D * | getFaultMesh (int num_fault_lines, const int *fault_line_sizes, const SbVec3f *coord, ExtrapolationMethod extrapol_method, PbDefinedValue &definedValue) const |
Builds a new mesh by inserting some fault lines in this mesh. | |
PbMesh2D * | getFaultMesh (int num_fault_lines, const int *fault_line_sizes, const SbVec3f *coord) const |
Same as calling getFaultMesh(num_fault_lines, fault_line_sizes, coord,PbMesh2D::USE_ADJACENT_DERIVS, PbDefinedValue()) | |
Public Member Functions inherited from PbMesh | |
PbMesh (SbBool is_data_duplicated=TRUE) | |
Constructor. | |
PbMesh (const PbMesh &mesh) | |
Copy constructor. | |
~PbMesh () | |
Destructor. | |
PbMesh & | operator= (const PbMesh &mesh) |
Assignment operator. | |
int | getNumNodes () const |
Gets the number of nodes in the mesh. | |
int | getNumCells () const |
Gets the number of cells in the mesh. | |
SbBox3f | getBoundingBox () const |
Gets the bounding box of the mesh. | |
SbBool | isDataDuplicated () const |
Returns TRUE if mesh's data are duplicated, FALSE otherwise. | |
virtual void | addValuesSet (int set_index, const float *val, const SbString &set_name="") |
Adds a set of scalar values. | |
void | addValuesSet (int set_index, const float *val, DataBinding binding, const SbString &set_name="") |
Adds a set of scalar values that can be located either at nodes or at cells. | |
DataBinding | getValuesBinding (int set_index) const |
Gets the binding of the scalar value set. | |
virtual void | addStringsSet (int set_index, const SbString *val, const SbString &set_name="") |
Adds a set of string values . | |
virtual const SbString * | getValuesSetName (int set_index) const |
Gets the name associated to a scalar values set. | |
virtual const SbString * | getStringsSetName (int set_index) const |
Gets the name associated to a string values set. | |
virtual const SbString * | getVecsSetName (int set_index) const |
Gets the name associated to a vec values set. | |
virtual const float * | getValuesSet (int set_index) const |
Gets a set of scalar values. | |
virtual const SbString * | getStringsSet (int set_index) const |
Gets a set of string values. | |
virtual const SbVec3f * | getVecsSet (int set_index) const |
Gets a set of vector values. | |
virtual SbBool | removeValuesSet (int set_index) |
Remove a set of scalar values. | |
virtual SbBool | removeStringsSet (int set_index) |
Remove a set of string values. | |
virtual SbBool | removeVecsSet (int set_index) |
Remove a set of vector values. | |
virtual void | removeAllValuesSet () |
Remove all sets of scalar values. | |
virtual void | removeAllStringsSet () |
Remove all sets of strings values. | |
virtual void | removeAllVecsSet () |
Remove all sets of vector values. | |
virtual int | getNumValuesSet () const |
Gets the number of set of scalar values. | |
virtual int | getNumStringsSet () const |
Gets the number of set of string values. | |
virtual int | getNumVecsSet () const |
Gets the number of set of vector values. | |
virtual SbBool | getMinValuesSet (int set_index, float &min) const |
Gets the min of a set of scalars. | |
virtual SbBool | getMinVecsSet (int set_index, float &min) const |
Gets the min module of a set of vectors. | |
virtual SbBool | getMaxValuesSet (int set_index, float &max) const |
Gets the max of a set of scalars. | |
virtual SbBool | getMaxVecsSet (int set_index, float &max) const |
Gets the max module of a set of vectors. | |
virtual void | getNodesOwnerCellsInd (const PbArrayOfInt &nod_indices, PbArrayOfInt &owner_cells) const |
Gets the list of indices of cells that own the list of nodes "nod_indices". | |
virtual SbBox3f | getSmallestCellBox (int &cell_index) const |
Gets the smallest cell's bounding box, returns also the index of this cell. | |
virtual SbBox3f | getBiggestCellBox (int &cell_index) const |
Gets the biggest cell's bounding box, returns also the index of this cell. | |
virtual const PbCell * | findContainingCell (const SbVec3f &point, float tolerance, SbVec3f &pcoord, const PbCell *adjacent_cell) const |
virtual const PbCell * | findContainingCell (const SbVec3f &point, float tolerance, SbVec3f &pcoord) const |
Find the cell that contains the point. | |
virtual void | setCoordinates (const float *x_nod, const float *y_nod, const float *z_nod) |
Set new node coordinates without modifying the mesh topology. | |
virtual void | getCoordinates (const float *&xnod, const float *&ynod, const float *&znod, int &size_xnod, int &size_ynod, int &size_znod) const |
Get the current coordinates of the nodes of this mesh. | |
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. | |
Friends | |
int | operator== (const PbPolarGrid2D &m1, const PbPolarGrid2D &m2) |
Equality comparison operator. | |
int | operator!= (const PbPolarGrid2D &m1, const PbPolarGrid2D &m2) |
Inequality comparison operator. | |
Additional Inherited Members | |
Public Types inherited from PbMesh2D | |
enum | ExtrapolationMethod { USE_ADJACENT_DERIVS , USE_ADJACENT_VALUES } |
Specifies the type of extrapolation used by getFaultMesh() when computing values on the fault lines. More... | |
Public Types inherited from PbMesh | |
enum | DataBinding { PER_CELL = PoMeshProperty::PER_CELL , PER_NODE = PoMeshProperty::PER_NODE } |
Data binding. More... | |
Defines a polar grid surface mesh.
Class to define a surface mesh represented by a grid with polar coordinates. This mesh is defined by a matrix num_r * num_t points forming (num_r - 1) * (num_t - 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). r is an array of num_r radius, t an array of num_t angles, and z an array of num_r * num_t floats.
The values on the mesh nodes are defined by the PbMesh::addValuesSet(set_index,val) method, where val argument is an array of num_r * num_t floats.
Definition at line 49 of file PbPolarGrid2D.h.
PbPolarGrid2D::PbPolarGrid2D | ( | SbBool | isDataDuplicate = TRUE | ) |
Constructor of a default simple mesh.
See also PbMesh for more explanations about data duplication.
PbPolarGrid2D::PbPolarGrid2D | ( | const PbPolarGrid2D & | mesh | ) |
Copy constructor.
PbPolarGrid2D::PbPolarGrid2D | ( | int | num_r, |
int | num_t, | ||
const float * | r, | ||
const float * | t, | ||
SbBool | isDataDuplicate = TRUE |
||
) |
Constructor of a 2D surface mesh.
See also PbMesh for more explanations about data duplication.
PbPolarGrid2D::PbPolarGrid2D | ( | int | num_r, |
int | num_t, | ||
const float * | r, | ||
const float * | t, | ||
const float * | z, | ||
SbBool | isDataDuplicate = TRUE |
||
) |
Constructor of a 3D surface mesh.
See also PbMesh for more explanations about data duplication.
PbPolarGrid2D::~PbPolarGrid2D | ( | ) |
Destructor.
|
virtual |
Returns always NULL.
Implements PbMesh.
|
virtual |
Gets the coordinates of a node defined by its i,j indices on the grid.
Implements PbGrid2D.
|
virtual |
Gets the coordinates of a node defined by its index on the grid.
Implements PbGrid2D.
PbPolarGrid2D & PbPolarGrid2D::operator= | ( | const PbPolarGrid2D & | mesh | ) |
Assignment operator.
|
friend |
Inequality comparison operator.
Definition at line 94 of file PbPolarGrid2D.h.
|
friend |
Equality comparison operator.