Code_TYMPAN  4.4.0
Industrial site acoustic simulation
delaunay_maker.h
Go to the documentation of this file.
1 /*
2  * Copyright (C) <2012-2024> <EDF-DTG> <FRANCE>
3  * This file is part of Code_TYMPAN (R).
4  * Code_TYMPAN (R) is free software: you can redistribute it and/or modify
5  * it under the terms of the GNU General Public License as published by
6  * the Free Software Foundation, either version 3 of the License, or
7  * (at your option) any later version.
8  * Code_TYMPAN (R) is distributed in the hope that it will be useful,
9  * but WITHOUT ANY WARRANTY; without even the implied warranty of
10  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
11  * See the GNU General Public License for more details.
12  * You should have received a copy of the GNU General Public License along
13  * with Code_TYMPAN (R). If not, see <https://www.gnu.org/licenses/>.
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