Commit 17225370 authored by Pierre Kraemer's avatar Pierre Kraemer
Browse files

embedOrbit->setOrbitEmbedding + optim about EMBNULL

parent 0d75d907
...@@ -92,7 +92,7 @@ private: ...@@ -92,7 +92,7 @@ private:
// Assigne un nouveau plongement au sommet. Les anciens plongements sont libérés. // Assigne un nouveau plongement au sommet. Les anciens plongements sont libérés.
void newVertex(Dart d) { void newVertex(Dart d) {
embedNewCell<VERTEX>(d); setOrbitEmbeddingNewCell<VERTEX>(d);
} }
public: public:
......
...@@ -95,7 +95,7 @@ private: ...@@ -95,7 +95,7 @@ private:
// Assigne un nouveau plongement au sommet. Les anciens plongements sont libérés. // Assigne un nouveau plongement au sommet. Les anciens plongements sont libérés.
void newVertex(Dart d) { void newVertex(Dart d) {
embedNewCell(VERTEX,d); setOrbitEmbeddingNewCell(VERTEX,d);
} }
public: public:
......
...@@ -898,7 +898,7 @@ void EdgeSelector_Curvature<PFP>::computeEdgeInfo(Dart d, EdgeInfo& einfo) ...@@ -898,7 +898,7 @@ void EdgeSelector_Curvature<PFP>::computeEdgeInfo(Dart d, EdgeInfo& einfo)
Dart d2 = m.phi2(m.phi_1(d)) ; Dart d2 = m.phi2(m.phi_1(d)) ;
Dart dd2 = m.phi2(m.phi_1(dd)) ; Dart dd2 = m.phi2(m.phi_1(dd)) ;
m.extractTrianglePair(d) ; m.extractTrianglePair(d) ;
unsigned int newV = m.template embedNewCell<VERTEX>(d2) ; unsigned int newV = m.template setOrbitEmbeddingNewCell<VERTEX>(d2) ;
this->m_position[newV] = m_positionApproximator->getApprox(d) ; this->m_position[newV] = m_positionApproximator->getApprox(d) ;
// compute things on the coarse version of the mesh // compute things on the coarse version of the mesh
...@@ -911,8 +911,8 @@ void EdgeSelector_Curvature<PFP>::computeEdgeInfo(Dart d, EdgeInfo& einfo) ...@@ -911,8 +911,8 @@ void EdgeSelector_Curvature<PFP>::computeEdgeInfo(Dart d, EdgeInfo& einfo)
// vertex split to reset the initial connectivity and embeddings // vertex split to reset the initial connectivity and embeddings
m.insertTrianglePair(d, d2, dd2) ; m.insertTrianglePair(d, d2, dd2) ;
m.template embedOrbit<VERTEX>(d, v1) ; m.template setOrbitEmbedding<VERTEX>(d, v1) ;
m.template embedOrbit<VERTEX>(dd, v2) ; m.template setOrbitEmbedding<VERTEX>(dd, v2) ;
REAL err = 0 ; REAL err = 0 ;
......
...@@ -211,7 +211,7 @@ void Approximator_MidEdge<PFP>::approximate(Dart d) ...@@ -211,7 +211,7 @@ void Approximator_MidEdge<PFP>::approximate(Dart d)
// temporary edge collapse // temporary edge collapse
m.extractTrianglePair(d) ; m.extractTrianglePair(d) ;
unsigned int newV = m.template embedNewCell<VERTEX>(d2) ; unsigned int newV = m.template setOrbitEmbeddingNewCell<VERTEX>(d2) ;
this->m_attrV[0]->operator[](newV) = this->m_approx[0][d] ; this->m_attrV[0]->operator[](newV) = this->m_approx[0][d] ;
// compute the detail vector // compute the detail vector
...@@ -220,8 +220,8 @@ void Approximator_MidEdge<PFP>::approximate(Dart d) ...@@ -220,8 +220,8 @@ void Approximator_MidEdge<PFP>::approximate(Dart d)
// vertex split to reset the initial connectivity and embeddings // vertex split to reset the initial connectivity and embeddings
m.insertTrianglePair(d, d2, dd2) ; m.insertTrianglePair(d, d2, dd2) ;
m.template embedOrbit<VERTEX>(d, m.template getEmbedding<VERTEX>(d)) ; m.template setOrbitEmbedding<VERTEX>(d, m.template getEmbedding<VERTEX>(d)) ;
m.template embedOrbit<VERTEX>(dd, m.template getEmbedding<VERTEX>(dd)) ; m.template setOrbitEmbedding<VERTEX>(dd, m.template getEmbedding<VERTEX>(dd)) ;
} }
} }
...@@ -260,7 +260,7 @@ void Approximator_HalfCollapse<PFP>::approximate(Dart d) ...@@ -260,7 +260,7 @@ void Approximator_HalfCollapse<PFP>::approximate(Dart d)
// temporary edge collapse // temporary edge collapse
m.extractTrianglePair(d) ; m.extractTrianglePair(d) ;
unsigned int newV = m.template embedNewCell<VERTEX>(d2) ; unsigned int newV = m.template setOrbitEmbeddingNewCell<VERTEX>(d2) ;
for (unsigned int i = 0 ; i < this->m_attrV.size() ; ++i) for (unsigned int i = 0 ; i < this->m_attrV.size() ; ++i)
{ {
this->m_attrV[i]->operator[](newV) = this->m_approx[i][d] ; this->m_attrV[i]->operator[](newV) = this->m_approx[i][d] ;
...@@ -275,8 +275,8 @@ void Approximator_HalfCollapse<PFP>::approximate(Dart d) ...@@ -275,8 +275,8 @@ void Approximator_HalfCollapse<PFP>::approximate(Dart d)
// vertex split to reset the initial connectivity and embeddings // vertex split to reset the initial connectivity and embeddings
m.insertTrianglePair(d, d2, dd2) ; m.insertTrianglePair(d, d2, dd2) ;
m.template embedOrbit<VERTEX>(d, m.template getEmbedding<VERTEX>(d)) ; m.template setOrbitEmbedding<VERTEX>(d, m.template getEmbedding<VERTEX>(d)) ;
m.template embedOrbit<VERTEX>(dd, m.template getEmbedding<VERTEX>(dd)) ; m.template setOrbitEmbedding<VERTEX>(dd, m.template getEmbedding<VERTEX>(dd)) ;
} }
} }
......
...@@ -175,7 +175,7 @@ void SimplifTrian<PFP>::updateCriterias(Dart d) ...@@ -175,7 +175,7 @@ void SimplifTrian<PFP>::updateCriterias(Dart d)
CRIT_IT it = m_edgeCrit.insert(std::make_pair(key,cr)); CRIT_IT it = m_edgeCrit.insert(std::make_pair(key,cr));
// store iterator on edge // store iterator on edge
unsigned int em = m_map.getEmbedding(d, EDGE); unsigned int em = m_map.getEmbedding(d, EDGE);
m_map.embedOrbit<EDGE>(d, em); m_map.setOrbitEmbedding<EDGE>(d, em);
m_edgeEmb[em] = it; m_edgeEmb[em] = it;
m_protectMarker.mark(em) ; m_protectMarker.mark(em) ;
...@@ -235,7 +235,7 @@ Dart SimplifTrian<PFP>::edgeCollapse(Dart d, typename PFP::VEC3& newPos) ...@@ -235,7 +235,7 @@ Dart SimplifTrian<PFP>::edgeCollapse(Dart d, typename PFP::VEC3& newPos)
// embed new vertex // embed new vertex
unsigned int emb = m_map.getEmbedding(d2, VERTEX); unsigned int emb = m_map.getEmbedding(d2, VERTEX);
m_map.embedOrbit<VERTEX>(d2, emb); m_map.setOrbitEmbedding<VERTEX>(d2, emb);
m_positions[d2] = newPos; m_positions[d2] = newPos;
m_valences[d2] = v_d + v_dd - 4; m_valences[d2] = v_d + v_dd - 4;
......
...@@ -122,12 +122,12 @@ void CollapseEdgeOperator<PFP>::split(typename PFP::MAP& m, VertexAttribute<type ...@@ -122,12 +122,12 @@ void CollapseEdgeOperator<PFP>::split(typename PFP::MAP& m, VertexAttribute<type
// //vertexSplit(vs) ; // split vertex // //vertexSplit(vs) ; // split vertex
// //map.vertexSplit() // //map.vertexSplit()
// //
// m_map.template embedOrbit<VERTEX>(d, v1) ; // embed the // m_map.template setOrbitEmbedding<VERTEX>(d, v1) ; // embed the
// m_map.template embedOrbit<VERTEX>(dd, v2) ; // new vertices // m_map.template setOrbitEmbedding<VERTEX>(dd, v2) ; // new vertices
// m_map.template embedOrbit<EDGE>(d1, e1) ; // m_map.template setOrbitEmbedding<EDGE>(d1, e1) ;
// m_map.template embedOrbit<EDGE>(d2, e2) ; // and new edges // m_map.template setOrbitEmbedding<EDGE>(d2, e2) ; // and new edges
// m_map.template embedOrbit<EDGE>(dd1, e3) ; // m_map.template setOrbitEmbedding<EDGE>(dd1, e3) ;
// m_map.template embedOrbit<EDGE>(dd2, e4) ; // m_map.template setOrbitEmbedding<EDGE>(dd2, e4) ;
} }
/**************************************************************************************************** /****************************************************************************************************
......
...@@ -258,8 +258,8 @@ inline void ImplicitHierarchicalMap::splitFace(Dart d, Dart e) ...@@ -258,8 +258,8 @@ inline void ImplicitHierarchicalMap::splitFace(Dart d, Dart e)
{ {
unsigned int cur = m_curLevel ; unsigned int cur = m_curLevel ;
m_curLevel = m_maxLevel ; m_curLevel = m_maxLevel ;
this->embedOrbit<FACE>(d, this->getEmbedding<FACE>(d)) ; this->setOrbitEmbedding<FACE>(d, this->getEmbedding<FACE>(d)) ;
this->embedOrbit<FACE>(e, this->getEmbedding<FACE>(e)) ; this->setOrbitEmbedding<FACE>(e, this->getEmbedding<FACE>(e)) ;
m_curLevel = cur ; m_curLevel = cur ;
} }
} }
...@@ -349,7 +349,7 @@ T& AttributeHandler_IHM<T, ORBIT>::operator[](Dart d) ...@@ -349,7 +349,7 @@ T& AttributeHandler_IHM<T, ORBIT>::operator[](Dart d)
if(index == EMBNULL) if(index == EMBNULL)
{ {
index = m->embedNewCell<ORBIT>(d) ; index = m->setOrbitEmbeddingNewCell<ORBIT>(d) ;
m->m_nextLevelCell[orbit]->operator[](index) = EMBNULL ; m->m_nextLevelCell[orbit]->operator[](index) = EMBNULL ;
} }
......
...@@ -616,7 +616,7 @@ T& AttributeHandler_IHM<T, ORBIT>::operator[](Dart d) ...@@ -616,7 +616,7 @@ T& AttributeHandler_IHM<T, ORBIT>::operator[](Dart d)
if(index == EMBNULL) if(index == EMBNULL)
{ {
index = m->embedNewCell<ORBIT>(d) ; index = m->setOrbitEmbeddingNewCell<ORBIT>(d) ;
m->m_nextLevelCell[orbit]->operator[](index) = EMBNULL ; m->m_nextLevelCell[orbit]->operator[](index) = EMBNULL ;
} }
......
...@@ -829,7 +829,7 @@ void subdivideLoop(typename PFP::MAP& map, Dart d, AttributeHandler<typename PFP ...@@ -829,7 +829,7 @@ void subdivideLoop(typename PFP::MAP& map, Dart d, AttributeHandler<typename PFP
}while(f != x); }while(f != x);
} }
map.template embedOrbit<VERTEX>(centralDart, map.template getEmbedding<VERTEX>(centralDart)); map.template setOrbitEmbedding<VERTEX>(centralDart, map.template getEmbedding<VERTEX>(centralDart));
//Third step : 3-sew internal faces //Third step : 3-sew internal faces
for (std::vector<std::pair<Dart,Dart> >::iterator it = subdividedfaces.begin(); it != subdividedfaces.end(); ++it) for (std::vector<std::pair<Dart,Dart> >::iterator it = subdividedfaces.begin(); it != subdividedfaces.end(); ++it)
...@@ -1224,7 +1224,7 @@ Dart subdivideVolume(typename PFP::MAP& map, Dart d, AttributeHandler<typename P ...@@ -1224,7 +1224,7 @@ Dart subdivideVolume(typename PFP::MAP& map, Dart d, AttributeHandler<typename P
}while(f != x); }while(f != x);
} }
map.template embedOrbit<VERTEX>(centralDart, map.template getEmbedding<VERTEX>(centralDart)); map.template setOrbitEmbedding<VERTEX>(centralDart, map.template getEmbedding<VERTEX>(centralDart));
//Third step : 3-sew internal faces //Third step : 3-sew internal faces
for (std::vector<std::pair<char, std::pair<Dart,Dart> > >::iterator it = subdividedfaces.begin(); it != subdividedfaces.end(); ++it) for (std::vector<std::pair<char, std::pair<Dart,Dart> > >::iterator it = subdividedfaces.begin(); it != subdividedfaces.end(); ++it)
......
...@@ -98,12 +98,12 @@ public: ...@@ -98,12 +98,12 @@ public:
unsigned int newEmb = vID[children[0]->indices[idx]] ; unsigned int newEmb = vID[children[0]->indices[idx]] ;
if(oldEmb == EMBNULL) if(oldEmb == EMBNULL)
{ {
map.template embedOrbit<VERTEX>(dd, newEmb) ; map.template setOrbitEmbedding<VERTEX>(dd, newEmb) ;
map.pushLevel() ; map.pushLevel() ;
for(unsigned int i = map.getCurrentLevel() + 1; i <= map.getMaxLevel(); ++i) for(unsigned int i = map.getCurrentLevel() + 1; i <= map.getMaxLevel(); ++i)
{ {
map.setCurrentLevel(i) ; map.setCurrentLevel(i) ;
map.template embedOrbit<VERTEX>(dd, newEmb) ; map.template setOrbitEmbedding<VERTEX>(dd, newEmb) ;
} }
map.popLevel() ; map.popLevel() ;
} }
......
...@@ -49,6 +49,8 @@ bool importMesh(typename PFP::MAP& map, MeshTablesSurface<PFP>& mts) ...@@ -49,6 +49,8 @@ bool importMesh(typename PFP::MAP& map, MeshTablesSurface<PFP>& mts)
DartMarkerNoUnmark m(map) ; DartMarkerNoUnmark m(map) ;
FunctorInitEmb<typename PFP::MAP, VERTEX> fsetemb(map);
// for each face of table // for each face of table
for(unsigned int i = 0; i < nbf; ++i) for(unsigned int i = 0; i < nbf; ++i)
{ {
...@@ -77,9 +79,7 @@ bool importMesh(typename PFP::MAP& map, MeshTablesSurface<PFP>& mts) ...@@ -77,9 +79,7 @@ bool importMesh(typename PFP::MAP& map, MeshTablesSurface<PFP>& mts)
for (unsigned int j = 0; j < nbe; ++j) for (unsigned int j = 0; j < nbe; ++j)
{ {
unsigned int em = edgesBuffer[j]; // get embedding unsigned int em = edgesBuffer[j]; // get embedding
fsetemb.changeEmb(em) ;
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, fsetemb);
m.mark(d) ; // mark on the fly to unmark on second loop m.mark(d) ; // mark on the fly to unmark on second loop
......
...@@ -118,7 +118,7 @@ bool importMoka(typename PFP::MAP& gmap, const std::string& filename, std::vecto ...@@ -118,7 +118,7 @@ bool importMoka(typename PFP::MAP& gmap, const std::string& filename, std::vecto
} }
for(typename std::map<Dart, unsigned int>::iterator it = map_dart_emb.begin() ; it != map_dart_emb.end() ; ++it) for(typename std::map<Dart, unsigned int>::iterator it = map_dart_emb.begin() ; it != map_dart_emb.end() ; ++it)
gmap.template embedOrbit<VERTEX>(it->first, it->second); gmap.template setOrbitEmbedding<VERTEX>(it->first, it->second);
gmap.closeMap(); gmap.closeMap();
......
...@@ -257,7 +257,7 @@ Polyhedron<PFP>* extrusion_scale_prim(typename PFP::MAP& the_map, VertexAttribut ...@@ -257,7 +257,7 @@ Polyhedron<PFP>* extrusion_scale_prim(typename PFP::MAP& the_map, VertexAttribut
else position[em] = P; else position[em] = P;
Dart d = vertD[index++]; Dart d = vertD[index++];
the_map.template embedOrbit<VERTEX>(d, em); the_map.template setOrbitEmbedding<VERTEX>(d, em);
// rotate again to put profile in the good position along the path // rotate again to put profile in the good position along the path
// pos4=Geom::Vec4f ((*ip)[0],(*ip)[1],(*ip)[2], 1.0f); // pos4=Geom::Vec4f ((*ip)[0],(*ip)[1],(*ip)[2], 1.0f);
......
...@@ -783,7 +783,7 @@ void Polyhedron<PFP>::embedGrid(float x, float y, float z) ...@@ -783,7 +783,7 @@ void Polyhedron<PFP>::embedGrid(float x, float y, float z)
VEC3 pos(-x/2 + dx*float(j), -y/2 + dy*float(i), z); VEC3 pos(-x/2 + dx*float(j), -y/2 + dy*float(i), z);
unsigned int em = m_positions.insert(pos); unsigned int em = m_positions.insert(pos);
Dart d = m_tableVertDarts[i*(m_nx+1)+j]; Dart d = m_tableVertDarts[i*(m_nx+1)+j];
m_map.template embedOrbit<VERTEX>(d, em); m_map.template setOrbitEmbedding<VERTEX>(d, em);
} }
} }
} }
...@@ -814,7 +814,7 @@ void Polyhedron<PFP>::embedCylinder(float bottom_radius, float top_radius, float ...@@ -814,7 +814,7 @@ void Polyhedron<PFP>::embedCylinder(float bottom_radius, float top_radius, float
VEC3 pos(x, y, -height/2 + dz*float(i)); VEC3 pos(x, y, -height/2 + dz*float(i));
unsigned int em = m_positions.insert(pos); unsigned int em = m_positions.insert(pos);
Dart d = m_tableVertDarts[i*(m_nx)+j]; Dart d = m_tableVertDarts[i*(m_nx)+j];
m_map.template embedOrbit<VERTEX>(d, em); m_map.template setOrbitEmbedding<VERTEX>(d, em);
} }
} }
...@@ -824,7 +824,7 @@ void Polyhedron<PFP>::embedCylinder(float bottom_radius, float top_radius, float ...@@ -824,7 +824,7 @@ void Polyhedron<PFP>::embedCylinder(float bottom_radius, float top_radius, float
VEC3 pos(0.0f, 0.0f, -height/2 ); VEC3 pos(0.0f, 0.0f, -height/2 );
unsigned int em = m_positions.insert(pos); unsigned int em = m_positions.insert(pos);
Dart d = m_tableVertDarts[indexUmbrella++]; Dart d = m_tableVertDarts[indexUmbrella++];
m_map.template embedOrbit<VERTEX>(d, em); m_map.template setOrbitEmbedding<VERTEX>(d, em);
} }
if (m_top_closed) if (m_top_closed)
...@@ -832,7 +832,7 @@ void Polyhedron<PFP>::embedCylinder(float bottom_radius, float top_radius, float ...@@ -832,7 +832,7 @@ void Polyhedron<PFP>::embedCylinder(float bottom_radius, float top_radius, float
VEC3 pos(0.0f ,0.0f, height/2 ); VEC3 pos(0.0f ,0.0f, height/2 );
unsigned int em = m_positions.insert(pos); unsigned int em = m_positions.insert(pos);
Dart d = m_tableVertDarts[indexUmbrella]; Dart d = m_tableVertDarts[indexUmbrella];
m_map.template embedOrbit<VERTEX>(d, em); m_map.template setOrbitEmbedding<VERTEX>(d, em);
} }
} }
...@@ -864,7 +864,7 @@ void Polyhedron<PFP>::embedCone(float radius, float height) ...@@ -864,7 +864,7 @@ void Polyhedron<PFP>::embedCone(float radius, float height)
VEC3 pos(x, y, h); VEC3 pos(x, y, h);
unsigned int em = m_positions.insert(pos); unsigned int em = m_positions.insert(pos);
Dart d = m_tableVertDarts[i*(m_nx)+j]; Dart d = m_tableVertDarts[i*(m_nx)+j];
m_map.template embedOrbit<VERTEX>(d, em); m_map.template setOrbitEmbedding<VERTEX>(d, em);
} }
} }
...@@ -874,14 +874,14 @@ void Polyhedron<PFP>::embedCone(float radius, float height) ...@@ -874,14 +874,14 @@ void Polyhedron<PFP>::embedCone(float radius, float height)
VEC3 pos(0.0f, 0.0f, -height/2 ); VEC3 pos(0.0f, 0.0f, -height/2 );
unsigned int em = m_positions.insert(pos); unsigned int em = m_positions.insert(pos);
Dart d = m_tableVertDarts[indexUmbrella++]; Dart d = m_tableVertDarts[indexUmbrella++];
m_map.template embedOrbit<VERTEX>(d, em); m_map.template setOrbitEmbedding<VERTEX>(d, em);
} }
// top always closed in cone // top always closed in cone
VEC3 pos(0.0f ,0.0f, height/2.0f ); VEC3 pos(0.0f ,0.0f, height/2.0f );
unsigned int em = m_positions.insert(pos); unsigned int em = m_positions.insert(pos);
Dart d = m_tableVertDarts[indexUmbrella]; Dart d = m_tableVertDarts[indexUmbrella];
m_map.template embedOrbit<VERTEX>(d, em); m_map.template setOrbitEmbedding<VERTEX>(d, em);
} }
template <typename PFP> template <typename PFP>
...@@ -910,7 +910,7 @@ void Polyhedron<PFP>::embedSphere(float radius) ...@@ -910,7 +910,7 @@ void Polyhedron<PFP>::embedSphere(float radius)
VEC3 pos(x, y, h ); VEC3 pos(x, y, h );
unsigned int em = m_positions.insert(pos); unsigned int em = m_positions.insert(pos);
Dart d = m_tableVertDarts[i*(m_nx)+j]; Dart d = m_tableVertDarts[i*(m_nx)+j];
m_map.template embedOrbit<VERTEX>(d, em); m_map.template setOrbitEmbedding<VERTEX>(d, em);
} }
} }
...@@ -918,13 +918,13 @@ void Polyhedron<PFP>::embedSphere(float radius) ...@@ -918,13 +918,13 @@ void Polyhedron<PFP>::embedSphere(float radius)
VEC3 pos(0.0f, 0.0f, -radius); VEC3 pos(0.0f, 0.0f, -radius);
unsigned int em = m_positions.insert(pos); unsigned int em = m_positions.insert(pos);
Dart d = m_tableVertDarts[m_nx*(m_nz+1)]; Dart d = m_tableVertDarts[m_nx*(m_nz+1)];
m_map.template embedOrbit<VERTEX>(d, em); m_map.template setOrbitEmbedding<VERTEX>(d, em);
// top pole // top pole
pos = VEC3(0.0f, 0.0f, radius); pos = VEC3(0.0f, 0.0f, radius);
em = m_positions.insert(pos); em = m_positions.insert(pos);
d = m_tableVertDarts[m_nx*(m_nz+1)+1]; d = m_tableVertDarts[m_nx*(m_nz+1)+1];
m_map.template embedOrbit<VERTEX>(d, em); m_map.template setOrbitEmbedding<VERTEX>(d, em);
} }
template <typename PFP> template <typename PFP>
...@@ -952,7 +952,7 @@ void Polyhedron<PFP>::embedTore(float big_radius, float small_radius) ...@@ -952,7 +952,7 @@ void Polyhedron<PFP>::embedTore(float big_radius, float small_radius)
VEC3 pos(x, y, z); VEC3 pos(x, y, z);
unsigned int em = m_positions.insert(pos); unsigned int em = m_positions.insert(pos);
Dart d = m_tableVertDarts[j*(m_nx)+i]; Dart d = m_tableVertDarts[j*(m_nx)+i];
m_map.template embedOrbit<VERTEX>(d, em); m_map.template setOrbitEmbedding<VERTEX>(d, em);
} }
} }
} }
...@@ -983,7 +983,7 @@ void Polyhedron<PFP>::embedCube(float sx, float sy, float sz) ...@@ -983,7 +983,7 @@ void Polyhedron<PFP>::embedCube(float sx, float sy, float sz)
VEC3 pos(x, -sy/2.0f, z); VEC3 pos(x, -sy/2.0f, z);
unsigned int em = m_positions.insert(pos); unsigned int em = m_positions.insert(pos);
Dart d = m_tableVertDarts[index++]; Dart d = m_tableVertDarts[index++];
m_map.template embedOrbit<VERTEX>(d, em); m_map.template setOrbitEmbedding<VERTEX>(d, em);
} }
for (unsigned int i = 0; i < m_ny; ++i) for (unsigned int i = 0; i < m_ny; ++i)
{ {
...@@ -991,7 +991,7 @@ void Polyhedron<PFP>::embedCube(float sx, float sy, float sz) ...@@ -991,7 +991,7 @@ void Polyhedron<PFP>::embedCube(float sx, float sy, float sz)
VEC3 pos(sx/2.0f, y, z); VEC3 pos(sx/2.0f, y, z);
unsigned int em = m_positions.insert(pos); unsigned int em = m_positions.insert(pos);
Dart d = m_tableVertDarts[index++]; Dart d = m_tableVertDarts[index++];
m_map.template embedOrbit<VERTEX>(d, em); m_map.template setOrbitEmbedding<VERTEX>(d, em);
} }
for (unsigned int i = 0; i < m_nx; ++i) for (unsigned int i = 0; i < m_nx; ++i)
{ {
...@@ -999,7 +999,7 @@ void Polyhedron<PFP>::embedCube(float sx, float sy, float sz) ...@@ -999,7 +999,7 @@ void Polyhedron<PFP>::embedCube(float sx, float sy, float sz)
VEC3 pos(x, sy/2.0f, z); VEC3 pos(x, sy/2.0f, z);
unsigned int em = m_positions.insert(pos); unsigned int em = m_positions.insert(pos);
Dart d = m_tableVertDarts[index++]; Dart d = m_tableVertDarts[index++];
m_map.template embedOrbit<VERTEX>(d, em); m_map.template setOrbitEmbedding<VERTEX>(d, em);
} }
for (unsigned int i = 0; i < m_ny ;++i) for (unsigned int i = 0; i < m_ny ;++i)
{ {
...@@ -1007,7 +1007,7 @@ void Polyhedron<PFP>::embedCube(float sx, float sy, float sz) ...@@ -1007,7 +1007,7 @@ void Polyhedron<PFP>::embedCube(float sx, float sy, float sz)
VEC3 pos(-sx/2.0f, y, z); VEC3 pos(-sx/2.0f, y, z);
unsigned int em = m_positions.insert(pos); unsigned int em = m_positions.insert(pos);
Dart d = m_tableVertDarts[index++]; Dart d = m_tableVertDarts[index++];
m_map.template embedOrbit<VERTEX>(d, em); m_map.template setOrbitEmbedding<VERTEX>(d, em);
} }
} }
...@@ -1019,7 +1019,7 @@ void Polyhedron<PFP>::embedCube(float sx, float sy, float sz) ...@@ -1019,7 +1019,7 @@ void Polyhedron<PFP>::embedCube(float sx, float sy, float sz)
VEC3 pos(-sx/2.0f+float(j)*dx, -sy/2.0f+float(i)*dy, sz/2.0f); VEC3 pos(-sx/2.0f+float(j)*dx, -sy/2.0f+float(i)*dy, sz/2.0f);
unsigned int em = m_positions.insert(pos); unsigned int em = m_positions.insert(pos);
Dart d = m_tableVertDarts[index++]; Dart d = m_tableVertDarts[index++];
m_map.template embedOrbit<VERTEX>(d, em); m_map.template setOrbitEmbedding<VERTEX>(d, em);
} }
} }
...@@ -1031,7 +1031,7 @@ void Polyhedron<PFP>::embedCube(float sx, float sy, float sz) ...@@ -1031,7 +1031,7 @@ void Polyhedron<PFP>::embedCube(float sx, float sy, float sz)
VEC3 pos(-sx/2.0f+float(j)*dx, sy/2.0f-float(i)*dy, -sz/2.0f); VEC3 pos(-sx/2.0f+float(j)*dx, sy/2.0f-float(i)*dy, -sz/2.0f);
unsigned int em = m_positions.insert(pos); unsigned int em = m_positions.insert(pos);
Dart d = m_tableVertDarts[index++]; Dart d = m_tableVertDarts[index++];
m_map.template embedOrbit<VERTEX>(d, em); m_map.template setOrbitEmbedding<VERTEX>(d, em);
} }
} }
} }
...@@ -1104,7 +1104,7 @@ void Polyhedron<PFP>::embedTwistedStrip(float radius_min, float radius_max, flo ...@@ -1104,7 +1104,7 @@ void Polyhedron<PFP>::embedTwistedStrip(float radius_min, float radius_max, flo
VEC3 pos(r*cos(alpha*float(i)), r*sin(alpha*float(i)), rw*sin(beta*float(i))); VEC3 pos(r*cos(alpha*float(i)), r*sin(alpha*float(i)), rw*sin(beta*float(i)));
unsigned int em = m_positions.insert(pos); unsigned int em = m_positions.insert(pos);
Dart d = m_tableVertDarts[i*(m_nx+1)+j]; Dart d = m_tableVertDarts[i*(m_nx+1)+j];
m_map.template embedOrbit<VERTEX>(d, em); m_map.template setOrbitEmbedding<VERTEX>(d, em);
} }
} }
} }
......
...@@ -176,7 +176,7 @@ void Primitive3D<PFP>::embedHexaGrid(float x, float y, float z) ...@@ -176,7 +176,7 @@ void Primitive3D<PFP>::embedHexaGrid(float x, float y, float z)
typename PFP::VEC3 pos(-x/2.0f + dx*float(k), -y/2.0f + dy*float(j), -z/2.0f + dz*float(i)); typename PFP::VEC3 pos(-x/2.0f + dx*float(k), -y/2.0f + dy*float(j), -z/2.0f + dz*float(i));
Dart d = m_tableVertDarts[ i*nbs+j*(m_nx+1)+k ]; Dart d = m_tableVertDarts[ i*nbs+j*(m_nx+1)+k ];
m_map.template embedNewCell<VERTEX>(d); m_map.template setOrbitEmbeddingNewCell<VERTEX>(d);
m_positions[d] = pos; m_positions[d] = pos;
} }
} }
......