Commit 950f5e11 authored by Pierre Kraemer's avatar Pierre Kraemer

replace some functors by lambdas

parent cc63ab5a
......@@ -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)
{
......
......@@ -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].push_back(dd); m.mark(dd); dd = map.phi1(map.phi2(dd));
vecDartsPerVertex[em].push_back(dd); m.mark(dd);
// 5.
d = map.template phi<2112>(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);
// 6.
d = map.phi_1(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);
// 7.
d = map.phi_1(d);
em = edgesBuffer[5];
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);
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)
{
vemb = edgesBuffer[j]; // get embedding
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[vemb].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));
vemb = edgesBuffer[3]; // get embedding
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[vemb].push_back(dd);
dd = map.phi1(map.phi2(dd));
} while(dd != d);
}
else if(nbf == 8) //hexahedral case
{
Dart d = Surface::Modelisation::createHexahedron<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.template phi<2112>(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);
// 6.
d = map.phi_1(d);
em = edgesBuffer[5];
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);
// 7.
d = map.phi_1(d);
em = edgesBuffer[6];
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);
// 8.
d = map.phi_1(d);
em = edgesBuffer[7];
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);
} //end of hexa
}
else if(nbf == 5) //pyramidal case
{
Dart d = Surface::Modelisation::createQuadrangularPyramid<PFP>(map,false);
// 1.
vemb = edgesBuffer[0]; // get embedding
map.template foreach_dart_of_orbit<PFP::MAP::VERTEX_OF_PARENT>(d, fsetemb);
Dart dd = d;
vecDartsPerVertex[vemb].push_back(dd); m.mark(dd); dd = map.phi1(map.phi2(dd));
vecDartsPerVertex[vemb].push_back(dd); m.mark(dd); dd = map.phi1(map.phi2(dd));
vecDartsPerVertex[vemb].push_back(dd); m.mark(dd);
// 2.
d = map.phi1(d);
vemb = edgesBuffer[1];
map.template foreach_dart_of_orbit<PFP::MAP::VERTEX_OF_PARENT>(d, fsetemb);
dd = d;
vecDartsPerVertex[vemb].push_back(dd); m.mark(dd); dd = map.phi1(map.phi2(dd));
vecDartsPerVertex[vemb].push_back(dd); m.mark(dd); dd = map.phi1(map.phi2(dd));
vecDartsPerVertex[vemb].push_back(dd); m.mark(dd);
// 3.
d = map.phi1(d);
vemb = edgesBuffer[2];
map.template foreach_dart_of_orbit<PFP::MAP::VERTEX_OF_PARENT>(d, fsetemb);
dd = d;
vecDartsPerVertex[vemb].push_back(dd); m.mark(dd); dd = map.phi1(map.phi2(dd));
vecDartsPerVertex[vemb].push_back(dd); m.mark(dd); dd = map.phi1(map.phi2(dd));
vecDartsPerVertex[vemb].push_back(dd); m.mark(dd);
// 4.
d = map.phi1(d);
vemb = edgesBuffer[3];
map.template foreach_dart_of_orbit<PFP::MAP::VERTEX_OF_PARENT>(d, fsetemb);
dd = d;
vecDartsPerVertex[vemb].push_back(dd); m.mark(dd); dd = map.phi1(map.phi2(dd));
vecDartsPerVertex[vemb].push_back(dd); m.mark(dd); dd = map.phi1(map.phi2(dd));
vecDartsPerVertex[vemb].push_back(dd); m.mark(dd);
// 5.
d = map.phi_1(map.phi2(d));
vemb = edgesBuffer[4];
map.template foreach_dart_of_orbit<PFP::MAP::VERTEX_OF_PARENT>(d, fsetemb);
dd = d;
vecDartsPerVertex[vemb].push_back(dd); m.mark(dd); dd = map.phi1(map.phi2(dd));
vecDartsPerVertex[vemb].push_back(dd); m.mark(dd); dd = map.phi1(map.phi2(dd));
vecDartsPerVertex[vemb].push_back(dd); m.mark(dd); dd = map.phi1(map.phi2(dd));
vecDartsPerVertex[vemb].push_back(dd); m.mark(dd);
}
else
if(nbf == 6) //prism case
{
Dart d = Surface::Modelisation::createTriangularPrism<PFP>(map,false);
// 1.
vemb = edgesBuffer[0]; // get embedding
map.template foreach_dart_of_orbit<PFP::MAP::VERTEX_OF_PARENT>(d, fsetemb);
Dart dd = d;
vecDartsPerVertex[vemb].push_back(dd); m.mark(dd); dd = map.phi1(map.phi2(dd));
vecDartsPerVertex[vemb].push_back(dd); m.mark(dd); dd = map.phi1(map.phi2(dd));
vecDartsPerVertex[vemb].push_back(dd); m.mark(dd);
// 2.
d = map.phi1(d);
vemb = edgesBuffer[1];
map.template foreach_dart_of_orbit<PFP::MAP::VERTEX_OF_PARENT>(d, fsetemb);
dd = d;
vecDartsPerVertex[vemb].push_back(dd); m.mark(dd); dd = map.phi1(map.phi2(dd));
vecDartsPerVertex[vemb].push_back(dd); m.mark(dd); dd = map.phi1(map.phi2(dd));
vecDartsPerVertex[vemb].push_back(dd); m.mark(dd);
// 3.
d = map.phi1(d);
vemb = edgesBuffer[2];
map.template foreach_dart_of_orbit<PFP::MAP::VERTEX_OF_PARENT>(d, fsetemb);
dd = d;
vecDartsPerVertex[vemb].push_back(dd); m.mark(dd); dd = map.phi1(map.phi2(dd));
vecDartsPerVertex[vemb].push_back(dd); m.mark(dd); dd = map.phi1(map.phi2(dd));
vecDartsPerVertex[vemb].push_back(dd); m.mark(dd);
// 5.
d = map.template phi<2112>(d);