PbParalCartesianGrid3D Class Reference
[Property/Data]

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

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

Inheritance diagram for PbParalCartesianGrid3D:
PbCartesianGrid3D PbGrid3D PbMesh3D PbMesh PbBase

List of all members.

Public Member Functions

 PbParalCartesianGrid3D (SbBool isDataDuplicate=TRUE)
 PbParalCartesianGrid3D (const PbParalCartesianGrid3D &)
 PbParalCartesianGrid3D (int num_x, int num_y, int num_z, const float *xnod, const float *ynod, const float *znod, SbBool isDataDuplicate=TRUE)
 ~PbParalCartesianGrid3D ()
PbParalCartesianGrid3Doperator= (const PbParalCartesianGrid3D &mesh)
virtual const PbCellfindContainingCell (const SbVec3f &point, float tolerance, SbVec3f &pcoord, const PbCell *adjacent_cell) const
virtual const PbCellfindContainingCell (const SbVec3f &point, float tolerance, SbVec3f &pcoord) const
virtual const PbCellgetCell (int cell_index) const
virtual SbVec3f getNodeCoord (int nod_index) const
virtual SbVec3f getNodeCoord (int i, int j, int k) const
virtual float getVolume () const
void setCoordinates (const float *xnod, const float *ynod, const float *znod)
void getCoordinates (const float *&xnod, const float *&ynod, const float *&znod, int &num_x, int &num_y, int &num_z) const

Friends

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

Detailed Description

MeshViz Defines a parallel cartesian grid volume mesh.

Class to define a volume mesh represented by a grid, with cartesian coordinates, where the lines are parallel to X, Y or Z axis. This mesh is defined by num_x lines orthogonal to X axis, num_y lines orthogonal to Y axis and num_z lines orthogonal to Z axis, and by one or two values at each vertices of the mesh. This mesh is comparable to a set of parallel PbParalCartesianGrid2D. x is an array of num_x floats, y an array of num_y floats, and z an array of num_z 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_x * num_y * num_z floats.


Constructor & Destructor Documentation

PbParalCartesianGrid3D::PbParalCartesianGrid3D ( SbBool  isDataDuplicate = TRUE  ) 

Constructor of a default simple mesh.

See also PbMesh for more explanations about data duplication.

PbParalCartesianGrid3D::PbParalCartesianGrid3D ( const PbParalCartesianGrid3D  ) 

Copy constructor.

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

Constructor of a 3D parallel grid mesh.

See also PbMesh for more explanations about data duplication.

PbParalCartesianGrid3D::~PbParalCartesianGrid3D (  ) 

Destructor.


Member Function Documentation

virtual const PbCell* PbParalCartesianGrid3D::findContainingCell ( const SbVec3f point,
float  tolerance,
SbVec3f pcoord 
) const [virtual]

Find the mesh's cell that contains the point.

If the (optional) adjacent cell is given, searching the containing cell starts by the cells around this adjacent one. Returns also the parametric coordinates of the point in the found cell. Parametric coordinates are the coordinates of the point relative to a topologically equivalent unit cell. A point is inside a cell if its parametric coordinates range from 0 to 1. However we use a test with a tolerance value: a point is inside the cell if its parametric coordinates p verify -tolerance <= p <= 1+tolerance. Parametric coordinates are useful to interpolate the value in the cell (see PbCell::getValue). Attention! This method returns always the same address of an internal private cell. This private cell is updated each time findContainingCell is called. If the cell exists, it returns always a PbVoxelCell object.

Reimplemented from PbMesh.

virtual const PbCell* PbParalCartesianGrid3D::findContainingCell ( const SbVec3f point,
float  tolerance,
SbVec3f pcoord,
const PbCell adjacent_cell 
) const [virtual]

Reimplemented from PbMesh.

virtual const PbCell* PbParalCartesianGrid3D::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 PbVoxelCell object. Attention! This method returns always the same address of an internal private cell. This private cell is updated each time getCell is called.

Reimplemented from PbCartesianGrid3D.

void PbParalCartesianGrid3D::getCoordinates ( const float *&  xnod,
const float *&  ynod,
const float *&  znod,
int &  num_x,
int &  num_y,
int &  num_z 
) const [inline, virtual]

Get the current coordinates of the nodes of this mesh.

Parameters:
xnod array of x coord
ynod array of y coord
znod array of z coord
num_x : size of the array xnod
num_y : size of the array ynod
num_z : size of the array znod

Reimplemented from PbCartesianGrid3D.

virtual SbVec3f PbParalCartesianGrid3D::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.

Reimplemented from PbCartesianGrid3D.

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

Gets the coordinates of a node.

Reimplemented from PbCartesianGrid3D.

virtual float PbParalCartesianGrid3D::getVolume (  )  const [inline, virtual]

Gets the volume of the mesh.

Reimplemented from PbMesh3D.

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

Assignment operator.

Reimplemented from PbCartesianGrid3D.

void PbParalCartesianGrid3D::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 PbCartesianGrid3D.


Friends And Related Function Documentation

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

Inequality comparison operator.

Reimplemented from PbCartesianGrid3D.

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

Equality comparison operator.

Reimplemented from PbCartesianGrid3D.


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

Open Inventor Toolkit reference manual, generated on 12 Feb 2024
Copyright © Thermo Fisher Scientific All rights reserved.
http://www.openinventor.com/