gmap2.h 15.9 KB
Newer Older
Pierre Kraemer's avatar
Pierre Kraemer committed
1 2 3
/*******************************************************************************
* CGoGN: Combinatorial and Geometric modeling with Generic N-dimensional Maps  *
* version 0.1                                                                  *
4
* Copyright (C) 2009-2012, IGG Team, LSIIT, University of Strasbourg           *
Pierre Kraemer's avatar
Pierre Kraemer committed
5 6 7 8 9 10 11 12 13 14 15 16 17 18 19
*                                                                              *
* This library is free software; you can redistribute it and/or modify it      *
* under the terms of the GNU Lesser General Public License as published by the *
* Free Software Foundation; either version 2.1 of the License, or (at your     *
* option) any later version.                                                   *
*                                                                              *
* This library is distributed in the hope that it will be useful, but WITHOUT  *
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or        *
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License  *
* for more details.                                                            *
*                                                                              *
* You should have received a copy of the GNU Lesser General Public License     *
* along with this library; if not, write to the Free Software Foundation,      *
* Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301 USA.           *
*                                                                              *
20
* Web site: http://cgogn.unistra.fr/                                           *
Pierre Kraemer's avatar
Pierre Kraemer committed
21 22 23 24 25 26 27 28 29 30 31 32 33 34 35
* Contact information: cgogn@unistra.fr                                        *
*                                                                              *
*******************************************************************************/

#ifndef __GMAP2_H__
#define __GMAP2_H__

#include "Topology/gmap/gmap1.h"

namespace CGoGN
{

/**
* The class of 2-GMap
*/
Pierre Kraemer's avatar
Pierre Kraemer committed
36 37
template <typename MAP_IMPL>
class GMap2 : public GMap1<MAP_IMPL>
Pierre Kraemer's avatar
Pierre Kraemer committed
38 39
{
protected:
40 41
	void init() ;

Pierre Kraemer's avatar
Pierre Kraemer committed
42
public:
Pierre Kraemer's avatar
Pierre Kraemer committed
43 44
	typedef MAP_IMPL IMPL;
	typedef GMap1<MAP_IMPL> ParentMap;
Thomas's avatar
Thomas committed
45

Pierre Kraemer's avatar
Pierre Kraemer committed
46
	inline static unsigned int ORBIT_IN_PARENT(unsigned int o) { return o+5; }
47

Pierre Kraemer's avatar
Pierre Kraemer committed
48
	static const unsigned int IN_PARENT = 5 ;
49 50 51 52

	static const unsigned int VERTEX_OF_PARENT = VERTEX+5;
	static const unsigned int EDGE_OF_PARENT = EDGE+5;

53 54
	static const unsigned int DIMENSION = 2 ;

Pierre Kraemer's avatar
Pierre Kraemer committed
55 56
	GMap2();

57
	virtual std::string mapTypeName() const;
Pierre Kraemer's avatar
Pierre Kraemer committed
58

59
	virtual unsigned int dimension() const;
Pierre Kraemer's avatar
Pierre Kraemer committed
60

61 62
	virtual void clear(bool removeAttrib);

Pierre Kraemer's avatar
Pierre Kraemer committed
63 64
	virtual unsigned int getNbInvolutions() const;
	virtual unsigned int getNbPermutations() const;
Sylvain Thery's avatar
Sylvain Thery committed
65

Pierre Kraemer's avatar
Pierre Kraemer committed
66 67 68 69
	/*! @name Basic Topological Operators
	 * Access and Modification
	 *************************************************************************/

Sylvain Thery's avatar
Sylvain Thery committed
70
	Dart beta2(Dart d) const;
Pierre Kraemer's avatar
Pierre Kraemer committed
71 72

	template <int N>
Sylvain Thery's avatar
Sylvain Thery committed
73
	Dart beta(const Dart d) const;
Pierre Kraemer's avatar
Pierre Kraemer committed
74

Sylvain Thery's avatar
Sylvain Thery committed
75
	Dart phi2(Dart d) const;
Pierre Kraemer's avatar
Pierre Kraemer committed
76 77

	template <int N>
Sylvain Thery's avatar
Sylvain Thery committed
78
	Dart phi(const Dart d) const;
Pierre Kraemer's avatar
Pierre Kraemer committed
79

Sylvain Thery's avatar
Sylvain Thery committed
80
	Dart alpha0(Dart d) const;
Pierre Kraemer's avatar
Pierre Kraemer committed
81

Sylvain Thery's avatar
Sylvain Thery committed
82
	Dart alpha1(Dart d) const;
Pierre Kraemer's avatar
Pierre Kraemer committed
83

Sylvain Thery's avatar
Sylvain Thery committed
84
	Dart alpha_1(Dart d) const;
Pierre Kraemer's avatar
Pierre Kraemer committed
85

86
protected:
Pierre Kraemer's avatar
Pierre Kraemer committed
87 88 89 90
	void beta2sew(Dart d, Dart e);

	void beta2unsew(Dart d);

91
public:
Pierre Kraemer's avatar
Pierre Kraemer committed
92 93 94 95 96
	/*! @name Constructors and Destructors
	 *  To generate or delete cells in a 2-G-map
	 *************************************************************************/

	//@{
97 98 99 100 101 102 103
	//! Create an new face of nbEdges
	/*! @param nbEdges the number of edges
	 *  @param withBoudary create the face and its boundary (default true)
	 *  @return return a dart of the face
	 */
	virtual Dart newFace(unsigned int nbEdges, bool withBoundary = true) ;

Pierre Kraemer's avatar
Pierre Kraemer committed
104 105 106 107
	//! Delete a face erasing all its darts
	/*! @param d a dart of the face
	 */
	virtual void deleteFace(Dart d);
108

Pierre Kraemer's avatar
Pierre Kraemer committed
109 110 111 112 113
	//! Delete a connected component of the map
	/*! @param d a dart of the connected component
	 */
	virtual void deleteCC(Dart d) ;

114 115 116 117 118
	//! Fill a hole with a face
	/*! \pre Dart d is boundary marked
	 *  @param d a dart of the face to fill
	 */
	virtual void fillHole(Dart d) ;
Pierre Kraemer's avatar
Pierre Kraemer committed
119 120 121 122 123 124 125
	//@}

	/*! @name Topological Operators
	 *  Topological operations on 2-G-maps
	 *************************************************************************/

	//@{
126
	//! Split a vertex v between d and e inserting an edge after d and e
Pierre Kraemer's avatar
Pierre Kraemer committed
127 128 129 130 131 132
	/*! \pre Darts d & e MUST belong to the same oriented vertex
	 *  @param d first dart in vertex v
	 *  @param e second dart in vertex v
	 */
	virtual void splitVertex(Dart d, Dart e);

133
	//! Delete the vertex of d (works only for internal vertices)
134 135
	/*! Does not create a hole -> all the faces
	 * 	around the vertex are merged into one face
136
	 *  @param d a dart of the vertex to delete
137
	 *  @return a dart of the resulting face (NIL if the deletion has not been executed)
138
	 */
139
	virtual Dart deleteVertex(Dart d) ;
140

141
	//! Cut the edge of d by inserting a new vertex
Pierre Kraemer's avatar
Pierre Kraemer committed
142
	/*! @param d a dart of the edge to cut
143
	 *  @return a dart of the new vertex
Pierre Kraemer's avatar
Pierre Kraemer committed
144
	 */
145
	virtual Dart cutEdge(Dart d);
Pierre Kraemer's avatar
Pierre Kraemer committed
146

147
	//! Undo the cut of the edge of d
148
	/*! @param d a dart of the edge to uncut
149
	 *  @return true if the uncut has been executed, false otherwise
150
	 */
151
	virtual bool uncutEdge(Dart d);
152

Pierre Kraemer's avatar
Pierre Kraemer committed
153 154 155
	//! Collapse an edge (that is deleted) possibly merging its vertices
	/*! If delDegenerateFaces is true, the method checks that no degenerate
	 *  faces are build (faces with less than 3 edges). If it occurs the faces
156
	 *  are deleted and the adjacencies are updated (see deleteIfDegenerated).
Pierre Kraemer's avatar
Pierre Kraemer committed
157 158 159 160
	 *  \warning This may produce two distinct vertices if the edge
	 *  was the only link between two border faces
	 *  @param d a dart in the deleted edge
	 *  @param delDegenerateFaces a boolean (default to true)
161
	 *  @return a dart of the resulting vertex
Pierre Kraemer's avatar
Pierre Kraemer committed
162
	 */
163
	virtual Dart collapseEdge(Dart d, bool delDegenerateFaces = true);
Pierre Kraemer's avatar
Pierre Kraemer committed
164 165

	/**
166 167
	 * Flip the edge of d (rotation in phi1 order)
	 * WARNING : Works only for non-border edges
Pierre Kraemer's avatar
Pierre Kraemer committed
168 169 170 171 172 173
	 * @param d a dart of the edge to flip
	 * @return true if the flip has been executed, false otherwise
	 */
	virtual bool flipEdge(Dart d);

	/**
174 175
	 * Flip the edge of d (rotation in phi_1 order)
	 * WARNING : Works only for non-border edges
Pierre Kraemer's avatar
Pierre Kraemer committed
176
	 * @param d a dart of the edge to flip
177
	 * @return true if the flipBack has been executed, false otherwise
Pierre Kraemer's avatar
Pierre Kraemer committed
178 179 180
	 */
	virtual bool flipBackEdge(Dart d);

181 182 183 184 185 186 187 188 189 190 191 192 193 194
//	//! Insert an edge after a dart in the vertex orbit
//	/*! \pre Dart d and e MUST be different and belong to distinct face
//	 *  \pre Dart e must be phi2-linked with its phi_1 dart
//	 *  @param d dart of the vertex
//	 *  @param e dart of the edge
//	 */
//	virtual void insertEdgeInVertex(Dart d, Dart e);
//
//	//! Remove an edge from a vertex orbit
//	/*! \pre Dart d must be phi2 sewn
//	 *  @param d the dart of the edge to remove from the vertex
//	 */
//	virtual void removeEdgeFromVertex(Dart d);

thomas's avatar
thomas committed
195
	//! Sew two faces along an edge (pay attention to the orientation !)
196
	/*! \pre Edges of darts d & e MUST be boundary edges
Pierre Kraemer's avatar
Pierre Kraemer committed
197 198
	 *  @param d a dart of the first face
	 *  @param e a dart of the second face
199
	 *  @param withBoundary: if false, faces must have beta2 fixed points (only for construction: import/primitives)
Pierre Kraemer's avatar
Pierre Kraemer committed
200
	 */
201
	virtual void sewFaces(Dart d, Dart e, bool withBoundary = true);
Pierre Kraemer's avatar
Pierre Kraemer committed
202

203 204 205
	//! Unsew two faces
	/*! \pre Edge of dart d MUST NOT be a boundary edge
	 *  @param d a dart of a face
Pierre Kraemer's avatar
Pierre Kraemer committed
206 207 208
	 */
	virtual void unsewFaces(Dart d);

209 210 211
	//! Delete a face if and only if it has one or two edges
	/*! If the face is sewed to two distinct adjacent faces,
	 *  then those two faces are sewed
Pierre Kraemer's avatar
Pierre Kraemer committed
212 213 214 215 216 217 218 219 220 221 222 223 224
	 *  @param d a dart of the face
	 *  @return true if the collapse has been executed, false otherwise
	 */
	virtual bool collapseDegeneratedFace(Dart d);

	//! Split a face f between d and e inserting an edge between vertices d & e
	/*! \pre Darts d & e MUST belong to the same face
	 *  @param d first dart in face f
	 *  @param e second dart in face f
	 */
	virtual void splitFace(Dart d, Dart e);

	//! Merge the two faces incident to the edge of d.
225 226
	/*! Works only for non-boundary edges.
	 *  \warning Darts of the edge of d no longer exist after the call
Pierre Kraemer's avatar
Pierre Kraemer committed
227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246
	 *  @param d a dart in the first face
	 *  @return true if the merge has been executed, false otherwise
	 */
	virtual bool mergeFaces(Dart d);

	/**
	 * Extract a pair of sewed triangles and sew their adjacent faces
	 * d is a dart of the common edge of the pair of triangles
	 */
	void extractTrianglePair(Dart d) ;

	/**
	 * Insert a pair of sewed triangles in a vertex by exploding the edges of d1 and d2
	 * d1 and d2 belong to the same vertex
	 * d is a dart of the common edge of the pair of triangles
	 */
	void insertTrianglePair(Dart d, Dart v1, Dart v2) ;

	//! Merge two volumes along two faces.
	/*! Works only if the two faces have the same number of edges.
247
	 *  The faces adjacent to the two given faces are pairwise sewed
Pierre Kraemer's avatar
Pierre Kraemer committed
248 249 250 251 252 253 254 255
	 *  then the 2 faces are deleted.
	 *  If the two faces belong to different surfaces, the surfaces are merged,
	 *  else a handle is created that increases the genus of the surface.
	 *  @param d a dart of the first face
	 *  @param e a dart of the second face
	 *  @return true if the merge has been executed, false otherwise
	 */
	virtual bool mergeVolumes(Dart d, Dart e);
untereiner's avatar
untereiner committed
256 257 258 259 260

	//!
	/*!
	 *
	 */
261
	virtual void splitSurface(std::vector<Dart>& vd, bool firstSideClosed = true, bool secondSideClosed = true);
untereiner's avatar
untereiner committed
262

Pierre Kraemer's avatar
Pierre Kraemer committed
263 264 265 266 267 268
	//@}

	/*! @name Topological Queries
	 *  Return or set various topological information
	 *************************************************************************/

269
	//@{
Thomas's avatar
Thomas committed
270 271 272 273
	//! Test if dart d and e belong to the same oriented vertex
	/*! @param d a dart
	 *  @param e a dart
	 */
Sylvain Thery's avatar
Sylvain Thery committed
274
	bool sameOrientedVertex(Dart d, Dart e) const;
Thomas's avatar
Thomas committed
275

Pierre Kraemer's avatar
Pierre Kraemer committed
276 277 278 279
	//! Test if dart d and e belong to the same vertex
	/*! @param d a dart
	 *  @param e a dart
	 */
Sylvain Thery's avatar
Sylvain Thery committed
280
	bool sameVertex(Dart d, Dart e) const;
Pierre Kraemer's avatar
Pierre Kraemer committed
281

282 283 284
	/**
	 * compute the number of edges of the vertex of d
	 */
Sylvain Thery's avatar
Sylvain Thery committed
285
	unsigned int vertexDegree(Dart d) const;
286

287 288 289 290 291
	//! Check number of edges of the vertex of d with given parameter
	/*! @param d a dart
	 *	@param vd degree to compare with
	 *  @return  negative/null/positive if vertex degree is less/equal/greater than given degree
	 */
Sylvain Thery's avatar
Sylvain Thery committed
292
	int checkVertexDegree(Dart d, unsigned int vd) const;
293

294 295
	//! tell if the vertex of d is on the boundary of the map
	/*! @param d a dart
296
	 */
Sylvain Thery's avatar
Sylvain Thery committed
297
	bool isBoundaryVertex(Dart d) const;
298

299 300 301 302
	/**
	 * find the dart of vertex that belong to the boundary
	 * return NIL if the vertex is not on the boundary
	 */
Sylvain Thery's avatar
Sylvain Thery committed
303
	Dart findBoundaryEdgeOfVertex(Dart d) const;
304 305 306 307 308

	//! Test if dart d and e belong to the same edge
	/*! @param d a dart
	 *  @param e a dart
	 */
Sylvain Thery's avatar
Sylvain Thery committed
309
	bool sameEdge(Dart d, Dart e) const;
310 311 312 313

	/**
	 * tell if the edge of d is on the boundary of the map
	 */
Sylvain Thery's avatar
Sylvain Thery committed
314
	bool isBoundaryEdge(Dart d) const;
315 316 317 318 319

	//!Test if dart d and e belong to the same oriented face
	/*! @param d a dart
	 *  @param e a dart
	 */
Sylvain Thery's avatar
Sylvain Thery committed
320
	bool sameOrientedFace(Dart d, Dart e) const;
321 322 323 324 325

	//! Test if dart d and e belong to the same face
	/*! @param d a dart
	 *  @param e a dart
	 */
Sylvain Thery's avatar
Sylvain Thery committed
326
	bool sameFace(Dart d, Dart e) const;
327 328 329 330

	/**
	 * compute the number of edges of the face of d
	 */
Sylvain Thery's avatar
Sylvain Thery committed
331
	unsigned int faceDegree(Dart d) const;
332

333 334 335 336 337
	//! Check number of edges of the face of d with given parameter
	/*! @param d a dart
	 *	@param vd degree to compare with
	 *  @return  negative/null/positive if vertex degree is less/equal/greater than given degree
	 */
Sylvain Thery's avatar
Sylvain Thery committed
338
	int checkFaceDegree(Dart d, unsigned int le) const;
339

340 341 342
	/**
	 * tell if the face of d is on the boundary of the map
	 */
Sylvain Thery's avatar
Sylvain Thery committed
343
	bool isBoundaryFace(Dart d) const;
344

Thomas's avatar
Thomas committed
345 346 347 348
	//! Test if dart d and e belong to the same oriented volume
	/*! @param d a dart
	 *  @param e a dart
	 */
Sylvain Thery's avatar
Sylvain Thery committed
349
	bool sameOrientedVolume(Dart d, Dart e) const;
Thomas's avatar
Thomas committed
350 351 352 353 354

	//! Test if dart d and e belong to the same volume
	/*! @param d a dart
	 *  @param e a dart
	 */
Sylvain Thery's avatar
Sylvain Thery committed
355
	bool sameVolume(Dart d, Dart e) const;
356

357 358 359
	//! Compute the number of faces in the volume of d
	/*! @param d a dart
	 */
Sylvain Thery's avatar
Sylvain Thery committed
360
	unsigned int volumeDegree(Dart d) const;
361

362 363 364 365 366
	//! Check number of faces of the volume of d with given parameter
	/*! @param d a dart
	 *	@param vd degree to compare with
	 *  @return  negative/null/positive if volume degree is less/equal/greater than given degree
	 */
Sylvain Thery's avatar
Sylvain Thery committed
367
	int checkVolumeDegree(Dart d, unsigned int volDeg) const;
368

369
	// TODO a mettre en algo
Pierre Kraemer's avatar
Pierre Kraemer committed
370
	/**
371 372
	 * check if the mesh is triangular or not
	 * @return a boolean indicating if the mesh is triangular
Pierre Kraemer's avatar
Pierre Kraemer committed
373
	 */
Sylvain Thery's avatar
Sylvain Thery committed
374
	bool isTriangular() const;
375 376 377 378 379

	// TODO a mettre en algo
	/**
	 * Check if map is complete
	 * Should be executed after import
Pierre Kraemer's avatar
Pierre Kraemer committed
380
	 */
Sylvain Thery's avatar
Sylvain Thery committed
381
	virtual bool check() const;
Pierre Kraemer's avatar
Pierre Kraemer committed
382 383 384 385 386

	/**
	 * Check if a serie of darts is an oriented simple close path
	 */
	virtual bool checkSimpleOrientedPath(std::vector<Dart>& vd);
Pierre Kraemer's avatar
Pierre Kraemer committed
387 388 389 390 391 392

	template <unsigned int ORBIT>
	unsigned int getNbOrbits()
	{
		return MapCommon<MAP_IMPL>::template getNbOrbits<ORBIT, GMap2>();
	}
Pierre Kraemer's avatar
Pierre Kraemer committed
393 394 395 396 397 398 399 400
	//@}

	/*! @name Cell Functors
	 *  Apply functors to all darts of a cell
	 *************************************************************************/

	//@{
	/**
401 402
	* Apply a functor on each dart of an oriented vertex
	* @param d a dart of the oriented vertex
Pierre Kraemer's avatar
Pierre Kraemer committed
403 404
	* @param fonct functor obj ref
	*/
Sylvain Thery's avatar
Sylvain Thery committed
405
	bool foreach_dart_of_oriented_vertex(Dart d, FunctorType& fonct, unsigned int thread = 0) const;
Pierre Kraemer's avatar
Pierre Kraemer committed
406 407

	/**
408 409
	* Apply a functor on each dart of a vertex
	* @param d a dart of the vertex
Pierre Kraemer's avatar
Pierre Kraemer committed
410 411
	* @param fonct functor obj ref
	*/
Sylvain Thery's avatar
Sylvain Thery committed
412
	bool foreach_dart_of_vertex(Dart d, FunctorType& fonct, unsigned int thread = 0) const;
Pierre Kraemer's avatar
Pierre Kraemer committed
413

414 415 416 417 418
	/**
	* Apply a functor on each dart of an oriented edge
	* @param d a dart of the oriented edge
	* @param fonct functor obj ref
	*/
Sylvain Thery's avatar
Sylvain Thery committed
419
	bool foreach_dart_of_oriented_edge(Dart d, FunctorType& fonct, unsigned int thread = 0) const;
420

Pierre Kraemer's avatar
Pierre Kraemer committed
421 422
	/**
	* Apply a functor on each dart of an edge
423
	* @param d a dart of the oriented edge
Pierre Kraemer's avatar
Pierre Kraemer committed
424 425
	* @param fonct functor obj ref
	*/
Sylvain Thery's avatar
Sylvain Thery committed
426
	bool foreach_dart_of_edge(Dart d, FunctorType& fonct, unsigned int thread = 0) const;
Pierre Kraemer's avatar
Pierre Kraemer committed
427

428 429
	//! Apply a functor on every dart of an oriented face
	/*! @param d a dart of the oriented face
Pierre Kraemer's avatar
Pierre Kraemer committed
430 431
	 *  @param f the functor to apply
	 */
Sylvain Thery's avatar
Sylvain Thery committed
432
	bool foreach_dart_of_oriented_face(Dart d, FunctorType& fonct, unsigned int thread = 0) const;
Pierre Kraemer's avatar
Pierre Kraemer committed
433

434 435
	//! Apply a functor on every dart of a face
	/*! @param d a dart of the face
Pierre Kraemer's avatar
Pierre Kraemer committed
436 437
	 *  @param f the functor to apply
	 */
Sylvain Thery's avatar
Sylvain Thery committed
438
	bool foreach_dart_of_face(Dart d, FunctorType& fonct, unsigned int thread = 0) const;
Pierre Kraemer's avatar
Pierre Kraemer committed
439

440 441
	//! Apply a functor on every dart of an oriented convex component
	/*! @param d a dart of the oriented convex component
442 443
	 *  @param f the functor to apply
	 */
Sylvain Thery's avatar
Sylvain Thery committed
444
	bool foreach_dart_of_oriented_cc(Dart d, FunctorType& fonct, unsigned int thread = 0) const;
445

446 447
	//! Apply a functor on every dart of a convex component
	/*! @param d a dart of the convex component
448 449
	 *  @param f the functor to apply
	 */
Sylvain Thery's avatar
Sylvain Thery committed
450
	bool foreach_dart_of_cc(Dart d, FunctorType& fonct, unsigned int thread = 0) const;
451 452 453 454 455 456

	/**
	* Apply a functor on each dart of a vertex
	* @param d a dart of the vertex
	* @param fonct functor obj ref
	*/
Sylvain Thery's avatar
Sylvain Thery committed
457
	bool foreach_dart_of_vertex1(Dart d, FunctorType& fonct, unsigned int thread = 0) const;
458 459 460 461 462 463

	/**
	* Apply a functor on each dart of an edge
	* @param d a dart of the oriented edge
	* @param fonct functor obj ref
	*/
Sylvain Thery's avatar
Sylvain Thery committed
464 465
	bool foreach_dart_of_edge1(Dart d, FunctorType& fonct, unsigned int thread = 0) const;

466 467 468 469 470 471 472
	//@}

	/*! @name Close map after import or creation
	 *  These functions must be used with care, generally only by import algorithms
	 *************************************************************************/

	//@{
473 474 475 476 477
	/**
	 * create a face of map1 marked as boundary
	 */
	Dart newBoundaryCycle(unsigned int nbE);

478 479 480 481 482 483 484 485 486 487 488 489
	//! Close a topological hole (a sequence of connected fixed point of beta2). DO NOT USE, only for import/creation algorithm
	/*! \pre dart d MUST be fixed point of beta2 relation
	 *  Add a face to the map that closes the hole.
	 *  @param d a dart of the hole (with beta2(d)==d)
	 *  @param forboundary tag the created face as boundary (default is true)
	 *  @return the degree of the created face
	 */
	virtual unsigned int closeHole(Dart d, bool forboundary = true);

	//! Close the map removing topological holes: DO NOT USE, only for import/creation algorithm
	/*! Add faces to the map that close every existing hole.
	 *  These faces are marked as boundary.
490
	 *  @return the number of closed holes
491
	 */
492
	unsigned int closeMap();
493
	//@}
494 495 496 497 498 499 500 501 502 503 504

	/*! @name Compute dual
	 * These functions compute the dual mesh
	 *************************************************************************/

	//@{
	//! Dual mesh computation
	/*!
	 */
	void computeDual();
	//@}
Pierre Kraemer's avatar
Pierre Kraemer committed
505 506 507 508 509 510 511
};

} // namespace CGoGN

#include "Topology/gmap/gmap2.hpp"

#endif