Commit 310ff12b authored by untereiner's avatar untereiner

map2 and map3 dual computation

parent b810b4d6
......@@ -80,6 +80,14 @@ target_link_libraries( show_traversors
add_executable( tuto_subdivision tuto_subdivision.cpp)
target_link_libraries( tuto_subdivision
${CGoGN_LIBS_D} ${CGoGN_EXT_LIBS} )
add_executable( tuto_dual2 tuto_dual2.cpp)
target_link_libraries( tuto_dual2
${CGoGN_LIBS_D} ${CGoGN_EXT_LIBS} )
add_executable( tuto_dual3 tuto_dual3.cpp)
target_link_libraries( tuto_dual3
${CGoGN_LIBS_D} ${CGoGN_EXT_LIBS} )
#QT4_WRAP_CPP(tp_master_moc tp_master.h)
#add_executable( tp_master tp_master.cpp ${tp_master_moc})
......
/*******************************************************************************
* CGoGN: Combinatorial and Geometric modeling with Generic N-dimensional Maps *
* version 0.1 *
* Copyright (C) 2009-2012, IGG Team, LSIIT, University of Strasbourg *
* *
* 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. *
* *
* Web site: http://cgogn.unistra.fr/ *
* Contact information: cgogn@unistra.fr *
* *
*******************************************************************************/
#include <iostream>
#include "Topology/generic/parameters.h"
#include "Topology/map/embeddedMap2.h"
#include "Geometry/vector_gen.h"
#include "Algo/Import/import.h"
#include "Algo/Export/export.h"
#include <typeinfo>
#include "Algo/Modelisation/subdivision.h"
using namespace CGoGN ;
/**
* Struct that contains some informations about the types of the manipulated objects
* Mainly here to be used by the algorithms that are parameterized by it
*/
struct PFP: public PFP_STANDARD
{
// definition of the map
typedef EmbeddedMap2 MAP;
};
int main(int argc, char **argv)
{
if(argc != 2)
{
CGoGNout << "Usage : " << argv[0] << " filename" << CGoGNendl;
return 0;
}
std::string filename(argv[1]);
// declaration of the map
PFP::MAP myMap;
std::vector<std::string> attrNames ;
Algo::Import::importMesh<PFP>(myMap, argv[1], attrNames);
// get a handler to the 3D vector attribute created by the import
VertexAttribute<PFP::VEC3> position = myMap.getAttribute<PFP::VEC3, VERTEX>(attrNames[0]);
FaceAttribute<PFP::VEC3> positionF = myMap.getAttribute<PFP::VEC3, FACE>("position") ;
if(!positionF.isValid())
positionF = myMap.addAttribute<PFP::VEC3, FACE>("position") ;
Algo::Geometry::computeCentroidFaces<PFP>(myMap, position, positionF) ;
myMap.computeDual();
position = positionF ;
myMap.check();
//turn_to<VertexAttribute<PFP::VEC3>, FaceAttribute<PFP::VEC3> >(&positionF);
//turn_to<FaceAttribute<PFP::VEC3>, VertexAttribute<PFP::VEC3> >(position);
//const std::type_info &t1 = typeid(&positionF);
//std::cout << "type name : " << t1.name() << std::endl;
Algo::Export::exportOFF<PFP>(myMap, position, "result.off");
std::cout << "Exported" << std::endl;
return 0;
}
/*******************************************************************************
* CGoGN: Combinatorial and Geometric modeling with Generic N-dimensional Maps *
* version 0.1 *
* Copyright (C) 2009-2012, IGG Team, LSIIT, University of Strasbourg *
* *
* 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. *
* *
* Web site: http://cgogn.unistra.fr/ *
* Contact information: cgogn@unistra.fr *
* *
*******************************************************************************/
#include <iostream>
#include "Topology/generic/parameters.h"
#include "Topology/map/embeddedMap3.h"
#include "Geometry/vector_gen.h"
#include "Algo/Import/import.h"
#include "Algo/Export/export.h"
#include <typeinfo>
#include "Algo/Modelisation/subdivision3.h"
using namespace CGoGN ;
/**
* Struct that contains some informations about the types of the manipulated objects
* Mainly here to be used by the algorithms that are parameterized by it
*/
struct PFP: public PFP_STANDARD
{
// definition of the map
typedef EmbeddedMap3 MAP;
};
int main(int argc, char **argv)
{
if(argc != 2)
{
CGoGNout << "Usage : " << argv[0] << " filename" << CGoGNendl;
return 0;
}
std::string filename(argv[1]);
// declaration of the map
PFP::MAP myMap;
std::vector<std::string> attrNames ;
Algo::Import::importMeshV<PFP>(myMap, argv[1], attrNames, Algo::Import::ImportVolumique::NODE);
// get a handler to the 3D vector attribute created by the import
VertexAttribute<PFP::VEC3> position = myMap.getAttribute<PFP::VEC3, VERTEX>(attrNames[0]);
VolumeAttribute<PFP::VEC3> positionV = myMap.getAttribute<PFP::VEC3, VOLUME>("position") ;
if(!positionV.isValid())
positionV = myMap.addAttribute<PFP::VEC3, VOLUME>("position") ;
Algo::Geometry::computeCentroidVolumes<PFP>(myMap, position, positionV) ;
Dart dsave = NIL;
for(Dart d = myMap.begin() ; d != myMap.end() ; myMap.next(d))
{
if(myMap.isBoundaryMarked(d))
{
dsave = d;
break;
}
}
if(dsave != NIL)
positionV[dsave] = PFP::VEC3(0.0);
//Algo::Modelisation::computeDual3<PFP>(myMap,allDarts) ;
myMap.computeDual();
position = positionV ;
//turn_to<VertexAttribute<PFP::VEC3>, FaceAttribute<PFP::VEC3> >(&positionF);
//turn_to<FaceAttribute<PFP::VEC3>, VertexAttribute<PFP::VEC3> >(position);
//const std::type_info &t1 = typeid(&positionF);
//std::cout << "type name : " << t1.name() << std::endl;
//Algo::Export::exportOFF<PFP>(myMap, position, "result.off");
myMap.saveMapBin("result.map");
std::cout << "Exported" << std::endl;
return 0;
}
......@@ -105,18 +105,21 @@ void LoopSubdivision(typename PFP::MAP& map, VertexAttribute<typename PFP::VEC3>
template <typename PFP, typename EMBV, typename EMB>
void TwoNPlusOneSubdivision(typename PFP::MAP& map, EMBV& attributs, const FunctorSelect& selected = allDarts) ;
/**
* Reverse the orientation of the map
*/
template <typename PFP>
void reverseOrientation(typename PFP::MAP& map) ;
///**
// * Reverse the orientation of the map
// */
//template <typename PFP>
//void reverseOrientation(typename PFP::MAP& map) ;
//
///**
// * Dual mesh computation
// */
//template <typename PFP>
//void computeDual(typename PFP::MAP& map, const FunctorSelect& selected = allDarts) ;
//
//template <typename PFP>
//void computeDualV2(typename PFP::MAP& map, const FunctorSelect& selected = allDarts) ;
//
///**
// * Sqrt(3) subdivision scheme
// */
......
......@@ -515,24 +515,24 @@ void TwoNPlusOneSubdivision(typename PFP::MAP& map, EMBV& attributs, const Funct
}
}
template <typename PFP>
void reverseOrientation(typename PFP::MAP& map)
{
DartAttribute<unsigned int> emb0(&map, map.template getEmbeddingAttributeVector<VERTEX>()) ;
if(emb0.isValid())
{
DartAttribute<unsigned int> new_emb0 = map.template addAttribute<unsigned int, DART>("new_EMB_0") ;
for(Dart d = map.begin(); d != map.end(); map.next(d))
new_emb0[d] = emb0[map.phi1(d)] ;
map.template swapAttributes<unsigned int>(emb0, new_emb0) ;
map.removeAttribute(new_emb0) ;
}
DartAttribute<Dart> phi1 = map.template getAttribute<Dart, DART>("phi1") ;
DartAttribute<Dart> phi_1 = map.template getAttribute<Dart, DART>("phi_1") ;
map.template swapAttributes<Dart>(phi1, phi_1) ;
}
//template <typename PFP>
//void reverseOrientation(typename PFP::MAP& map)
//{
// DartAttribute<unsigned int> emb0(&map, map.template getEmbeddingAttributeVector<VERTEX>()) ;
// if(emb0.isValid())
// {
// DartAttribute<unsigned int> new_emb0 = map.template addAttribute<unsigned int, DART>("new_EMB_0") ;
// for(Dart d = map.begin(); d != map.end(); map.next(d))
// new_emb0[d] = emb0[map.phi1(d)] ;
// map.template swapAttributes<unsigned int>(emb0, new_emb0) ;
// map.removeAttribute(new_emb0) ;
// }
//
// DartAttribute<Dart> phi1 = map.template getAttribute<Dart, DART>("phi1") ;
// DartAttribute<Dart> phi_1 = map.template getAttribute<Dart, DART>("phi_1") ;
// map.template swapAttributes<Dart>(phi1, phi_1) ;
//}
//
//template <typename PFP>
//void computeDual(typename PFP::MAP& map, const FunctorSelect& selected)
//{
......@@ -543,7 +543,44 @@ void reverseOrientation(typename PFP::MAP& map)
//
// for(Dart d = map.begin(); d != map.end(); map.next(d))
// {
// Dart dd = map.phi12(d) ;
// Dart dd = map.phi1(map.phi2(d));
//
// new_phi1[d] = dd ;
// new_phi_1[dd] = d ;
// }
//
// map.template swapAttributes<Dart>(phi1, new_phi1) ;
// map.template swapAttributes<Dart>(phi_1, new_phi_1) ;
//
// map.removeAttribute(new_phi1) ;
// map.removeAttribute(new_phi_1) ;
//
// map.swapEmbeddingContainers(VERTEX, FACE) ;
//
// reverseOrientation<PFP>(map) ;
//
//// //boundary management
//// for(Dart d = map.begin(); d != map.end(); map.next(d))
//// {
//// if(map.isBoundaryMarked(d))
//// {
//// map.template boundaryMarkOrbit<FACE>(map.deleteVertex(map.phi2(d))); //map.deleteCycle();
//// }
//// }
//}
//
//template <typename PFP>
//void computeDualV2(typename PFP::MAP& map, const FunctorSelect& selected)
//{
// DartAttribute<Dart> phi1 = map.template getAttribute<Dart, DART>("phi1") ;
// DartAttribute<Dart> phi_1 = map.template getAttribute<Dart, DART>("phi_1") ;
// DartAttribute<Dart> new_phi1 = map.template addAttribute<Dart, DART>("new_phi1") ;
// DartAttribute<Dart> new_phi_1 = map.template addAttribute<Dart, DART>("new_phi_1") ;
//
// for(Dart d = map.begin(); d != map.end(); map.next(d))
// {
// Dart dd = map.phi1(map.phi2(d));
//
// new_phi1[d] = dd ;
// new_phi_1[dd] = d ;
// }
......@@ -554,11 +591,40 @@ void reverseOrientation(typename PFP::MAP& map)
// map.removeAttribute(new_phi1) ;
// map.removeAttribute(new_phi_1) ;
//
// //boundary management
// for(Dart d = map.begin(); d != map.end(); map.next(d))
// {
// if(map.isBoundaryMarked(d))
// {
// Dart d1 = map.phi1(d);
// Dart dd = map.phi_1(map.phi2(d));
//
// //marquer le brin d1 et le bin dd
//
// phi1[dd] = d1 ;
// phi_1[d1] = dd ;
//
// phi1[d] = map.phi2(d);
// phi_1[map.phi2(d)] = d;
// }
// }
//
// map.swapEmbeddingContainers(VERTEX, FACE) ;
//
// reverseOrientation<PFP>(map) ;
//
// for(Dart d = map.begin(); d != map.end(); map.next(d))
// {
// if(map.isBoundaryMarked(d))
// {
// map.deleteCycle(map.phi2(d));
// }
// }
//
// //transformer le marker des brins d1 et dd en boundaryMarker
//}
inline double sqrt3_K(unsigned int n)
{
switch(n)
......
......@@ -99,6 +99,12 @@ void catmullClarkVol(typename PFP::MAP& map, VertexAttribute<typename PFP::VEC3>
template <typename PFP>
void sqrt3Vol(typename PFP::MAP& map, VertexAttribute<typename PFP::VEC3>& position, const FunctorSelect& selected = allDarts);
///**
// * Dual mesh computation
// */
//template <typename PFP>
//void computeDual3(typename PFP::MAP& map, const FunctorSelect& selected = allDarts) ;
} // namespace Modelisation
} // namespace Algo
......
......@@ -713,6 +713,88 @@ void sqrt3Vol(typename PFP::MAP& map, VertexAttribute<typename PFP::VEC3>& posit
}
}
//template <typename PFP>
//void reverseOrientation3(typename PFP::MAP& map)
//{
// DartAttribute<unsigned int> emb0(&map, map.template getEmbeddingAttributeVector<VERTEX>()) ;
// if(emb0.isValid())
// {
// DartAttribute<unsigned int> new_emb0 = map.template addAttribute<unsigned int, DART>("new_EMB_0") ;
// for(Dart d = map.begin(); d != map.end(); map.next(d))
// new_emb0[d] = emb0[map.phi1(d)] ;
// map.template swapAttributes<unsigned int>(emb0, new_emb0) ;
// map.removeAttribute(new_emb0) ;
// }
//
// DartAttribute<Dart> phi2 = map.template getAttribute<Dart, DART>("phi2") ;
// DartAttribute<Dart> phi3 = map.template getAttribute<Dart, DART>("phi3") ;
// map.template swapAttributes<Dart>(phi2, phi3) ;
//}
//
//template <typename PFP>
//void computeDual3(typename PFP::MAP& map, const FunctorSelect& selected)
//{
// DartAttribute<Dart> phi1 = map.template getAttribute<Dart, DART>("phi1") ;
// DartAttribute<Dart> phi_1 = map.template getAttribute<Dart, DART>("phi_1") ;
// DartAttribute<Dart> new_phi1 = map.template addAttribute<Dart, DART>("new_phi1") ;
// DartAttribute<Dart> new_phi_1 = map.template addAttribute<Dart, DART>("new_phi_1") ;
//
// DartAttribute<Dart> phi2 = map.template getAttribute<Dart, DART>("phi2") ;
// DartAttribute<Dart> new_phi2 = map.template addAttribute<Dart, DART>("new_phi2") ;
//
// for(Dart d = map.begin(); d != map.end(); map.next(d))
// {
// Dart dd = map.phi2(map.phi3(d)) ;
// new_phi1[d] = dd ;
// new_phi_1[dd] = d ;
//
// Dart ddd = map.phi1(map.phi3(d));
// new_phi2[d] = ddd;
// new_phi2[ddd] = d;
// }
//
// map.template swapAttributes<Dart>(phi1, new_phi1) ;
// map.template swapAttributes<Dart>(phi_1, new_phi_1) ;
// map.template swapAttributes<Dart>(phi2, new_phi2) ;
//
// map.removeAttribute(new_phi1) ;
// map.removeAttribute(new_phi_1) ;
// map.removeAttribute(new_phi2) ;
//
// map.swapEmbeddingContainers(VERTEX, VOLUME) ;
//
// for(Dart d = map.begin(); d != map.end(); map.next(d))
// {
// if(map.isBoundaryMarked(d))
// {
// map.deleteVolume(d);
//// Traversor3VW<typename PFP::MAP> tWV(map, d);
//// std::vector<Dart> v;
//// for(Dart ditW = tWV.begin() ; ditW != tWV.end() ; ditW = tWV.next())
//// {
//// v.push_back(ditW);
//// }
////
//// for(std::vector<Dart>::iterator it = v.begin() ; it != v.end() ; ++it)
//// {
//// map.deleteVolume(*it);
//// }
//
// }
// }
//
//// reverseOrientation3<PFP>(map) ;
//
// //boundary management
//// for(Dart d = map.begin(); d != map.end(); map.next(d))
//// {
//// if(map.isBoundaryMarked(d))
//// {
//// map.deleteVolume(d); //map.template boundaryMarkOrbit<VOLUME>(
//// }
//// }
//}
} //namespace Modelisation
......
......@@ -93,19 +93,6 @@ public:
*/
AttributeHandler() ;
template <unsigned int ORBIT2>
AttributeHandler(const AttributeHandler<T, ORBIT2>& h) : AttributeHandlerGen(h.m_map, h.valid)
{
m_attrib = h.m_attrib;
if(m_attrib->getOrbit() == ORBIT2)
{
if(valid)
registerInMap() ;
}
else
valid = false;
}
/**
* Constructor
* @param m the map which belong attribute
......@@ -119,12 +106,27 @@ public:
*/
AttributeHandler(const AttributeHandler<T, ORBIT>& ta) ;
/**
* Transmute Constructor
* Construct an attribute of Orbit from Orbit2
* @param h the table attribute
*/
template <unsigned int ORBIT2>
AttributeHandler(const AttributeHandler<T, ORBIT2>& h) ;
/**
* affectation operator
* @param ta the table attribute to affect to this
*/
AttributeHandler<T, ORBIT>& operator=(const AttributeHandler<T, ORBIT>& ta) ;
/**
* transmuted affectation operator
* @param ta the table attribute to affect to this
*/
template <unsigned int ORBIT2>
AttributeHandler<T, ORBIT>& operator=(const AttributeHandler<T, ORBIT2>& ta) ;
/**
* Destructor (empty & virtual)
*/
......@@ -233,6 +235,9 @@ public:
VertexAttribute(const AttributeHandler<T, VERTEX>& ah) : AttributeHandler<T, VERTEX>(ah) {}
VertexAttribute(GenericMap* m, AttributeMultiVector<T>* amv) : AttributeHandler<T, VERTEX>(m,amv) {}
VertexAttribute<T>& operator=(const AttributeHandler<T, VERTEX>& ah) { this->AttributeHandler<T, VERTEX>::operator=(ah); return *this; }
VertexAttribute<T>& operator=(const AttributeHandler<T, EDGE>& ah) { this->AttributeHandler<T,VERTEX>::operator=(ah); return *this; }
VertexAttribute<T>& operator=(const AttributeHandler<T, FACE>& ah) { this->AttributeHandler<T,VERTEX>::operator=(ah); return *this; }
VertexAttribute<T>& operator=(const AttributeHandler<T, VOLUME>& ah) { this->AttributeHandler<T,VERTEX>::operator=(ah); return *this; }
};
/**
......@@ -259,6 +264,7 @@ public:
FaceAttribute(const AttributeHandler<T, FACE>& ah) : AttributeHandler<T, FACE>(ah) {}
FaceAttribute(GenericMap* m, AttributeMultiVector<T>* amv) : AttributeHandler<T, FACE>(m,amv) {}
FaceAttribute<T>& operator=(const AttributeHandler<T, FACE>& ah) { this->AttributeHandler<T, FACE>::operator=(ah); return *this; }
FaceAttribute<T>& operator=(const AttributeHandler<T, VERTEX>& ah) { this->AttributeHandler<T,FACE>::operator=(ah); return *this; }
};
/**
......@@ -272,8 +278,20 @@ public:
VolumeAttribute(const AttributeHandler<T, VOLUME>& ah) : AttributeHandler<T, VOLUME>(ah) {}
VolumeAttribute(GenericMap* m, AttributeMultiVector<T>* amv) : AttributeHandler<T, VOLUME>(m,amv) {}
VolumeAttribute<T>& operator=(const AttributeHandler<T, VOLUME>& ah) { this->AttributeHandler<T, VOLUME>::operator=(ah); return *this; }
VolumeAttribute<T>& operator=(const AttributeHandler<T, VERTEX>& ah) { this->AttributeHandler<T, VOLUME>::operator=(ah); return *this; }
};
// turn_to<b>(A*</b> obj) changes class of the object
// that means it just replaces VTBL of the object by VTBL of another class.
// NOTE: these two classes has to be ABI compatible!
template <typename TO_T, typename FROM_T>
inline void turn_to(FROM_T* p)
{
assert( sizeof(FROM_T) == sizeof(TO_T));
::new(p) TO_T(); // use of placement new
}
} // namespace CGoGN
#include "Topology/generic/attributeHandler.hpp"
......
......@@ -80,6 +80,23 @@ AttributeHandler<T, ORBIT>::AttributeHandler(const AttributeHandler<T, ORBIT>& t
registerInMap() ;
}
//template <typename T, unsigned int ORBIT>
//template <unsigned int ORBIT2>
template <typename T, unsigned int ORBIT>
template <unsigned int ORBIT2>
AttributeHandler<T, ORBIT>::AttributeHandler(const AttributeHandler<T, ORBIT2>& h) :
AttributeHandlerGen(h.m_map, h.valid)
{
m_attrib = h.m_attrib;
if(m_attrib->getOrbit() == ORBIT2)
{
if(valid)
registerInMap() ;
}
else
valid = false;
}
template <typename T, unsigned int ORBIT>
inline AttributeHandler<T, ORBIT>& AttributeHandler<T, ORBIT>::operator=(const AttributeHandler<T, ORBIT>& ta)
{
......@@ -93,6 +110,21 @@ inline AttributeHandler<T, ORBIT>& AttributeHandler<T, ORBIT>::operator=(const A
return *this ;
}
template <typename T, unsigned int ORBIT>
template <unsigned int ORBIT2>
inline AttributeHandler<T, ORBIT>& AttributeHandler<T, ORBIT>::operator=(const AttributeHandler<T, ORBIT2>& ta)
{
if(valid)
unregisterFromMap() ;
m_map = ta.map() ;
m_attrib = ta.getDataVector() ;
valid = ta.isValid() ;
if(valid)
registerInMap() ;
return *this ;
}
template <typename T, unsigned int ORBIT>
AttributeHandler<T, ORBIT>::~AttributeHandler()
{
......
......@@ -506,10 +506,10 @@ public:
AttributeMultiVector<unsigned int>* getMRLevelAttributeVector();
// /**
// * swap two attribute containers
// */
// void swapEmbeddingContainers(unsigned int orbit1, unsigned int orbit2) ;
/**
* swap two attribute containers
*/
void swapEmbeddingContainers(unsigned int orbit1, unsigned int orbit2) ;
/**
* static function for type registration
......
......@@ -465,6 +465,34 @@ public:
*/
unsigned int closeMap();
//@}
/*! @name Compute dual
* These functions compute the dual mesh
*************************************************************************/
//@{
//! Reverse the orientation of the map
/*!
*/
void reverseOrientation();
//! Dual mesh computation (open or closed)
/*! Crop the infinite faces of open meshes
*/
void computeDual();
//! Dual mesh computation (open mesh)
/*! Fit the infinite faces vertices to the middle of the old boundary edges
*/
void computeDualBorderConstraint();
//! Dual mesh computation (open mesh)
/*! Fit the infinite faces vertices to the middle of the old boundary edges AND
* fit the middle of the new boundary edges to the old boundary vertices
*/
//void computeDualBorderConstraintWithOldVertices();
//@}
};
} // namespace CGoGN
......
......@@ -434,6 +434,22 @@ public:
*/
unsigned int closeMap();
//@}
/*! @name Compute dual
* These functions compute the dual mesh
*************************************************************************/
//@{
//! Reverse the orientation of the map
/*!
*/
void reverseOrientation();
//! Dual mesh computation
/*!
*/
void computeDual();
//@}
};
} // namespace CGoGN
......
......@@ -337,36 +337,39 @@ void GenericMap::duplicateDarts(unsigned int level)
* ATTRIBUTES MANAGEMENT *
****************************************/
//void GenericMap::swapEmbeddingContainers(unsigned int orbit1, unsigned int orbit2)
//{
// assert(orbit1 != orbit2 || !"Cannot swap a container with itself") ;
// assert((orbit1 != DART && orbit2 != DART) || !"Cannot swap the darts container") ;
//
// m_attribs[orbit1].swap(m_attribs[orbit2]) ;
// m_attribs[orbit1].setOrbit(orbit1) ; // to update the orbit information
// m_attribs[orbit2].setOrbit(orbit2) ; // in the contained AttributeMultiVectors
//
// m_embeddings[orbit1]->swap(m_embeddings[orbit2]) ;
//
// for(unsigned int t = 0; t < m_nbThreads; ++t)
// {
// AttributeMultiVector<Mark>* m = m_markTables[orbit1][t] ;
// m_markTables[orbit1][t] = m_markTables[orbit2][t] ;
// m_markTables[orbit2][t] = m ;
//
// MarkSet ms = m_marksets[orbit1][t] ;
// m_marksets[orbit1][t] = m_marksets[orbit2][t] ;
// m_marksets[orbit2][t] = ms ;
// }
//
// for(std::vector<CellMarkerGen*>::iterator it = cellMarkers.begin(); it != cellMarkers.end(); ++it)
// {
// if((*it)->m_cell == orbit1)
// (*it)->m_cell = orbit2 ;
// else if((*it)->m_cell == orbit2)
// (*it)->m_cell = orbit1 ;
// }
//}
void GenericMap::swapEmbeddingContainers(unsigned int orbit1, unsigned int orbit2)
{