Open Inventor Release 2024.2.0
 
Loading...
Searching...
No Matches
PbParalCartesianGrid2D.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_PARALCARTESIANGRID2D_
25#define _PB_PARALCARTESIANGRID2D_
26
27#include <MeshViz/3Ddata/PbCartesianGrid2D.h>
28
29class PiContouring;
30class PoMeshLines;
31class PoMeshFilled;
32class PoMeshSides;
33class SbVec2f;
34class PbPixelCell;
36
54
55
56 public:
57
61 PbParalCartesianGrid2D(SbBool isDataDuplicate=TRUE) ;
62
67
72 PbParalCartesianGrid2D(int num_x, int num_y, const float *x, const float *y, SbBool isDataDuplicate=TRUE) ;
73
78 PbParalCartesianGrid2D(int num_x, int num_y, const float *x, const float *y, const float *z, SbBool isDataDuplicate=TRUE) ;
79
84
89
94
99 { return !(m1 == m2); }
100
101 virtual const PbCell* findContainingCell(const SbVec3f &point, float tolerance, SbVec3f &pcoord, const PbCell *adjacent_cell) const;
102
116 virtual const PbCell* findContainingCell(const SbVec3f &point, float tolerance, SbVec3f &pcoord) const;
117
124 virtual const PbCell *getCell(int cell_index) const;
125
129 virtual SbVec3f getNodeCoord(int nod_index) const;
130
134 virtual SbVec3f getNodeCoord(int i, int j) const;
135
139 virtual float getArea() const;
140
141
142 private:
143 void meshLines(PoMeshLines *_PoMeshLines) const;
144 void meshFilled(PoMeshFilled *_PoMeshFilled) const;
145 void meshContouring(PiContouring *_PiContouring, const float *z) const;
146 void mesh2DVec(PoMesh2DVec *mesh_vec) const ;
147
148 void getNodesCoord(const float *z, SoMFVec3f &vertices) const;
149 virtual SbBool hasSidesNormals() const;
150 virtual void getSidesNormals(SbVec3f *&normals,
151 const PbArrayOfInt &limitSizes) const;
152
153 void print(FILE *fp) const;
154
155 private:
156 void constructXYGeometry(const float *xn, const float *yn, SbBool is_data_duplicate);
157 void setXYGeometry(int num_x, int num_y, const float *x, const float *y);
158 void getXYGeometry(const float* &x, const float* &y) const;
159
160 private:
161 float *x, *y;
162
163 void updateBoundingBox() const;
164 void copy(const PbParalCartesianGrid2D &mesh) ;
165 void destroy();
166
167 mutable PbPixelCell *m_pixel;
168 mutable PbQuadrangleCell *m_quadrangle;
169} ;
170
171/*---------------------------------------------------------------------------*/
172
173#endif /* _PB_PARALCARTESIANGRID2D_ */
174
175
176
177
178
179
180
DTEXT Dynamic array of int .
<a href="IconLegend.html"><img src="extMV.gif" alt="MeshViz" border="0"></a> Defines a cartesian grid...
<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 parallel carte...
virtual SbVec3f getNodeCoord(int i, int j) const
Gets the coordinates of a node defined by its i,j indices on the grid.
virtual const PbCell * findContainingCell(const SbVec3f &point, float tolerance, SbVec3f &pcoord, const PbCell *adjacent_cell) const
virtual float getArea() const
Gets the area of the mesh.
PbParalCartesianGrid2D(int num_x, int num_y, const float *x, const float *y, SbBool isDataDuplicate=TRUE)
Constructor of a 2D parallel grid mesh.
~PbParalCartesianGrid2D()
Destructor.
PbParalCartesianGrid2D(int num_x, int num_y, const float *x, const float *y, const float *z, SbBool isDataDuplicate=TRUE)
Constructor of a 3D parallel grid mesh.
PbParalCartesianGrid2D(const PbParalCartesianGrid2D &mesh)
Copy constructor.
friend int operator!=(const PbParalCartesianGrid2D &m1, const PbParalCartesianGrid2D &m2)
Inequality comparison operator.
PbParalCartesianGrid2D & operator=(const PbParalCartesianGrid2D &mesh)
Assignment operator.
virtual const PbCell * getCell(int cell_index) const
Gets the cell which index is cell_index.
virtual SbVec3f getNodeCoord(int nod_index) const
Gets the coordinates of a node defined by its index.
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 PbParalCartesianGrid2D &m1, const PbParalCartesianGrid2D &m2)
Equality comparison operator.
PbParalCartesianGrid2D(SbBool isDataDuplicate=TRUE)
Constructor of a default simple mesh.
<a href="IconLegend.html"><img src="extMV.gif" alt="MeshViz" border="0"></a> Defines a pixel cell of ...
Definition PbPixelCell.h:51
<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> 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
<a href="IconLegend.html"><img src="extMV.gif" alt="MeshViz" border="0"></a> Class to build the sides...
Definition PoMeshSides.h:72
2D vector class.
Definition SbVec.h:76
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