Open Inventor Release 2024.2.0
 
Loading...
Searching...
No Matches
PbMesh2D.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_MESH2D_
25#define _PB_MESH2D_
26
27#include <MeshViz/3Ddata/PbMesh.h>
28#include <MeshViz/3Ddata/Po3DdataPrivate.h>
29#include <MeshViz/3Ddata/PbDefinedValue.h>
30
31#include <Inventor/nodes/SoCoordinate3.h>
32#include <cstdio>
33
34class PiContouring;
35class PoMesh2D;
36class PoMeshLines;
37class PoMeshFilled;
38class PoMeshSides;
40class PoMesh2DVec;
41class SoMFVec3f;
42
54class PbMesh2D : public PbMesh {
55
56
57 public:
58
67 void addVecsSet(int set_index, const SbVec2f *val, const SbString &setName ="");
68
73 virtual SbBox2f getBoundingBox() const;
74
78 virtual float getVolume() const { return 0.0;}
79
83 virtual float getArea() const;
84
101
147 PbMesh2D *getFaultMesh(int num_fault_lines, const int *fault_line_sizes, const SbVec3f *coord,
148 ExtrapolationMethod extrapol_method, PbDefinedValue &definedValue) const;
149
155 PbMesh2D *getFaultMesh(int num_fault_lines, const int *fault_line_sizes, const SbVec3f *coord) const
156 {
157 PbDefinedValue definedValue = PbDefinedValue();
158 return getFaultMesh(num_fault_lines, fault_line_sizes, coord,
159 PbMesh2D::USE_ADJACENT_DERIVS, definedValue);
160 }
161
162 private:
163 PbMesh2D(SbBool is_data_duplicate=TRUE);
164 PbMesh2D(const PbMesh2D &mesh);
165 ~PbMesh2D();
166
167 PbMesh2D& operator=(const PbMesh2D &mesh) ;
168 // Assignment operator.
169
170 void addVecsSet(int set_index, const SbVec3f *val, const SbString &setName = "")
171 { PbMesh::addVecsSet(set_index,val,setName); };
172
173 virtual const float *getZcoord() const;
174
175 virtual void meshLines(PoMeshLines *_PoMeshLines) const;
176 virtual void meshFilled(PoMeshFilled *_PoMeshFilled) const;
177 virtual void meshContouring(PiContouring *_PiContouring, const float *z) const;
178 virtual void mesh2DVec(PoMesh2DVec *_PoMesh2DVec) const;
179
180 virtual void getNodesCoord(const float *z, SoMFVec3f &vertices) const = 0;
181
182 virtual void getLimitIndices(PbArrayOfInt &nodesIndex, PbArrayOfInt &limitSizes) const = 0;
183 virtual SbBool hasSidesNormals() const;
184 virtual void getSidesNormals(SbVec3f *&normals,
185 const PbArrayOfInt &limitSizes) const;
186
187 void pushZCoord(int val_index);
188 void popZCoord();
189
190 virtual SbVec3f getFirstCellNormal() const = 0;
191
192
193 void print(FILE *fp) const;
194
195 private:
196 PbMesh2D(int num_z, const float *z, SbBool is_data_duplicate);
197 void setZCoord(int num_z, const float *z);
198 const PbCell* findContainingCellProtected(const SbVec3f &point, float tolerance, SbVec3f &pcoord, PbArrayOfInt &test_cell) const;
199
200 float *m_zCoord, *m_zCoordSaved;
201 int m_numZCoord;
202 private:
203
204 void copy(const PbMesh2D &mesh) ;
205 void destroy();
206
207 void modify_triangle(int32_t *trianglelist, int triangle, int old_node, int new_node) const;
208
209} ;
210
211/*---------------------------------------------------------------------------*/
212
213#endif /* _PB_MESH2D_ */
214
215
216
217
218
219
220
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> Class used to manage "de...
<a href="IconLegend.html"><img src="extMV.gif" alt="MeshViz" border="0"></a> Defines an abstract surf...
Definition PbMesh2D.h:54
PbMesh2D * getFaultMesh(int num_fault_lines, const int *fault_line_sizes, const SbVec3f *coord) const
Same as calling getFaultMesh(num_fault_lines, fault_line_sizes, coord,PbMesh2D::USE_ADJACENT_DERIVS,...
Definition PbMesh2D.h:155
virtual float getVolume() const
Always returns 0.
Definition PbMesh2D.h:78
PbMesh2D * getFaultMesh(int num_fault_lines, const int *fault_line_sizes, const SbVec3f *coord, ExtrapolationMethod extrapol_method, PbDefinedValue &definedValue) const
Builds a new mesh by inserting some fault lines in this mesh.
ExtrapolationMethod
Specifies the type of extrapolation used by getFaultMesh() when computing values on the fault lines.
Definition PbMesh2D.h:89
@ USE_ADJACENT_DERIVS
Computes the value at a point of the fault line by using the derivatives at its adjacent nodes.
Definition PbMesh2D.h:94
@ USE_ADJACENT_VALUES
Computes the value at a point of the fault line as the average values of its adjacent nodes.
Definition PbMesh2D.h:99
void addVecsSet(int set_index, const SbVec2f *val, const SbString &setName="")
Adds a set of 2D vectors on the mesh.
virtual SbBox2f getBoundingBox() const
Gets the 2D mesh's bounding box.
virtual float getArea() const
Gets the area of the mesh.
<a href="IconLegend.html"><img src="extMV.gif" alt="MeshViz" border="0"></a> Defines an abstract mesh...
Definition PbMesh.h:84
virtual void addVecsSet(int set_index, const SbVec3f *val, const SbString &set_name="")
Adds a set of vector values .
<a href="IconLegend.html"><img src="extMV.gif" alt="MeshViz" border="0"></a> Base class for all surfa...
Definition PoMesh2D.h:53
<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> Class to build contour l...
<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 box class.
Definition SbBox.h:1798
Class for smart character strings.
Definition SbString.h:202
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