Commit 12e07242 authored by untereiner's avatar untereiner

Merge branch 'develop' of cgogn:~kraemer/CGoGN into develop

parents fc9bfe3a 950f5e11
......@@ -115,11 +115,12 @@ typename V_ATT::DATA_TYPE vertexBorderNormal(typename PFP::MAP& map, Vertex v, c
typedef typename V_ATT::DATA_TYPE VEC3 ;
VEC3 N(0) ;
std::vector<Dart> faces;
CellMarker<typename PFP::MAP, FACE> f(map);
faces.reserve(16);
map.foreach_dart_of_vertex(v, [&] (Dart d) { faces.push_back(d); });
FunctorStore fs(faces);
map.foreach_dart_of_vertex(v, fs);
CellMarker<typename PFP::MAP, FACE> f(map);
for(std::vector<Dart>::iterator it = faces.begin() ; it != faces.end() ; ++it)
{
......
......@@ -379,24 +379,23 @@ public:
virtual void next(Dart& d) const ;
virtual bool foreach_dart_of_vertex(Dart d, FunctorType& f, unsigned int thread = 0) const ;
void foreach_dart_of_vertex(Dart d, std::function<void (Dart)> f, unsigned int thread = 0) const ;
virtual bool foreach_dart_of_edge(Dart d, FunctorType& f, unsigned int thread = 0) const ;
void foreach_dart_of_edge(Dart d, std::function<void (Dart)> f, unsigned int thread = 0) const ;
bool foreach_dart_of_oriented_face(Dart d, FunctorType& f, unsigned int thread = 0) const;
virtual bool foreach_dart_of_face(Dart d, FunctorType& f, unsigned int thread = 0) const ;
void foreach_dart_of_oriented_face(Dart d, std::function<void (Dart)> f, unsigned int thread = 0) const;
void foreach_dart_of_face(Dart d, std::function<void (Dart)> f, unsigned int thread = 0) const ;
bool foreach_dart_of_oriented_volume(Dart d, FunctorType& f, unsigned int thread = 0) const;
virtual bool foreach_dart_of_volume(Dart d, FunctorType& f, unsigned int thread = 0) const ;
void foreach_dart_of_oriented_volume(Dart d, std::function<void (Dart)> f, unsigned int thread = 0) const;
void foreach_dart_of_volume(Dart d, std::function<void (Dart)> f, unsigned int thread = 0) const ;
virtual bool foreach_dart_of_cc(Dart d, FunctorType& f, unsigned int thread = 0) const ;
void foreach_dart_of_cc(Dart d, std::function<void (Dart)> f, unsigned int thread = 0) const ;
void foreach_dart_of_vertex2(Dart d, std::function<void (Dart)> f, unsigned int thread = 0) const;
virtual bool foreach_dart_of_vertex2(Dart d, FunctorType& f, unsigned int thread = 0) const;
void foreach_dart_of_edge2(Dart d, std::function<void (Dart)> f, unsigned int thread = 0) const;
virtual bool foreach_dart_of_edge2(Dart d, FunctorType& f, unsigned int thread = 0) const;
virtual bool foreach_dart_of_face2(Dart d, FunctorType& f, unsigned int thread = 0) const;
void foreach_dart_of_face2(Dart d, std::function<void (Dart)> f, unsigned int thread = 0) const;
//@}
template <unsigned int ORBIT>
......
......@@ -224,17 +224,16 @@ inline void ImplicitHierarchicalMap3::next(Dart& d) const
} while(d != Map3::end() && m_dartLevel[d] > m_curLevel) ;
}
inline bool ImplicitHierarchicalMap3::foreach_dart_of_vertex(Dart d, FunctorType& f, unsigned int thread) const
inline void ImplicitHierarchicalMap3::foreach_dart_of_vertex(Dart d, std::function<void (Dart)> f, unsigned int thread) const
{
DartMarkerStore<Map3> mv(*this, thread); // Lock a marker
bool found = false; // Last functor return value
std::vector<Dart> darts; // Darts that are traversed
darts.reserve(256);
darts.push_back(d); // Start with the dart d
mv.mark(d);
for(unsigned int i = 0; !found && i < darts.size(); ++i)
for(unsigned int i = 0; i < darts.size(); ++i)
{
// add phi21 and phi23 successor if they are not marked yet
Dart d2 = phi2(darts[i]);
......@@ -252,126 +251,110 @@ inline bool ImplicitHierarchicalMap3::foreach_dart_of_vertex(Dart d, FunctorType
mv.mark(d23);
}
found = f(darts[i]);
f(darts[i]);
}
return found;
}
inline bool ImplicitHierarchicalMap3::foreach_dart_of_edge(Dart d, FunctorType& f, unsigned int thread) const
inline void ImplicitHierarchicalMap3::foreach_dart_of_edge(Dart d, std::function<void (Dart)> f, unsigned int thread) const
{
Dart dNext = d;
do {
if (foreach_dart_of_edge2(dNext, f, thread))
return true;
foreach_dart_of_edge2(dNext, f, thread);
dNext = alpha2(dNext);
} while (dNext != d);
return false;
}
inline bool ImplicitHierarchicalMap3::foreach_dart_of_oriented_face(Dart d, FunctorType& f, unsigned int /*thread*/) const
inline void ImplicitHierarchicalMap3::foreach_dart_of_oriented_face(Dart d, std::function<void (Dart)> f, unsigned int /*thread*/) const
{
Dart dNext = d ;
do
{
if (f(dNext))
return true ;
f(dNext);
dNext = phi1(dNext) ;
} while (dNext != d) ;
return false ;
}
inline bool ImplicitHierarchicalMap3::foreach_dart_of_face(Dart d, FunctorType& f, unsigned int thread) const
inline void ImplicitHierarchicalMap3::foreach_dart_of_face(Dart d, std::function<void (Dart)> f, unsigned int thread) const
{
return foreach_dart_of_oriented_face(d, f, thread) || foreach_dart_of_oriented_face(phi3(d), f, thread);
foreach_dart_of_oriented_face(d, f, thread);
foreach_dart_of_oriented_face(phi3(d), f, thread);
}
inline bool ImplicitHierarchicalMap3::foreach_dart_of_oriented_volume(Dart d, FunctorType& f, unsigned int thread) const
inline void ImplicitHierarchicalMap3::foreach_dart_of_oriented_volume(Dart d, std::function<void (Dart)> f, unsigned int thread) const
{
DartMarkerStore<Map3> mark(*this, thread); // Lock a marker
bool found = false; // Last functor return value
std::vector<Dart> visitedFaces; // Faces that are traversed
visitedFaces.reserve(1024) ;
visitedFaces.push_back(d); // Start with the face of d
// For every face added to the list
for(unsigned int i = 0; !found && i < visitedFaces.size(); ++i)
for(unsigned int i = 0; i < visitedFaces.size(); ++i)
{
if (!mark.isMarked(visitedFaces[i])) // Face has not been visited yet
{
// Apply functor to the darts of the face
found = foreach_dart_of_oriented_face(visitedFaces[i], f);
foreach_dart_of_oriented_face(visitedFaces[i], f);
// If functor returns false then mark visited darts (current face)
// mark visited darts (current face)
// and add non visited adjacent faces to the list of face
if (!found)
Dart e = visitedFaces[i] ;
do
{
Dart e = visitedFaces[i] ;
do
{
mark.mark(e); // Mark
Dart adj = phi2(e); // Get adjacent face
if (!mark.isMarked(adj))
visitedFaces.push_back(adj); // Add it
e = phi1(e);
} while(e != visitedFaces[i]);
}
mark.mark(e); // Mark
Dart adj = phi2(e); // Get adjacent face
if (!mark.isMarked(adj))
visitedFaces.push_back(adj); // Add it
e = phi1(e);
} while(e != visitedFaces[i]);
}
}
return found;
}
inline bool ImplicitHierarchicalMap3::foreach_dart_of_volume(Dart d, FunctorType& f, unsigned int thread) const
inline void ImplicitHierarchicalMap3::foreach_dart_of_volume(Dart d, std::function<void (Dart)> f, unsigned int thread) const
{
return foreach_dart_of_oriented_volume(d, f, thread) ;
foreach_dart_of_oriented_volume(d, f, thread) ;
}
inline bool ImplicitHierarchicalMap3::foreach_dart_of_cc(Dart d, FunctorType& f, unsigned int thread) const
inline void ImplicitHierarchicalMap3::foreach_dart_of_cc(Dart d, std::function<void (Dart)> f, unsigned int thread) const
{
DartMarkerStore<Map3> mark(*this, thread); // Lock a marker
bool found = false; // Last functor return value
std::vector<Dart> visitedFaces; // Faces that are traversed
visitedFaces.reserve(1024) ;
visitedFaces.push_back(d); // Start with the face of d
// For every face added to the list
for(unsigned int i = 0; !found && i < visitedFaces.size(); ++i)
for(unsigned int i = 0; i < visitedFaces.size(); ++i)
{
if (!mark.isMarked(visitedFaces[i])) // Face has not been visited yet
{
// Apply functor to the darts of the face
found = foreach_dart_of_face(visitedFaces[i], f);
foreach_dart_of_face(visitedFaces[i], f);
// If functor returns false then mark visited darts (current face)
// mark visited darts (current face)
// and add non visited adjacent faces to the list of face
if (!found)
Dart e = visitedFaces[i] ;
do
{
Dart e = visitedFaces[i] ;
do
{
mark.mark(e); // Mark
Dart adj = phi2(e); // Get adjacent face
if (!mark.isMarked(adj))
visitedFaces.push_back(adj); // Add it
e = phi1(e);
} while(e != visitedFaces[i]);
}
mark.mark(e); // Mark
Dart adj = phi2(e); // Get adjacent face
if (!mark.isMarked(adj))
visitedFaces.push_back(adj); // Add it
e = phi1(e);
} while(e != visitedFaces[i]);
}
}
return found;
// //return foreach_dart_of_oriented_volume(d, f) ;
// // foreach_dart_of_oriented_volume(d, f) ;
// DartMarkerStore mv(*this,thread); // Lock a marker
// bool found = false; // Last functor return value
//
// std::vector<Dart> darts; // Darts that are traversed
// darts.reserve(1024);
// darts.push_back(d); // Start with the dart d
// mv.mark(d);
//
// for(unsigned int i = 0; !found && i < darts.size(); ++i)
// for(unsigned int i = 0; i < darts.size(); ++i)
// {
// // add all successors if they are not marked yet
// Dart d2 = phi1(darts[i]); // turn in face
......@@ -394,34 +377,29 @@ inline bool ImplicitHierarchicalMap3::foreach_dart_of_cc(Dart d, FunctorType& f,
// mv.mark(d4);
// }
//
// found = f(darts[i]);
// f(darts[i]);
// }
// return found;
}
inline bool ImplicitHierarchicalMap3::foreach_dart_of_vertex2(Dart d, FunctorType& f, unsigned int /*thread*/) const
inline void ImplicitHierarchicalMap3::foreach_dart_of_vertex2(Dart d, std::function<void (Dart)> f, unsigned int /*thread*/) const
{
Dart dNext = d;
do
{
if (f(dNext))
return true;
f(dNext);
dNext = phi2(phi_1(dNext));
} while (dNext != d);
return false;
} while (dNext != d);
}
inline bool ImplicitHierarchicalMap3::foreach_dart_of_edge2(Dart d, FunctorType& f, unsigned int /*thread*/) const
inline void ImplicitHierarchicalMap3::foreach_dart_of_edge2(Dart d, std::function<void (Dart)> f, unsigned int /*thread*/) const
{
if (f(d))
return true;
return f(phi2(d));
f(d);
f(phi2(d));
}
inline bool ImplicitHierarchicalMap3::foreach_dart_of_face2(Dart d, FunctorType& f, unsigned int thread) const
inline void ImplicitHierarchicalMap3::foreach_dart_of_face2(Dart d, std::function<void (Dart)> f, unsigned int thread) const
{
return foreach_dart_of_oriented_face(d,f,thread);
foreach_dart_of_oriented_face(d, f, thread);
}
/***************************************************
......
......@@ -56,7 +56,8 @@ bool importMesh(typename PFP::MAP& map, MeshTablesSurface<PFP>& mts)
DartMarkerNoUnmark<MAP> m(map) ;
FunctorInitEmb<MAP, VERTEX> fsetemb(map);
unsigned int vemb = EMBNULL;
auto fsetemb = [&] (Dart d) { map.template initDartEmbedding<VERTEX>(d, vemb); };
// for each face of table
for(unsigned int i = 0; i < nbf; ++i)
......@@ -85,12 +86,11 @@ bool importMesh(typename PFP::MAP& map, MeshTablesSurface<PFP>& mts)
Dart d = map.newFace(nbe, false);
for (unsigned int j = 0; j < nbe; ++j)
{
unsigned int em = edgesBuffer[j]; // get embedding
fsetemb.changeEmb(em) ;
vemb = edgesBuffer[j]; // get embedding
map.template foreach_dart_of_orbit<PFP::MAP::VERTEX_OF_PARENT>(d, fsetemb);
m.mark(d) ; // mark on the fly to unmark on second loop
vecDartsPerVertex[em].push_back(d); // store incident darts for fast adjacency reconstruction
vecDartsPerVertex[vemb].push_back(d); // store incident darts for fast adjacency reconstruction
d = map.phi1(d);
}
}
......@@ -200,6 +200,9 @@ bool importMeshSAsV(typename PFP::MAP& map, MeshTablesSurface<PFP>& mts)
DartMarkerNoUnmark<MAP> m(map) ;
unsigned int vemb = EMBNULL;
auto fsetemb = [&] (Dart d) { map.template initDartEmbedding<VERTEX>(d, vemb); };
// for each face of table
for(unsigned int i = 0; i < nbf; ++i)
{
......@@ -227,13 +230,11 @@ bool importMeshSAsV(typename PFP::MAP& map, MeshTablesSurface<PFP>& mts)
Dart d = map.newFace(nbe, false);
for (unsigned int j = 0; j < nbe; ++j)
{
unsigned int em = edgesBuffer[j]; // get embedding
FunctorSetEmb<MAP, VERTEX> fsetemb(map, em);
vemb = edgesBuffer[j]; // get embedding
map.template foreach_dart_of_orbit<PFP::MAP::VERTEX_OF_PARENT2>(d, fsetemb);
m.mark(d) ; // mark on the fly to unmark on second loop
vecDartsPerVertex[em].push_back(d); // store incident darts for fast adjacency reconstruction
vecDartsPerVertex[vemb].push_back(d); // store incident darts for fast adjacency reconstruction
d = map.phi1(d);
}
}
......@@ -318,6 +319,11 @@ bool importMeshSToV(typename PFP::MAP& map, Surface::Import::MeshTablesSurface<P
DartMarkerNoUnmark<MAP> m(map) ;
unsigned int vemb1 = EMBNULL;
auto fsetemb1 = [&] (Dart d) { map.template initDartEmbedding<VERTEX>(d, vemb1); };
unsigned int vemb2 = EMBNULL;
auto fsetemb2 = [&] (Dart d) { map.template initDartEmbedding<VERTEX>(d, vemb2); };
VertexAttribute<VEC3, MAP_IMPL> position = map.template getAttribute<VEC3, VERTEX>("position");
std::vector<unsigned int > backEdgesBuffer(mts.getNbVertices(), EMBNULL);
......@@ -350,29 +356,26 @@ bool importMeshSToV(typename PFP::MAP& map, Surface::Import::MeshTablesSurface<P
//Embed the base faces
for (unsigned int j = 0; j < nbe; ++j)
{
unsigned int em = edgesBuffer[j]; // get embedding
vemb1 = edgesBuffer[j]; // get embedding
if(backEdgesBuffer[em] == EMBNULL)
if(backEdgesBuffer[vemb1] == EMBNULL)
{
unsigned int emn = map.template newCell<VERTEX>();
map.template copyCell<VERTEX>(emn, em);
backEdgesBuffer[em] = emn;
map.template copyCell<VERTEX>(emn, vemb1);
backEdgesBuffer[vemb1] = emn;
position[emn] += typename PFP::VEC3(0,0,dist);
}
FunctorSetEmb<typename PFP::MAP, VERTEX> fsetemb(map, em);
//foreach_dart_of_orbit_in_parent<typename PFP::MAP>(&map, VERTEX, d, fsetemb) ;
map.template foreach_dart_of_orbit<PFP::MAP::VERTEX_OF_PARENT>(d, fsetemb);
map.template foreach_dart_of_orbit<PFP::MAP::VERTEX_OF_PARENT>(d, fsetemb1);
//Embed the other base face
Dart d2 = map.phi1(map.phi1(map.phi2(d)));
unsigned int em2 = backEdgesBuffer[em];
FunctorSetEmb<typename PFP::MAP, VERTEX> fsetemb2(map, em2);
//foreach_dart_of_orbit_in_parent<typename PFP::MAP>(&map, VERTEX, d2, fsetemb2) ;
vemb2 = backEdgesBuffer[vemb1];
map.template foreach_dart_of_orbit<PFP::MAP::VERTEX_OF_PARENT>(d2, fsetemb2);
m.mark(d) ; // mark on the fly to unmark on second loop
vecDartsPerVertex[em].push_back(d); // store incident darts for fast adjacency reconstruction
vecDartsPerVertex[vemb1].push_back(d); // store incident darts for fast adjacency reconstruction
d = map.phi_1(d);
}
......@@ -428,6 +431,11 @@ bool importMeshSurfToVol(typename PFP::MAP& map, Surface::Import::MeshTablesSurf
DartMarkerNoUnmark<MAP> m(map) ;
unsigned int vemb1 = EMBNULL;
auto fsetemb1 = [&] (Dart d) { map.template initDartEmbedding<VERTEX>(d, vemb1); };
unsigned int vemb2 = EMBNULL;
auto fsetemb2 = [&] (Dart d) { map.template initDartEmbedding<VERTEX>(d, vemb2); };
unsigned int nbVertices = mts.getNbVertices();
VertexAttribute<VEC3, MAP_IMPL> position = map.template getAttribute<VEC3, VERTEX>("position");
......@@ -466,37 +474,34 @@ bool importMeshSurfToVol(typename PFP::MAP& map, Surface::Import::MeshTablesSurf
//Embed the base faces
for (unsigned int j = 0; j < nbe; ++j)
{
unsigned int em = edgesBuffer[j]; // get embedding
vemb1 = edgesBuffer[j]; // get embedding
Dart d2 = map.phi1(map.phi1(map.phi2(d)));
if(k==0)
{
FunctorSetEmb<typename PFP::MAP, VERTEX> fsetemb(map, em);
map.template foreach_dart_of_orbit<PFP::MAP::VERTEX_OF_PARENT>(d, fsetemb);
vecDartsPerVertex[em].push_back(d); // store incident darts for fast adjacency reconstruction
map.template foreach_dart_of_orbit<PFP::MAP::VERTEX_OF_PARENT>(d, fsetemb1);
vecDartsPerVertex[vemb1].push_back(d); // store incident darts for fast adjacency reconstruction
m.mark(d) ; // mark on the fly to unmark on second loop
}
else
{
unsigned int emn = backEdgesBuffer[((k-1)*nbVertices) + em];
FunctorSetEmb<typename PFP::MAP, VERTEX> fsetemb(map, emn);
map.template foreach_dart_of_orbit<PFP::MAP::VERTEX_OF_PARENT>(d, fsetemb);
vecDartsPerVertex[emn].push_back(d); // store incident darts for fast adjacency reconstruction
// unsigned int emn = backEdgesBuffer[((k-1)*nbVertices) + em];
vemb2 = backEdgesBuffer[((k-1)*nbVertices) + vemb1];
map.template foreach_dart_of_orbit<PFP::MAP::VERTEX_OF_PARENT>(d, fsetemb2);
vecDartsPerVertex[vemb2].push_back(d); // store incident darts for fast adjacency reconstruction
m.mark(d) ; // mark on the fly to unmark on second loop
}
if(backEdgesBuffer[(k*nbVertices) + em] == EMBNULL)
if(backEdgesBuffer[(k*nbVertices) + vemb1] == EMBNULL)
{
unsigned int emn = map.template newCell<VERTEX>();
map.template copyCell<VERTEX>(emn, em);
// map.template getAttributeContainer<VERTEX>().copyLine(newEmb, emb) ;
backEdgesBuffer[(k*nbVertices) + em] = emn;
position[emn] += typename PFP::VEC3(0,0, (k+1) * scale);
vemb2 = map.template newCell<VERTEX>();
map.template copyCell<VERTEX>(vemb2, vemb1);
backEdgesBuffer[(k*nbVertices) + vemb1] = vemb2;
position[vemb2] += typename PFP::VEC3(0,0, (k+1) * scale);
}
unsigned int em2 = backEdgesBuffer[(k*nbVertices) + em];
FunctorSetEmb<typename PFP::MAP, VERTEX> fsetemb(map, em2);
map.template foreach_dart_of_orbit<PFP::MAP::VERTEX_OF_PARENT>(d2, fsetemb);
vemb2 = backEdgesBuffer[(k*nbVertices) + vemb1];
map.template foreach_dart_of_orbit<PFP::MAP::VERTEX_OF_PARENT>(d2, fsetemb2);
d = map.phi_1(d);
}
......@@ -555,309 +560,290 @@ bool importMesh(typename PFP::MAP& map, MeshTablesVolume<PFP>& mtv)
VertexAutoAttribute< NoTypeNameAttribute< std::vector<Dart> >, MAP_IMPL> vecDartsPerVertex(map, "incidents");
unsigned int nbv = mtv.getNbVolumes();
unsigned int index = 0;
// buffer for tempo faces (used to remove degenerated edges)
std::vector<unsigned int> edgesBuffer;
unsigned int nbv = mtv.getNbVolumes();
unsigned int index = 0;
// buffer for tempo faces (used to remove degenerated edges)
std::vector<unsigned int> edgesBuffer;
edgesBuffer.reserve(16);
DartMarkerNoUnmark<MAP> m(map) ;
FunctorInitEmb<MAP, VERTEX> fsetemb(map);
//for each volume of table
for(unsigned int i = 0 ; i < nbv ; ++i)
{
// store volume in buffer, removing degenated faces
unsigned int nbf = mtv.getNbFacesVolume(i);
edgesBuffer.clear();
unsigned int prec = EMBNULL;
for (unsigned int j = 0; j < nbf; ++j)
{
unsigned int em = mtv.getEmbIdx(index++);
if (em != prec)
{
prec = em;
edgesBuffer.push_back(em);
}
}
if(nbf == 4) //tetrahedral case
{
Dart d = Surface::Modelisation::createTetrahedron<PFP>(map,false);
// Embed three "base" vertices
for(unsigned int j = 0 ; j < 3 ; ++j)
{
unsigned int em = edgesBuffer[j]; // get embedding
fsetemb.changeEmb(em) ;
map.template foreach_dart_of_orbit<PFP::MAP::VERTEX_OF_PARENT>(d, fsetemb);
//store darts per vertices to optimize reconstruction
Dart dd = d;
do
{
m.mark(dd) ;
vecDartsPerVertex[em].push_back(dd);
dd = map.phi1(map.phi2(dd));
} while(dd != d);
d = map.phi1(d);
}
//Embed the last "top" vertex
d = map.phi_1(map.phi2(d));
unsigned int em = edgesBuffer[3]; // get embedding
fsetemb.changeEmb(em) ;
map.template foreach_dart_of_orbit<PFP::MAP::VERTEX_OF_PARENT>(d, fsetemb);
//store darts per vertices to optimize reconstruction
Dart dd = d;
do
{
m.mark(dd) ;
vecDartsPerVertex[em].push_back(dd);
dd = map.phi1(map.phi2(dd));
} while(dd != d);
unsigned int vemb = EMBNULL;
auto fsetemb = [&] (Dart d) { map.template initDartEmbedding<VERTEX>(d, vemb); };
//for each volume of table
for(unsigned int i = 0 ; i < nbv ; ++i)
{
// store volume in buffer, removing degenated faces
unsigned int nbf = mtv.getNbFacesVolume(i);
edgesBuffer.clear();
unsigned int prec = EMBNULL;
for (unsigned int j = 0; j < nbf; ++j)
{
unsigned int em = mtv.getEmbIdx(index++);
if (em != prec)
{
prec = em;
edgesBuffer.push_back(em);
}
}
else if(nbf == 5) //pyramidal case
{
Dart d = Surface::Modelisation::createQuadrangularPyramid<PFP>(map,false);
// 1.
unsigned int em = edgesBuffer[0]; // get embedding
fsetemb.changeEmb(em) ;
map.template foreach_dart_of_orbit<PFP::MAP::VERTEX_OF_PARENT>(d, fsetemb);
Dart dd = d;
vecDartsPerVertex[em].push_back(dd); m.mark(dd); dd = map.phi1(map.phi2(dd));
vecDartsPerVertex[em].push_back(dd); m.mark(dd); dd = map.phi1(map.phi2(dd));
vecDartsPerVertex[em].push_back(dd); m.mark(dd);
// 2.
d = map.phi1(d);
em = edgesBuffer[1];
fsetemb.changeEmb(em) ;
map.template foreach_dart_of_orbit<PFP::MAP::VERTEX_OF_PARENT>(d, fsetemb);
dd = d;
vecDartsPerVertex[em].push_back(dd); m.mark(dd); dd = map.phi1(map.phi2(dd));
vecDartsPerVertex[em].push_back(dd); m.mark(dd); dd = map.phi1(map.phi2(dd));
vecDartsPerVertex[em].push_back(dd); m.mark(dd);
// 3.
d = map.phi1(d);
em = edgesBuffer[2];
fsetemb.changeEmb(em) ;
map.template foreach_dart_of_orbit<PFP::MAP::VERTEX_OF_PARENT>(d, fsetemb);
dd = d;
vecDartsPerVertex[em].push_back(dd); m.mark(dd); dd = map.phi1(map.phi2(dd));
vecDartsPerVertex[em].push_back(dd); m.mark(dd); dd = map.phi1(map.phi2(dd));
vecDartsPerVertex[em].push_back(dd); m.mark(dd);
// 4.
d = map.phi1(d);
em = edgesBuffer[3];
fsetemb.changeEmb(em) ;
map.template foreach_dart_of_orbit<PFP::MAP::VERTEX_OF_PARENT>(d, fsetemb);
dd = d;
vecDartsPerVertex[em].push_back(dd); m.mark(dd); dd = map.phi1(map.phi2(dd));
vecDartsPerVertex[em].push_back(dd); m.mark(dd); dd = map.phi1(map.phi2(dd));
vecDartsPerVertex[em].push_back(dd); m.mark(dd);
// 5.
d = map.phi_1(map.phi2(d));
em = edgesBuffer[4];
fsetemb.changeEmb(em) ;
map.template foreach_dart_of_orbit<PFP::MAP::VERTEX_OF_PARENT>(d, fsetemb);
dd = d;
vecDartsPerVertex[em].push_back(dd); m.mark(dd); dd = map.phi1(map.phi2(dd));
vecDartsPerVertex[em].push_back(dd); m.mark(dd); dd = map.phi1(map.phi2(dd));
vecDartsPerVertex[em].push_back(dd); m.mark(dd); dd = map.phi1(map.phi2(dd));
vecDartsPerVertex[em].push_back(dd); m.mark(dd);
}
else
if(nbf == 6) //prism case
{
Dart d = Surface::Modelisation::createTriangularPrism<PFP>(map,false);
// 1.
unsigned int em = edgesBuffer[0]; // get embedding
fsetemb.changeEmb(em) ;
map.template foreach_dart_of_orbit<PFP::MAP::VERTEX_OF_PARENT>(d, fsetemb);
Dart dd = d;
vecDartsPerVertex[em].push_back(dd); m.mark(dd); dd = map.phi1(map.phi2(dd));
vecDartsPerVertex[em].push_back(dd); m.mark(dd); dd = map.phi1(map.phi2(dd));
vecDartsPerVertex[em].push_back(dd); m.mark(dd);
// 2.
d = map.phi1(d);
em = edgesBuffer[1];
fsetemb.changeEmb(em) ;
map.template foreach_dart_of_orbit<PFP::MAP::VERTEX_OF_PARENT>(d, fsetemb);
dd = d;
vecDartsPerVertex[em].push_back(dd); m.mark(dd); dd = map.phi1(map.phi2(dd));
vecDartsPerVertex[em].push_back(dd); m.mark(dd); dd = map.phi1(map.phi2(dd));
vecDartsPerVertex[em].push_back(dd); m.mark(dd);
// 3.
d = map.phi1(d);
em = edgesBuffer[2];
fsetemb.changeEmb(em) ;
map.template foreach_dart_of_orbit<PFP::MAP::VERTEX_OF_PARENT>(d, fsetemb);
dd = d;
vecDartsPerVertex[em].push_back(dd); m.mark(dd); dd = map.phi1(map.phi2(dd));
vecDartsPerVertex[em].<