Commit da89af54 authored by Sylvain Thery's avatar Sylvain Thery

removing old fashioned setOrbitEmbedding

parent 34041d75
...@@ -1955,7 +1955,7 @@ void subdivideLoop(typename PFP::MAP& map, Dart d, AttributeHandler<typename PFP ...@@ -1955,7 +1955,7 @@ void subdivideLoop(typename PFP::MAP& map, Dart d, AttributeHandler<typename PFP
}while(f != x); }while(f != x);
} }
map.template setOrbitEmbedding<VERTEX>(centralDart, map.template getEmbedding<VERTEX>(centralDart)); Algo::Topo::setOrbitEmbedding<VERTEX>(map,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)
...@@ -2350,7 +2350,8 @@ Dart subdivideVolume(typename PFP::MAP& map, Dart d, AttributeHandler<typename P ...@@ -2350,7 +2350,8 @@ Dart subdivideVolume(typename PFP::MAP& map, Dart d, AttributeHandler<typename P
}while(f != x); }while(f != x);
} }
map.template setOrbitEmbedding<VERTEX>(centralDart, map.template getEmbedding<VERTEX>(centralDart)); // map.template setOrbitEmbedding<VERTEX>(centralDart, map.template getEmbedding<VERTEX>(centralDart));
Algo::Topo::setOrbitEmbedding<VERTEX>(map,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)
......
...@@ -121,7 +121,8 @@ bool importMoka(typename PFP::MAP& gmap, const std::string& filename, std::vecto ...@@ -121,7 +121,8 @@ 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 setOrbitEmbedding<VERTEX>(it->first, it->second); // gmap.template setOrbitEmbedding<VERTEX>(it->first, it->second);
Algo::Topo::setOrbitEmbedding<VERTEX>(gmap,it->first, it->second);
gmap.closeMap(); gmap.closeMap();
......
...@@ -76,7 +76,8 @@ public: ...@@ -76,7 +76,8 @@ public:
}while(!found && dit!=d); }while(!found && dit!=d);
m_map.template setOrbitEmbedding<VERTEX>(dres, m_map.template getEmbedding<VERTEX>(dres)); // m_map.template setOrbitEmbedding<VERTEX>(dres, m_map.template getEmbedding<VERTEX>(dres));
Algo::Topo::setOrbitEmbedding<VERTEX>(m_map,template getEmbedding<VERTEX>(dres));
} }
// SelectorEdgeLevel<typename PFP::MAP> ml(m_map, m_map.getCurrentLevel()); // SelectorEdgeLevel<typename PFP::MAP> ml(m_map, m_map.getCurrentLevel());
......
...@@ -658,7 +658,7 @@ unsigned int Map3MR<PFP>::subdivideVolume(Dart d, bool triQuad, bool OneLevelDif ...@@ -658,7 +658,7 @@ unsigned int Map3MR<PFP>::subdivideVolume(Dart d, bool triQuad, bool OneLevelDif
} }
//replonger l'orbit de ditV. //replonger l'orbit de ditV.
m_map.template setOrbitEmbedding<VERTEX>(centralDart, m_map.template getEmbedding<VERTEX>(centralDart)); Algo::Topo::setOrbitEmbedding<VERTEX>(m_map,centralDart, m_map.template getEmbedding<VERTEX>(centralDart));
(*volumeVertexFunctor)(centralDart) ; (*volumeVertexFunctor)(centralDart) ;
m_map.decCurrentLevel() ; m_map.decCurrentLevel() ;
...@@ -697,7 +697,7 @@ unsigned int Map3MR<PFP>::subdivideVolume(Dart d, bool triQuad, bool OneLevelDif ...@@ -697,7 +697,7 @@ unsigned int Map3MR<PFP>::subdivideVolume(Dart d, bool triQuad, bool OneLevelDif
{ {
Dart dit = *it; Dart dit = *it;
m_map.template setOrbitEmbeddingOnNewCell<VOLUME>(dit); Algo::Topo::setOrbitEmbeddingOnNewCell<VOLUME>(m_map,dit);
m_map.template copyCell<VOLUME>(dit, ditV); m_map.template copyCell<VOLUME>(dit, ditV);
} }
...@@ -706,7 +706,8 @@ unsigned int Map3MR<PFP>::subdivideVolume(Dart d, bool triQuad, bool OneLevelDif ...@@ -706,7 +706,8 @@ unsigned int Map3MR<PFP>::subdivideVolume(Dart d, bool triQuad, bool OneLevelDif
//replonger l'orbit de ditV. //replonger l'orbit de ditV.
m_map.template setOrbitEmbedding<VERTEX>(m_map.phi2(m_map.phi3(x)), m_map.template getEmbedding<VERTEX>(m_map.phi2(m_map.phi3(x)))); Algo::Topo::setOrbitEmbedding<VERTEX>(m_map, m_map.phi2(m_map.phi3(x)), m_map.template getEmbedding<VERTEX>(m_map.phi2(m_map.phi3(x))));
//m_map.template setOrbitEmbedding<VERTEX>(centralDart, m_map.template getEmbedding<VERTEX>(centralDart)); //m_map.template setOrbitEmbedding<VERTEX>(centralDart, m_map.template getEmbedding<VERTEX>(centralDart));
//(*volumeVertexFunctor)(x) ; //(*volumeVertexFunctor)(x) ;
...@@ -754,13 +755,11 @@ unsigned int Map3MR<PFP>::subdivideVolume(Dart d, bool triQuad, bool OneLevelDif ...@@ -754,13 +755,11 @@ unsigned int Map3MR<PFP>::subdivideVolume(Dart d, bool triQuad, bool OneLevelDif
for(std::vector<Dart>::iterator it = embVol.begin() ; it != embVol.end() ; ++it) for(std::vector<Dart>::iterator it = embVol.begin() ; it != embVol.end() ; ++it)
{ {
Dart dit = *it; Dart dit = *it;
Algo::Topo::setOrbitEmbeddingOnNewCell<VOLUME>(m_map,dit);
m_map.template setOrbitEmbeddingOnNewCell<VOLUME>(dit);
m_map.template copyCell<VOLUME>(dit, d); m_map.template copyCell<VOLUME>(dit, d);
} }
Algo::Topo::setOrbitEmbeddingOnNewCell<VOLUME>(m_map, x, m_map.template getEmbedding<VERTEX>(x));
m_map.template setOrbitEmbedding<VERTEX>(x, m_map.template getEmbedding<VERTEX>(x));
(*volumeVertexFunctor)(x) ; (*volumeVertexFunctor)(x) ;
m_map.decCurrentLevel() ; m_map.decCurrentLevel() ;
...@@ -1188,7 +1187,6 @@ void Map3MR<PFP>::subdivideVolumeTetOcta(Dart d) ...@@ -1188,7 +1187,6 @@ void Map3MR<PFP>::subdivideVolumeTetOcta(Dart d)
}while(f != x); }while(f != x);
} }
//m_map.template setOrbitEmbedding<VERTEX>(centralDart, EMBNULL);
m_map.template setOrbitEmbedding<VERTEX>(centralDart, m_map.template getEmbedding<VERTEX>(centralDart)); m_map.template setOrbitEmbedding<VERTEX>(centralDart, m_map.template getEmbedding<VERTEX>(centralDart));
(*volumeVertexFunctor)(centralDart) ; (*volumeVertexFunctor)(centralDart) ;
//propagateOrbitEmbedding<VERTEX>(centralDart) ; //propagateOrbitEmbedding<VERTEX>(centralDart) ;
......
...@@ -95,7 +95,7 @@ void Map3MR<PFP>::swapEdges(Dart d, Dart e) ...@@ -95,7 +95,7 @@ void Map3MR<PFP>::swapEdges(Dart d, Dart e)
} }
if(m_map.template isOrbitEmbedded<VOLUME>()) if(m_map.template isOrbitEmbedded<VOLUME>())
m_map.template setOrbitEmbeddingOnNewCell<VOLUME>(d); Algo::Topo::setOrbitEmbeddingOnNewCell<VOLUME>(m_map,d);
} }
} }
...@@ -313,7 +313,7 @@ void Map3MR<PFP>::addNewLevelSqrt3(bool embedNewVertices, VertexAttribute<typena ...@@ -313,7 +313,7 @@ void Map3MR<PFP>::addNewLevelSqrt3(bool embedNewVertices, VertexAttribute<typena
unsigned int emb = m_map.template getEmbedding<VERTEX>(dit); unsigned int emb = m_map.template getEmbedding<VERTEX>(dit);
m_map.incCurrentLevel(); m_map.incCurrentLevel();
unsigned int newemb = m_map.template setOrbitEmbeddingOnNewCell<VERTEX>(dit) ; unsigned int newemb = Algo::Topo::setOrbitEmbeddingOnNewCell<VERTEX>(m_map,dit);
m_map.template copyCell<VERTEX>(newemb, emb); m_map.template copyCell<VERTEX>(newemb, emb);
} }
...@@ -496,7 +496,7 @@ void Map3MR<PFP>::addNewLevelSqrt3Geom(bool embedNewVertices, VertexAttribute<ty ...@@ -496,7 +496,7 @@ void Map3MR<PFP>::addNewLevelSqrt3Geom(bool embedNewVertices, VertexAttribute<ty
unsigned int emb = m_map.template getEmbedding<VERTEX>(dit); unsigned int emb = m_map.template getEmbedding<VERTEX>(dit);
m_map.incCurrentLevel(); m_map.incCurrentLevel();
unsigned int newemb = m_map.template setOrbitEmbeddingOnNewCell<VERTEX>(dit) ; unsigned int newemb = Algo::Topo::setOrbitEmbeddingOnNewCell<VERTEX>(m_map,dit);
m_map.template copyCell<VERTEX>(newemb, emb); m_map.template copyCell<VERTEX>(newemb, emb);
} }
...@@ -1349,7 +1349,7 @@ void Map3MR<PFP>::addNewLevel() ...@@ -1349,7 +1349,7 @@ void Map3MR<PFP>::addNewLevel()
}while(f != x); }while(f != x);
//replonger l'orbit de ditV. //replonger l'orbit de ditV.
m_map.template setOrbitEmbedding<VERTEX>(x, m_map.template getEmbedding<VERTEX>(x)); Algo::Topo::setOrbitEmbedding<VERTEX>(m_map,x, m_map.template getEmbedding<VERTEX>(x));
m_map.decCurrentLevel() ; m_map.decCurrentLevel() ;
} }
......
...@@ -215,9 +215,9 @@ void ProgressiveMesh<PFP>::createPM(unsigned int percentWantedVertices) ...@@ -215,9 +215,9 @@ void ProgressiveMesh<PFP>::createPM(unsigned int percentWantedVertices)
edgeCollapse(vs) ; // collapse edge edgeCollapse(vs) ; // collapse edge
unsigned int newV = m_map.template setOrbitEmbeddingOnNewCell<VERTEX>(d2) ; unsigned int newV = Algo::Topo::setOrbitEmbeddingOnNewCell<VERTEX>(m_map,d2);
unsigned int newE1 = m_map.template setOrbitEmbeddingOnNewCell<EDGE>(d2) ; unsigned int newE1 = Algo::Topo::setOrbitEmbeddingOnNewCell<EDGE>(m_map,d2);
unsigned int newE2 = m_map.template setOrbitEmbeddingOnNewCell<EDGE>(dd2) ; unsigned int newE2 = Algo::Topo::setOrbitEmbeddingOnNewCell<EDGE>(m_map,dd2);
vs->setApproxV(newV) ; vs->setApproxV(newV) ;
vs->setApproxE1(newE1) ; vs->setApproxE1(newE1) ;
vs->setApproxE2(newE2) ; vs->setApproxE2(newE2) ;
...@@ -281,9 +281,10 @@ void ProgressiveMesh<PFP>::coarsen() ...@@ -281,9 +281,10 @@ void ProgressiveMesh<PFP>::coarsen()
edgeCollapse(vs) ; // collapse edge edgeCollapse(vs) ; // collapse edge
m_map.template setOrbitEmbedding<VERTEX>(d2, vs->getApproxV()) ; Algo::Topo::setOrbitEmbedding<VERTEX>(m_map, d2,s->getApproxV()) ;
m_map.template setOrbitEmbedding<EDGE>(d2, vs->getApproxE1()) ; Algo::Topo::setOrbitEmbedding<EDGE>(m_map, d2, vs->getApproxE1()) ;
m_map.template setOrbitEmbedding<EDGE>(dd2, vs->getApproxE2()) ; Algo::Topo::setOrbitEmbedding<EDGE>(m_map, dd2, vs->getApproxE2()) ;
} }
template <typename PFP> template <typename PFP>
...@@ -328,12 +329,12 @@ void ProgressiveMesh<PFP>::refine() ...@@ -328,12 +329,12 @@ void ProgressiveMesh<PFP>::refine()
vertexSplit(vs) ; // split vertex vertexSplit(vs) ; // split vertex
m_map.template setOrbitEmbedding<VERTEX>(d, v1) ; // embed the Algo::Topo::setOrbitEmbedding<VERTEX>(m_map, d, v1) ; // embed the
m_map.template setOrbitEmbedding<VERTEX>(dd, v2) ; // new vertices Algo::Topo::setOrbitEmbedding<VERTEX>(m_map, dd, v2) ; // new vertices
m_map.template setOrbitEmbedding<EDGE>(d1, e1) ; Algo::Topo::setOrbitEmbedding<EDGE>(m_map, d1, e1) ;
m_map.template setOrbitEmbedding<EDGE>(d2, e2) ; // and new edges Algo::Topo::setOrbitEmbedding<EDGE>(m_map, d2, e2) ; // and new edges
m_map.template setOrbitEmbedding<EDGE>(dd1, e3) ; Algo::Topo::setOrbitEmbedding<EDGE>(m_map, dd1, e3) ;
m_map.template setOrbitEmbedding<EDGE>(dd2, e4) ; Algo::Topo::setOrbitEmbedding<EDGE>(m_map, dd2, e4) ;
if(!m_predictors.empty()) if(!m_predictors.empty())
{ {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment