Moka libraries
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros
corefine-2d-propagation.hh
Go to the documentation of this file.
1 /*
2  * lib-corefinement : Opérations de corafinement.
3  * Copyright (C) 2004, Moka Team, Université de Poitiers, Laboratoire SIC
4  * http://www.sic.sp2mi.univ-poitiers.fr/
5  * Copyright (C) 2009, Guillaume Damiand, CNRS, LIRIS,
6  * guillaume.damiand@liris.cnrs.fr, http://liris.cnrs.fr/
7  *
8  * This file is part of lib-corefinement
9  *
10  * This program is free software: you can redistribute it and/or modify
11  * it under the terms of the GNU Lesser General Public License as published by
12  * the Free Software Foundation, either version 3 of the License, or
13  * (at your option) any later version.
14  *
15  * This program is distributed in the hope that it will be useful,
16  * but WITHOUT ANY WARRANTY; without even the implied warranty of
17  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
18  * GNU Lesser General Public License for more details.
19  *
20  * You should have received a copy of the GNU Lesser General Public License
21  * along with this program. If not, see <http://www.gnu.org/licenses/>.
22  */
23 
24 #ifndef COREFINE_2D_PROPAGATION_HH
25 #define COREFINE_2D_PROPAGATION_HH
26 
27 #include "inline-macro.hh"
28 #include "g-map-vertex.hh"
29 #include "corefine.hh"
30 #include "corefine-2d-tools.hh"
31 #include "plane.hh"
32 #include "edge-intersection.hh"
33 #include "time.hh"
34 
35 namespace GMap3d
36 {
37 
39  {
40  public:
41 
42  CCorefine2dPropagation(CGMapVertex * AMap,
43  const CPlane & APlane = CPlane(OZ, ORIGIN),
44  bool ACalculateOrientation = true,
45  TCoordinate AEpsilon = 1E-4, int AVertexDI = -1);
46  virtual ~CCorefine2dPropagation();
47 
48  virtual int corefine(CDart *& AMesh1, CDart *& AMesh2,
49  std::bitset<NB_MARKS> ACopyMarks = 0);
50 
51  const CTime & getInitialisationTime() const;
52  const CTime & getOrientationTime() const;
53  const CTime & getLocalizationTime() const;
54  const CTime & getPropagationTime() const;
55  const CTime & getAssemblyTime() const;
56  const CTime & getCleaningTime() const;
57  const CTime & getDoubleEdgesCleaningTime() const;
58 
59  protected:
60 
61  virtual void initMesh(CDart * AMesh);
62  virtual void cleanMesh(CDart * AMesh);
63 
64  virtual CVertex * getVertex(CDart * ADart);
65  virtual void modifyVertex(CDart * ADart, const CVertex & AVertex);
66 
67  virtual CDart * splitEdge(CDart * AEdge, const CVertex & AVertex);
68 
69  virtual void weldVertices(CDart * AVertex1, CDart * AVertex2);
70 
71  virtual void weldMultipleVertices(CDart * AVertex1, CDart * AVertex2);
72 
73  virtual void applyModifications(CDart * AMesh);
74 
75  protected:
76 
77  CPlane FPlane;
78  TProjection FBestProj;
79 
81 
82  int FVertexDI;
83  int FAlpha1DI;
84 
87 
89 
97  };
98 
99 } // namespace GMap3d
100 
101 #include INCLUDE_INLINE("corefine-2d-propagation.icc")
102 
103 #endif