PbCartesianGrid2D Class Reference
[Property/Data]

MeshViz Defines a cartesian grid surface mesh. More...

#include <MeshViz/3Ddata/PbCartesianGrid2D.h>

Inheritance diagram for PbCartesianGrid2D:
PbGrid2D PbMesh2D PbMesh PbBase PbParalCartesianGrid2D

List of all members.

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 ()
PbCartesianGrid2Doperator= (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
virtual const PbCellgetCell (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)

Detailed Description

MeshViz Defines a cartesian grid surface mesh.

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.


Constructor & Destructor Documentation

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.


Member Function Documentation

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

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  ) 

Assignment operator.

Reimplemented from PbGrid2D.

Reimplemented in PbParalCartesianGrid2D.


Friends And Related Function Documentation

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.


The documentation for this class was generated from the following file:

Open Inventor Toolkit reference manual, generated on 15 Mar 2023
Copyright © Thermo Fisher Scientific All rights reserved.
http://www.openinventor.com/