PbCartesianGrid3D Class Reference
[Property/Data]

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

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

Inheritance diagram for PbCartesianGrid3D:
PbGrid3D PbMesh3D PbMesh PbBase PbParalCartesianGrid3D

List of all members.

Public Member Functions

 PbCartesianGrid3D (SbBool is_data_duplicated=TRUE)
 PbCartesianGrid3D (const PbCartesianGrid3D &)
 PbCartesianGrid3D (int num_x, int num_y, int num_z, const float *xnod, const float *ynod, const float *znod, SbBool is_data_duplicated=TRUE)
 ~PbCartesianGrid3D ()
PbCartesianGrid3Doperator= (const PbCartesianGrid3D &mesh)
void setCoordinates (const float *xnod, const float *ynod, const float *znod)
void getCoordinates (const float *&xnod, const float *&ynod, const float *&znod, int &size_xnod, int &size_ynod, int &size_znod) const
void getGeometry (int &num_x, int &num_y, int &num_z, const float ***&xa, const float ***&ya, const float ***&za) const
virtual const PbCellgetCell (int cell_index) const
virtual SbVec3f getNodeCoord (int nod_index) const
SbVec3f getNodeCoord (int i, int j, int k) const

Friends

int operator== (const PbCartesianGrid3D &m1, const PbCartesianGrid3D &m2)
int operator!= (const PbCartesianGrid3D &m1, const PbCartesianGrid3D &m2)

Detailed Description

MeshViz Defines a cartesian grid volume mesh.

Class to define a mesh represented by a 3D grid with cartesian coordinates. This mesh is defined by a matrix num_x * num_y * num_z points forming (num_x - 1) * (num_y - 1) * (num_z - 1) hexahedrons. Each point with index (i, j,k) in the mesh (except for points along the mesh border) is connected to six points with indices (i+1,j,k), (i,j+1,k), (i-1,j,k), (i,j-1,k), (i,j,k+1), (i,j,k-1). The values on the mesh nodes are defined by the addValuesSet() method, where val argument is an array of num_x * num_y * num_z floats.


Constructor & Destructor Documentation

PbCartesianGrid3D::PbCartesianGrid3D ( SbBool  is_data_duplicated = TRUE  ) 

Constructor.

See also PbMesh for more explanations about data duplication.

PbCartesianGrid3D::PbCartesianGrid3D ( const PbCartesianGrid3D  ) 

Copy constructor.

PbCartesianGrid3D::PbCartesianGrid3D ( int  num_x,
int  num_y,
int  num_z,
const float *  xnod,
const float *  ynod,
const float *  znod,
SbBool  is_data_duplicated = TRUE 
)

Constructor of a volume mesh.

See also PbMesh for more explanations about data duplication.

PbCartesianGrid3D::~PbCartesianGrid3D (  ) 

Destructor.


Member Function Documentation

virtual const PbCell* PbCartesianGrid3D::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.

Implements PbMesh.

Reimplemented in PbParalCartesianGrid3D.

void PbCartesianGrid3D::getCoordinates ( const float *&  xnod,
const float *&  ynod,
const float *&  znod,
int &  size_xnod,
int &  size_ynod,
int &  size_znod 
) const [inline, virtual]

Get the current coordinates of the nodes of this mesh.

Idem as getXYZGeometry.

Parameters:
xnod : array of x coordinate of the mesh nodes.
ynod : array of y coordinate of the mesh nodes.
znod : array of z coordinate of the mesh nodes.
size_xnod : size of the array xnod ( = num nodes of this mesh)
size_ynod : size of the array ynod ( = num nodes of this mesh)
size_znod : size of the array znod ( = num nodes of this mesh)

Reimplemented from PbMesh.

Reimplemented in PbParalCartesianGrid3D.

void PbCartesianGrid3D::getGeometry ( int &  num_x,
int &  num_y,
int &  num_z,
const float ***&  xa,
const float ***&  ya,
const float ***&  za 
) const

Gets the mesh geometry.

xa-ya-za can be used like a matrix (i.e. xa[i][j][k])

SbVec3f PbCartesianGrid3D::getNodeCoord ( int  i,
int  j,
int  k 
) const [inline, virtual]

Gets the coordinates of a node defined by its i,j,k indices on the grid.

Implements PbGrid3D.

Reimplemented in PbParalCartesianGrid3D.

virtual SbVec3f PbCartesianGrid3D::getNodeCoord ( int  nod_index  )  const [virtual]

Gets the coordinates of a node defined by its index.

Implements PbGrid3D.

Reimplemented in PbParalCartesianGrid3D.

PbCartesianGrid3D& PbCartesianGrid3D::operator= ( const PbCartesianGrid3D mesh  ) 

Assignment operator.

Reimplemented from PbGrid3D.

Reimplemented in PbParalCartesianGrid3D.

void PbCartesianGrid3D::setCoordinates ( const float *  xnod,
const float *  ynod,
const float *  znod 
) [virtual]

Set new node coordinates without modifying the mesh topology.

For performance reasons, this method should be called instead of setGeometry when doing a mesh deformation animation. It allows to update the coordinates of a existing level surface, skin, cross section etc, without rebuilding them totally.

Reimplemented from PbMesh.

Reimplemented in PbParalCartesianGrid3D.


Friends And Related Function Documentation

int operator!= ( const PbCartesianGrid3D m1,
const PbCartesianGrid3D m2 
) [friend]

Inequality comparison operator.

Reimplemented in PbParalCartesianGrid3D.

int operator== ( const PbCartesianGrid3D m1,
const PbCartesianGrid3D m2 
) [friend]

Equality comparison operator.

Reimplemented in PbParalCartesianGrid3D.


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

Open Inventor Toolkit reference manual, generated on 4 Sep 2023
Copyright © Thermo Fisher Scientific All rights reserved.
https://www.openinventor.com/