Moka libraries
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros
corefine-2d-sweeping.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 //******************************************************************************
25 #ifndef COREFINE_SEGMENTS_SWEEPING_HH
26 #define COREFINE_SEGMENTS_SWEEPING_HH
27 //******************************************************************************
28 #include "sweeping-comparators.hh"
29 #include "vertex.hh"
30 #include <set>
31 //******************************************************************************
32 #define LEX_SET std::multiset<CDartVertex*, CDartLexicoCompare>
33 #define VERT_SET std::multiset<CDartVertex*, CDartVertexerticalCompare>
34 #define ANG_SET std::multiset<CDartVertex*, CDartAngularCompare>
35 #define LEX_IT LEX_SET::iterator
36 #define VERT_IT VERT_SET::iterator
37 #define ANG_IT ANG_SET::iterator
38 //******************************************************************************
39 namespace GMap3d
40 {
41  class CDart;
42  class CDartVertex;
43  class CGMapVertex;
44 
46  {
47  public:
49 
51  CCorefineSegmentsSweeping(CGMapVertex* AMap);
52 
55 
63  void corefine(CDart* ADart1, CDart* ADart2, const CVertex & ANormalVector);
64 
65  protected:
77  VERT_IT findElementInSweepingSet(VERT_SET & ASweepingSet, CDart* AElement);
78 
101  void manageEdgesIntersection(CDart* ADart1, CDart* ADart2,
102  LEX_SET & AEventSet,
103  const CDartLexicoCompare & ALexComparator,
104  VERT_SET & ASweepingSet,
105  int AExtremity1,
106  int AMesh1,
107  int ADirectVertex,
108  const CVertex & ANormalVector);
109 
110  private:
111  CGMapVertex* FMap;
112  };
113 
114 } // namespace GMap3d
115 //******************************************************************************
116 #endif // COREFINE_SEGMENTS_SWEEPING_HH
117 //******************************************************************************