Open Inventor Release 2024.1.3
 
Loading...
Searching...
No Matches
PbQuadrangleMesh2D.h
1/*=======================================================================
2 *** THE CONTENT OF THIS WORK IS PROPRIETARY TO FEI S.A.S, (FEI S.A.S.), ***
3 *** AND IS DISTRIBUTED UNDER A LICENSE AGREEMENT. ***
4 *** ***
5 *** REPRODUCTION, DISCLOSURE, OR USE, IN WHOLE OR IN PART, OTHER THAN AS ***
6 *** SPECIFIED IN THE LICENSE ARE NOT TO BE UNDERTAKEN EXCEPT WITH PRIOR ***
7 *** WRITTEN AUTHORIZATION OF FEI S.A.S. ***
8 *** ***
9 *** RESTRICTED RIGHTS LEGEND ***
10 *** USE, DUPLICATION, OR DISCLOSURE BY THE GOVERNMENT OF THE CONTENT OF THIS ***
11 *** WORK OR RELATED DOCUMENTATION IS SUBJECT TO RESTRICTIONS AS SET FORTH IN ***
12 *** SUBPARAGRAPH (C)(1) OF THE COMMERCIAL COMPUTER SOFTWARE RESTRICTED RIGHT ***
13 *** CLAUSE AT FAR 52.227-19 OR SUBPARAGRAPH (C)(1)(II) OF THE RIGHTS IN ***
14 *** TECHNICAL DATA AND COMPUTER SOFTWARE CLAUSE AT DFARS 52.227-7013. ***
15 *** ***
16 *** COPYRIGHT (C) 1996-2014 BY FEI S.A.S, ***
17 *** BORDEAUX, FRANCE ***
18 *** ALL RIGHTS RESERVED ***
19**=======================================================================*/
20/*=======================================================================
21** Author : VSG (MMM YYYY)
22**=======================================================================*/
23
24#ifndef _PB_QUADRANGLEMESH2D_
25#define _PB_QUADRANGLEMESH2D_
26
27#include <MeshViz/3Ddata/PbIndexedMesh2D.h>
28class PiContouring;
30
59
60
61 public:
62
66 PbQuadrangleMesh2D(SbBool isDataDuplicate=TRUE) ;
67
72
77 PbQuadrangleMesh2D(int num_nodes, const float *x_nod, const float *y_nod,
78 int num_quadrangles, const int32_t *quadrangle_index,
79 SbBool isDataDuplicate=TRUE) ;
80
85 PbQuadrangleMesh2D(int num_nodes, const float *x_nod, const float *y_nod, const float *z_nod,
86 int num_quadrangles, const int32_t *quadrangle_index,
87 SbBool isDataDuplicate=TRUE) ;
88
93
98
102 friend int operator ==(const PbQuadrangleMesh2D &m1, const PbQuadrangleMesh2D &m2);
103
107 friend int operator !=(const PbQuadrangleMesh2D &m1, const PbQuadrangleMesh2D &m2)
108 { return !(m1 == m2); }
109
113 void setGeometry(int num_nodes, const float *x_nod, const float *y_nod,
114 int num_quadrangles, const int *quadrangle_index);
115
119 void setGeometry(int num_nodes, const float *x_nod, const float *y_nod, const float *z_nod,
120 int num_quadrangles, const int *quadrangle_index);
121
127 void getGeometry(int &num_nodes, const float *&x_nod, const float *&y_nod,
128 int &num_quadrangles, const int32_t *&quadrangle_index) const;
129
135 void getGeometry(int &num_nodes, const float *&x_nod, const float *&y_nod, const float *&z_nod,
136 int &num_quadrangles, const int32_t *&quadrangle_index) const;
137
143 void getGeometry(int &num_nodes, const float *&x_nod, const float *&y_nod,
144 int &num_quadrangles, const int32_t **&quadrangle_index) const;
145
151 void getGeometry(int &num_nodes, const float *&x_nod, const float *&y_nod, const float *&z_nod,
152 int &num_quadrangles, const int32_t **&quadrangle_index) const;
153
157 virtual void getNodesOwnerCellsInd(const PbArrayOfInt &nod_indices, PbArrayOfInt &owner_cells) const;
158
165 virtual const PbCell *getCell(int cell_index) const;
166
175 virtual void setElemOrientation(ElemOrientation elem_orient);
176
177
178 private:
179
180 void meshLines(PoMeshLines *_PoMeshLines) const;
181 void meshFilled(PoMeshFilled *_PoMeshFilled) const;
182 void meshContouring(PiContouring *_PiContouring, const float *z) const;
183 void mesh2DVec(PoMesh2DVec *mesh_vec) const ;
184
185 virtual void getLimitIndices(PbArrayOfInt &nodesIndex, PbArrayOfInt &limitSizes) const;
186
187 void print(FILE *fp) const;
188
189 private:
190 virtual const PbCell* findContainingCellProtected(const SbVec3f &point, float tolerance, SbVec3f &pcoord, PbArrayOfInt &test_cell) const;
191 void updateCellBoundingBox() const;
192 void updateOwnerCellsList() const;
193
194 private:
195 void constructXYGeometry(int num_nodes, const float *x_nod, const float *y_nod,
196 int num_quadrangles, const int32_t *quadrangle_index,
197 SbBool is_data_duplicate);
198 void setXYGeometry(int num_nodes, const float *x_nod, const float *y_nod,
199 int num_quadrangles, const int *quadrangle_index);
200
201 int32_t **quadrangleIndex;
202
203 void copy(const PbQuadrangleMesh2D &mesh) ;
204 void destroy();
205
206 mutable PbQuadrangleCell *m_quadrangle;
207} ;
208
209/*---------------------------------------------------------------------------*/
210
211#endif /* _PB_QUADRANGLEMESH2D_ */
212
213
214
215
216
217
218
DTEXT Dynamic array of int .
<a href="IconLegend.html"><img src="extMV.gif" alt="MeshViz" border="0"></a> Defines an abstract cell...
Definition PbCell.h:49
<a href="IconLegend.html"><img src="extMV.gif" alt="MeshViz" border="0"></a> Defines a surface mesh o...
ElemOrientation
Cell orientation for visualization of 2D surface mesh.
<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 surface mesh o...
void getGeometry(int &num_nodes, const float *&x_nod, const float *&y_nod, int &num_quadrangles, const int32_t *&quadrangle_index) const
Gets the current mesh geometry (x, y nodes coordinates).
PbQuadrangleMesh2D(SbBool isDataDuplicate=TRUE)
Constructor of a default simple mesh.
friend int operator==(const PbQuadrangleMesh2D &m1, const PbQuadrangleMesh2D &m2)
Equality comparison operator.
void getGeometry(int &num_nodes, const float *&x_nod, const float *&y_nod, int &num_quadrangles, const int32_t **&quadrangle_index) const
Gets the current mesh geometry (x, y nodes coordinates).
PbQuadrangleMesh2D(int num_nodes, const float *x_nod, const float *y_nod, int num_quadrangles, const int32_t *quadrangle_index, SbBool isDataDuplicate=TRUE)
Constructor of a 2D surface mesh.
void setGeometry(int num_nodes, const float *x_nod, const float *y_nod, const float *z_nod, int num_quadrangles, const int *quadrangle_index)
Sets a new 3D geometry.
virtual void getNodesOwnerCellsInd(const PbArrayOfInt &nod_indices, PbArrayOfInt &owner_cells) const
Gets the list of index of cells that own the node "nod_index".
PbQuadrangleMesh2D(const PbQuadrangleMesh2D &mesh)
Copy constructor.
virtual void setElemOrientation(ElemOrientation elem_orient)
Changes orientation of cells during visualization of 2D surface mesh.
void setGeometry(int num_nodes, const float *x_nod, const float *y_nod, int num_quadrangles, const int *quadrangle_index)
Sets a new 2D geometry.
PbQuadrangleMesh2D & operator=(const PbQuadrangleMesh2D &mesh)
Assignment operator.
virtual const PbCell * getCell(int cell_index) const
Gets the cell which index is cell_index.
PbQuadrangleMesh2D(int num_nodes, const float *x_nod, const float *y_nod, const float *z_nod, int num_quadrangles, const int32_t *quadrangle_index, SbBool isDataDuplicate=TRUE)
Constructor of a 3D surface mesh.
void getGeometry(int &num_nodes, const float *&x_nod, const float *&y_nod, const float *&z_nod, int &num_quadrangles, const int32_t **&quadrangle_index) const
Gets the current mesh geometry (x, y and z nodes coordinates).
void getGeometry(int &num_nodes, const float *&x_nod, const float *&y_nod, const float *&z_nod, int &num_quadrangles, const int32_t *&quadrangle_index) const
Gets the current mesh geometry (x, y and z nodes coordinates).
~PbQuadrangleMesh2D()
Destructor.
friend int operator!=(const PbQuadrangleMesh2D &m1, const PbQuadrangleMesh2D &m2)
Inequality comparison operator.
<a href="IconLegend.html"><img src="extMV.gif" alt="MeshViz" border="0"></a> Representation of vector...
Definition PoMesh2DVec.h:97
<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...
Definition PoMeshLines.h:65
3D vector class.
Definition SbVec.h:932
int SbBool
Boolean type.
Definition SbBase.h:87