24#ifndef _PB_INDEXEDMESH2D_
25#define _PB_INDEXEDMESH2D_
27#include <Inventor/STL/vector>
86 int num_cells,
const int *cell_index,
const int *cell_type,
93 PbIndexedMesh2D(
int num_nodes,
const float *x_nod,
const float *y_nod,
const float *z_nod,
94 int num_cells,
const int *cell_index,
const int *cell_type,
116 {
return !(m1 == m2); }
121 void setGeometry(
int num_nodes,
const float *x_nod,
const float *y_nod,
122 int num_cells,
const int *cell_index,
const int *cell_type);
127 void setGeometry(
int num_nodes,
const float *x_nod,
const float *y_nod,
const float *z_nod,
128 int num_cells,
const int *cell_index,
const int *cell_type);
135 void getGeometry(
int &numNode,
const float* &x_nod,
const float* &y_nod,
const float* &z_nod,
136 int &num_cells,
const int32_t *&cell_index,
const int32_t *&cell_type)
const ;
143 void getGeometry(
int &numNode,
const float* &x_nod,
const float* &y_nod,
144 int &num_cells,
const int32_t *&cell_index,
const int32_t *&cell_type)
const ;
151 void getNodes(
int &num_nodes,
const float* &x_nod,
const float* &y_nod,
const float* &z_nod)
const;
158 void getNodes(
int &num_nodes,
const float* &x_nod,
const float* &y_nod)
const;
214 void meshContouring(PiContouring *_PiContouring,
const float *z)
const;
218 void print(FILE *fp)
const;
221 const SbBool * getOrientFlags()
const;
222 virtual SbVec3f getFirstCellNormal()
const;
224 void getNodesCoord(
const float *z,
SoMFVec3f &vertices)
const;
232 void updateCellBoundingBox()
const;
233 virtual void updateOwnerCellsList()
const;
234 virtual void deleteOwnerCellsList()
const;
235 void updateBoundingBox()
const;
240 float *xNodes, *yNodes;
241 int32_t allocElemIndex, *elemIndex, elemIndexSize;
242 int32_t allocElem, *elemType;
244 void setVertices(
int num_nodes,
const float *x_nod,
const float *y_nod);
246 mutable std::vector<PbArrayOfInt> m_ownerCellsList;
250 void constructDefaultMesh();
251 void constructXYGeometry(
int num_nodes,
const float *x_nod,
const float *y_nod,
252 int num_cells,
const int *cell_index,
const int *cell_type,
253 SbBool is_data_duplicate);
254 void setXYGeometry(
int num_nodes,
const float *xNode,
const float *yNode,
255 int num_cells,
const int *cell_index,
const int *cell_type);
#define TRUE
Possible value of SbBool.
DTEXT Dynamic array of int .
<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 a surface mesh o...
friend int operator==(const PbIndexedMesh2D &m1, const PbIndexedMesh2D &m2)
Equality comparison operator.
void setGeometry(int num_nodes, const float *x_nod, const float *y_nod, int num_cells, const int *cell_index, const int *cell_type)
Sets a new 2D geometry.
void getNodes(int &num_nodes, const float *&x_nod, const float *&y_nod, const float *&z_nod) const
Gets the mesh nodes coordinates (x,y,z coordinates)
void getGeometry(int &numNode, const float *&x_nod, const float *&y_nod, const float *&z_nod, int &num_cells, const int32_t *&cell_index, const int32_t *&cell_type) const
Gets the current mesh geometry (x, y and z nodes coordinates).
ElemOrientation
Cell orientation for visualization of 2D surface mesh.
@ ORIENTATION_ZNEG
Cell is oriented with a normal = (0,0,-1)
@ ORIENTATION_ZPOS
Cell is oriented with a normal = (0,0,1)
@ ORIENTATION_AS_IS
The cell orientation is kept.
virtual const PbCell * getCell(int cell_index) const
Gets the cell which index is cell_index.
PbIndexedMesh2D(int num_nodes, const float *x_nod, const float *y_nod, int num_cells, const int *cell_index, const int *cell_type, SbBool is_data_duplicate=TRUE)
Constructor of a 2D surface mesh.
PbIndexedMesh2D(SbBool is_data_duplicate=TRUE)
Constructor of a default simple mesh.
PbIndexedMesh2D & operator=(const PbIndexedMesh2D &mesh)
Assignment operator.
PbIndexedMesh2D(int num_nodes, const float *x_nod, const float *y_nod, const float *z_nod, int num_cells, const int *cell_index, const int *cell_type, SbBool is_data_duplicate=TRUE)
Constructor of a 3D surface mesh.
virtual void setElemOrientation(ElemOrientation cell_orient)
Changes orientation of cells during visualization of 2D surface mesh.
friend int operator!=(const PbIndexedMesh2D &m1, const PbIndexedMesh2D &m2)
Inequality comparison operator.
void getGeometry(int &numNode, const float *&x_nod, const float *&y_nod, int &num_cells, const int32_t *&cell_index, const int32_t *&cell_type) const
Gets the current mesh geometry (x, y nodes coordinates).
~PbIndexedMesh2D()
Destructor.
PbIndexedMesh2D(const PbIndexedMesh2D &mesh)
Copy constructor.
virtual SbVec3f getNodeCoord(int nod_index) const
Gets the coordinates of a node.
void setGeometry(int num_nodes, const float *x_nod, const float *y_nod, const float *z_nod, int num_cells, const int *cell_index, const int *cell_type)
Sets a new 3D geometry.
void getNodes(int &num_nodes, const float *&x_nod, const float *&y_nod) const
Gets the mesh nodes coordinates (only x,y coordinates)
virtual void getNodeOwnerCellsInd(int nod_index, PbArrayOfInt &owner_cells) const
Gets the list of index of cells that own the node "nod_index".
<a href="IconLegend.html"><img src="extMV.gif" alt="MeshViz" border="0"></a> Defines an abstract surf...
<a href="IconLegend.html"><img src="extMV.gif" alt="MeshViz" border="0"></a> Defines a quadrangle cel...
<a href="IconLegend.html"><img src="extMV.gif" alt="MeshViz" border="0"></a> Defines a triangle cell ...
<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> Filled representation of...
<a href="IconLegend.html"><img src="extMV.gif" alt="MeshViz" border="0"></a> Representation of the ed...
Multiple-value field containing any number of three-dimensional vectors.