24#ifndef _PB_REGULARCARTESIANGRID3D_
25#define _PB_REGULARCARTESIANGRID3D_
69 float x_min,
float y_min,
float z_min,
70 float x_max,
float y_max,
float z_max,
94 {
return !(m1 == m2); }
100 float x_min,
float y_min,
float z_min,
101 float x_max,
float y_max,
float z_max);
107 void getGeometry(
int &num_x,
int &num_y,
int &num_z,
108 float &x_min,
float &y_min,
float &z_min,
109 float &x_max,
float &y_max,
float &z_max)
const;
114 const PbCell *adjacent_cell)
const;
150 {
return SbVec3f(m_xmin+i*m_dx, m_ymin+j*m_dy, m_zmin+k*m_dz); };
156 {
return fabs((m_xmax-m_xmin)*(m_ymax-m_ymin)*(m_zmax-m_zmin)); }
179 int &size_xnod,
int &size_ynod,
int &size_znod)
const {
183 size_xnod = size_ynod = size_znod = 2;
188 void setBounds(
float x_min,
float y_min,
float z_min,
189 float x_max,
float y_max,
float z_max);
191 float getLongestEdgeLength();
197 const float *nod_values,
200 float *z_cont)
const;
202 SbBool isCrossSectionOptimal()
const {
return TRUE; }
204 void print(FILE *fp)
const;
207 virtual const PbCell *getTopoCell(
int cell_index)
const;
210 void constructXYGeometry(
float x_min,
float y_min,
211 float x_max,
float y_max,
212 SbBool is_data_duplicate);
213 void setXYZGeometry(
int num_x,
int num_y,
int num_z,
214 const float *x,
const float *
y,
const float *z);
215 void getXYZGeometry(
const float* &x,
const float* &
y,
const float* &z)
const;
216 virtual void grid3DSkin(
PoMeshSkin *_PoMeshSkin)
const;
219 float m_x[2], m_y[2], m_z[2];
220 float m_xmin, m_xmax, m_dx;
221 float m_ymin, m_ymax, m_dy;
222 float m_zmin, m_zmax, m_dz;
224 void updateBoundingBox()
const;
235 float &x_min,
float &y_min,
float &z_min,
236 float &x_max,
float &y_max,
float &z_max)
const
238 num_x = numX; x_min = m_xmin; x_max = m_xmax;
239 num_y = numY; y_min = m_ymin; y_max = m_ymax;
240 num_z = numZ; z_min = m_zmin; z_max = m_zmax;
#define TRUE
Possible value of SbBool.
<a href="IconLegend.html"><img src="extMV.gif" alt="MeshViz" border="0"></a> Defines an abstract cell...
<a href="IconLegend.html"><img src="extMV.gif" alt="MeshViz" border="0"></a> Defines an abstract grid...
<a href="IconLegend.html"><img src="extMV.gif" alt="MeshViz" border="0"></a> Defines a regular cartes...
virtual const PbCell * getCell(int cell_index) const
Gets the cell which index is cell_index.
void setGeometry(int num_x, int num_y, int num_z, float x_min, float y_min, float z_min, float x_max, float y_max, float z_max)
Defines a new geometry.
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.
virtual SbVec3f getNodeCoord(int nod_index) const
Gets the coordinates of a node defined by its index.
~PbRegularCartesianGrid3D()
Destructor.
void getGeometry(int &num_x, int &num_y, int &num_z, float &x_min, float &y_min, float &z_min, float &x_max, float &y_max, float &z_max) const
Gets the mesh geometry.
PbRegularCartesianGrid3D(const PbRegularCartesianGrid3D &mesh)
Copy constructor.
PbRegularCartesianGrid3D(int num_x, int num_y, int num_z, float x_min, float y_min, float z_min, float x_max, float y_max, float z_max, SbBool isDataDuplicate=TRUE)
Constructor of a 3D regular grid mesh.
virtual const PbCell * findContainingCell(const SbVec3f &point, float tolerance, SbVec3f &pcoord, const PbCell *adjacent_cell) const
PbRegularCartesianGrid3D(SbBool isDataDuplicate=TRUE)
Constructor of a default simple mesh.
friend int operator==(const PbRegularCartesianGrid3D &m1, const PbRegularCartesianGrid3D &m2)
Equality comparison operator.
virtual float getVolume() const
Gets the volume of the mesh.
void setCoordinates(const float *xnod, const float *ynod, const float *znod)
Set new node coordinates without modifying the mesh topology.
virtual const PbCell * findContainingCell(const SbVec3f &point, float tolerance, SbVec3f &pcoord) const
Find the mesh's cell that contains the point.
friend int operator!=(const PbRegularCartesianGrid3D &m1, const PbRegularCartesianGrid3D &m2)
Inequality comparison operator.
PbRegularCartesianGrid3D & operator=(const PbRegularCartesianGrid3D &mesh)
Assignment operator.
virtual SbVec3f getNodeCoord(int i, int j, int k) const
Gets the coordinates of a node defined by its i, j, k indices on the grid.
<a href="IconLegend.html"><img src="extMV.gif" alt="MeshViz" border="0"></a> Defines a voxel cell of ...
<a href="IconLegend.html"><img src="extMV.gif" alt="MeshViz" border="0"></a> Representation of vector...
<a href="IconLegend.html"><img src="extMV.gif" alt="MeshViz" border="0"></a> Representation of cross-...
<a href="IconLegend.html"><img src="extMV.gif" alt="MeshViz" border="0"></a> Representation of cross ...
<a href="IconLegend.html"><img src="extMV.gif" alt="MeshViz" border="0"></a> Representation of the sk...
<a href="IconLegend.html"><img src="extMV.gif" alt="MeshViz" border="0"></a> Representation of the me...