Open Inventor Release 2023.2.3
 
Loading...
Searching...
No Matches
PbPolarGrid2D.h
Go to the documentation of this file.
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_POLARGRID2D_
25#define _PB_POLARGRID2D_
26
28class PiContouring;
29
30
49class PbPolarGrid2D : public PbGrid2D {
50
51
52 public:
53
57 PbPolarGrid2D(SbBool isDataDuplicate=TRUE) ;
58
63
68 PbPolarGrid2D(int num_r, int num_t, const float *r, const float *t, SbBool isDataDuplicate=TRUE) ;
69
74 PbPolarGrid2D(int num_r, int num_t, const float *r, const float *t, const float *z, SbBool isDataDuplicate=TRUE) ;
75
80
85
89 friend int operator ==(const PbPolarGrid2D &m1, const PbPolarGrid2D &m2);
90
94 friend int operator !=(const PbPolarGrid2D &m1, const PbPolarGrid2D &m2)
95 { return !(m1 == m2); }
96
100 virtual const PbCell *getCell(int cell_index) const;
101
105 virtual SbVec3f getNodeCoord(int nod_index) const;
106
110 virtual SbVec3f getNodeCoord(int i, int j) const;
111
112 /*----------------------------------------------------------------------------*/
113
114
115 private:
116
117 void meshLines(PoMeshLines *_PoMeshLines) const;
118 void meshFilled(PoMeshFilled *_PoMeshFilled) const;
119 void meshContouring(PiContouring *_PiContouring, const float *z) const;
120 void mesh2DVec(PoMesh2DVec *mesh_vec) const ;
121
122 void getNodesCoord(const float *z, SoMFVec3f &vertices) const;
123
124 void print(FILE *fp) const;
125
126 private:
127 void constructXYGeometry(const float *rn, const float *tn, SbBool is_data_duplicate);
128 void setXYGeometry(int num_r, int num_t, const float *x, const float *y);
129 void getXYGeometry(const float* &x, const float* &y) const;
130
131 private:
132 float *r, *t;
133
134 void updateBoundingBox() const;
135 void copy(const PbPolarGrid2D &mesh) ;
136 void destroy();
137} ;
138
139/*---------------------------------------------------------------------------*/
140
141#endif /* _PB_POLARGRID2D_ */
142
143
144
145
146
147
148
#define TRUE
Possible value of SbBool.
Definition SbBase.h:77
<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 an abstract grid...
Definition PbGrid2D.h:43
<a href="IconLegend.html"><img src="extMV.gif" alt="MeshViz" border="0"></a> Defines a polar grid sur...
PbPolarGrid2D(int num_r, int num_t, const float *r, const float *t, const float *z, SbBool isDataDuplicate=TRUE)
Constructor of a 3D surface mesh.
virtual SbVec3f getNodeCoord(int i, int j) const
Gets the coordinates of a node defined by its i,j indices on the grid.
~PbPolarGrid2D()
Destructor.
PbPolarGrid2D & operator=(const PbPolarGrid2D &mesh)
Assignment operator.
PbPolarGrid2D(SbBool isDataDuplicate=TRUE)
Constructor of a default simple mesh.
virtual const PbCell * getCell(int cell_index) const
Returns always NULL.
friend int operator!=(const PbPolarGrid2D &m1, const PbPolarGrid2D &m2)
Inequality comparison operator.
virtual SbVec3f getNodeCoord(int nod_index) const
Gets the coordinates of a node defined by its index on the grid.
friend int operator==(const PbPolarGrid2D &m1, const PbPolarGrid2D &m2)
Equality comparison operator.
PbPolarGrid2D(const PbPolarGrid2D &mesh)
Copy constructor.
PbPolarGrid2D(int num_r, int num_t, const float *r, const float *t, SbBool isDataDuplicate=TRUE)
Constructor of a 2D surface mesh.
<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
Multiple-value field containing any number of three-dimensional vectors.
Definition SoMFVec3f.h:181
int SbBool
Boolean type.
Definition SbBase.h:87