Code_TYMPAN  4.4.0
Industrial site acoustic simulation
delaunay_maker.h
Go to the documentation of this file.
1 /*
2  * Copyright (C) <2012-2014> <EDF-R&D> <FRANCE>
3  * This program is free software; you can redistribute it and/or modify
4  * it under the terms of the GNU General Public License as published by
5  * the Free Software Foundation; either version 2 of the License, or
6  * (at your option) any later version.
7  * This program is distributed in the hope that it will be useful,
8  * but WITHOUT ANY WARRANTY; without even the implied warranty of
9  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
10  * See the GNU General Public License for more details.
11  * You should have received a copy of the GNU General Public License along
12  * with this program; if not, write to the Free Software Foundation, Inc.,
13  * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
14  */
15 
16 #ifndef TY_MC_DELAUNAY_MAKER
17 #define TY_MC_DELAUNAY_MAKER
18 
19 #include <qlist.h>
20 
23 
31 {
32 public:
34  ODelaunayMaker(double triangulatePrecision);
36  virtual ~ODelaunayMaker();
37 
38 public:
43  void reinitParameters(void);
44 
46  void setDecimation(double xdecim, double ydecim, double zdecim);
47 
52  void addVertex(OPoint3D vertex);
53 
58  bool compute(void);
59 
64  void getBoundaries(double& xmin, double& ymin, double& zmin, double& xmax, double& ymax, double& zmax);
65 
70  QList<OTriangle> getFaces(void);
71 
76  QList<OPoint3D> getVertex(void);
77 
78 private:
79  OPoint3D computeCircle(const OPoint3D& p1, const OPoint3D& p2, const OPoint3D& p3);
80  void decimate(void);
81  void triangulate(void);
82  void invertCoordinates(void);
83 
84 private:
86  QList<OTriangle> _triangleOut;
88  QList<OPoint3D> _vertexInOut;
89 
94 };
95 
96 #endif // TY_MC_DELAUNAY_MAKER
All base classes related to 3D manipulation.
Delaunay triangulation.
bool compute(void)
Compute the triangulation.
QList< OTriangle > _triangleOut
Triangles list.
void getBoundaries(double &xmin, double &ymin, double &zmin, double &xmax, double &ymax, double &zmax)
Define boundaries.
ODelaunayMaker(double triangulatePrecision)
Constructor.
QList< OTriangle > getFaces(void)
Return faces list.
void decimate(void)
void triangulate(void)
void setDecimation(double xdecim, double ydecim, double zdecim)
Set decimation.
void invertCoordinates(void)
QList< OPoint3D > getVertex(void)
Return the vertexes list.
QList< OPoint3D > _vertexInOut
Vertexes list.
void reinitParameters(void)
Re-initialization all parameters to zero.
double _triangulatePrecision
virtual ~ODelaunayMaker()
Destructor.
OPoint3D computeCircle(const OPoint3D &p1, const OPoint3D &p2, const OPoint3D &p3)
void addVertex(OPoint3D vertex)
Add a vertex.
The 3D point class.
Definition: 3d.h:487