From da89af549ef5ba94ec108b64ac52878ec098529c Mon Sep 17 00:00:00 2001 From: Sylvain Thery Date: Thu, 26 Jun 2014 09:20:16 +0200 Subject: [PATCH] removing old fashioned setOrbitEmbedding --- .../ImplicitHierarchicalMesh/subdivision3.hpp | 5 ++-- include/Algo/Import/importMoka.hpp | 3 ++- .../Multiresolution/Map2MR/lerpAttributes.h | 3 ++- .../Map3MR/map3MR_PrimalAdapt.hpp | 14 +++++------ .../Map3MR/map3MR_PrimalRegular.hpp | 8 +++--- include/Algo/ProgressiveMesh/pmesh.hpp | 25 ++++++++++--------- 6 files changed, 30 insertions(+), 28 deletions(-) diff --git a/include/Algo/ImplicitHierarchicalMesh/subdivision3.hpp b/include/Algo/ImplicitHierarchicalMesh/subdivision3.hpp index 4d6c4353..07ecd1e9 100644 --- a/include/Algo/ImplicitHierarchicalMesh/subdivision3.hpp +++ b/include/Algo/ImplicitHierarchicalMesh/subdivision3.hpp @@ -1955,7 +1955,7 @@ void subdivideLoop(typename PFP::MAP& map, Dart d, AttributeHandler(centralDart, map.template getEmbedding(centralDart)); + Algo::Topo::setOrbitEmbedding(map,centralDart,map.template getEmbedding(centralDart)); //Third step : 3-sew internal faces for (std::vector >::iterator it = subdividedfaces.begin(); it != subdividedfaces.end(); ++it) @@ -2350,7 +2350,8 @@ Dart subdivideVolume(typename PFP::MAP& map, Dart d, AttributeHandler(centralDart, map.template getEmbedding(centralDart)); +// map.template setOrbitEmbedding(centralDart, map.template getEmbedding(centralDart)); + Algo::Topo::setOrbitEmbedding(map,centralDart,map.template getEmbedding(centralDart)); //Third step : 3-sew internal faces for (std::vector > >::iterator it = subdividedfaces.begin(); it != subdividedfaces.end(); ++it) diff --git a/include/Algo/Import/importMoka.hpp b/include/Algo/Import/importMoka.hpp index 25daa660..aa39457a 100644 --- a/include/Algo/Import/importMoka.hpp +++ b/include/Algo/Import/importMoka.hpp @@ -121,7 +121,8 @@ bool importMoka(typename PFP::MAP& gmap, const std::string& filename, std::vecto } for(typename std::map::iterator it = map_dart_emb.begin() ; it != map_dart_emb.end() ; ++it) - gmap.template setOrbitEmbedding(it->first, it->second); +// gmap.template setOrbitEmbedding(it->first, it->second); + Algo::Topo::setOrbitEmbedding(gmap,it->first, it->second); gmap.closeMap(); diff --git a/include/Algo/Multiresolution/Map2MR/lerpAttributes.h b/include/Algo/Multiresolution/Map2MR/lerpAttributes.h index 7f525108..9a680d26 100644 --- a/include/Algo/Multiresolution/Map2MR/lerpAttributes.h +++ b/include/Algo/Multiresolution/Map2MR/lerpAttributes.h @@ -76,7 +76,8 @@ public: }while(!found && dit!=d); - m_map.template setOrbitEmbedding(dres, m_map.template getEmbedding(dres)); +// m_map.template setOrbitEmbedding(dres, m_map.template getEmbedding(dres)); + Algo::Topo::setOrbitEmbedding(m_map,template getEmbedding(dres)); } // SelectorEdgeLevel ml(m_map, m_map.getCurrentLevel()); diff --git a/include/Algo/Multiresolution/Map3MR/map3MR_PrimalAdapt.hpp b/include/Algo/Multiresolution/Map3MR/map3MR_PrimalAdapt.hpp index c72f30b7..0466d2ab 100644 --- a/include/Algo/Multiresolution/Map3MR/map3MR_PrimalAdapt.hpp +++ b/include/Algo/Multiresolution/Map3MR/map3MR_PrimalAdapt.hpp @@ -658,7 +658,7 @@ unsigned int Map3MR::subdivideVolume(Dart d, bool triQuad, bool OneLevelDif } //replonger l'orbit de ditV. - m_map.template setOrbitEmbedding(centralDart, m_map.template getEmbedding(centralDart)); + Algo::Topo::setOrbitEmbedding(m_map,centralDart, m_map.template getEmbedding(centralDart)); (*volumeVertexFunctor)(centralDart) ; m_map.decCurrentLevel() ; @@ -697,7 +697,7 @@ unsigned int Map3MR::subdivideVolume(Dart d, bool triQuad, bool OneLevelDif { Dart dit = *it; - m_map.template setOrbitEmbeddingOnNewCell(dit); + Algo::Topo::setOrbitEmbeddingOnNewCell(m_map,dit); m_map.template copyCell(dit, ditV); } @@ -706,7 +706,8 @@ unsigned int Map3MR::subdivideVolume(Dart d, bool triQuad, bool OneLevelDif //replonger l'orbit de ditV. - m_map.template setOrbitEmbedding(m_map.phi2(m_map.phi3(x)), m_map.template getEmbedding(m_map.phi2(m_map.phi3(x)))); + Algo::Topo::setOrbitEmbedding(m_map, m_map.phi2(m_map.phi3(x)), m_map.template getEmbedding(m_map.phi2(m_map.phi3(x)))); + //m_map.template setOrbitEmbedding(centralDart, m_map.template getEmbedding(centralDart)); //(*volumeVertexFunctor)(x) ; @@ -754,13 +755,11 @@ unsigned int Map3MR::subdivideVolume(Dart d, bool triQuad, bool OneLevelDif for(std::vector::iterator it = embVol.begin() ; it != embVol.end() ; ++it) { Dart dit = *it; - - m_map.template setOrbitEmbeddingOnNewCell(dit); + Algo::Topo::setOrbitEmbeddingOnNewCell(m_map,dit); m_map.template copyCell(dit, d); } - - m_map.template setOrbitEmbedding(x, m_map.template getEmbedding(x)); + Algo::Topo::setOrbitEmbeddingOnNewCell(m_map, x, m_map.template getEmbedding(x)); (*volumeVertexFunctor)(x) ; m_map.decCurrentLevel() ; @@ -1188,7 +1187,6 @@ void Map3MR::subdivideVolumeTetOcta(Dart d) }while(f != x); } - //m_map.template setOrbitEmbedding(centralDart, EMBNULL); m_map.template setOrbitEmbedding(centralDart, m_map.template getEmbedding(centralDart)); (*volumeVertexFunctor)(centralDart) ; //propagateOrbitEmbedding(centralDart) ; diff --git a/include/Algo/Multiresolution/Map3MR/map3MR_PrimalRegular.hpp b/include/Algo/Multiresolution/Map3MR/map3MR_PrimalRegular.hpp index 613c9988..8b1fd7b7 100644 --- a/include/Algo/Multiresolution/Map3MR/map3MR_PrimalRegular.hpp +++ b/include/Algo/Multiresolution/Map3MR/map3MR_PrimalRegular.hpp @@ -95,7 +95,7 @@ void Map3MR::swapEdges(Dart d, Dart e) } if(m_map.template isOrbitEmbedded()) - m_map.template setOrbitEmbeddingOnNewCell(d); + Algo::Topo::setOrbitEmbeddingOnNewCell(m_map,d); } } @@ -313,7 +313,7 @@ void Map3MR::addNewLevelSqrt3(bool embedNewVertices, VertexAttribute(dit); m_map.incCurrentLevel(); - unsigned int newemb = m_map.template setOrbitEmbeddingOnNewCell(dit) ; + unsigned int newemb = Algo::Topo::setOrbitEmbeddingOnNewCell(m_map,dit); m_map.template copyCell(newemb, emb); } @@ -496,7 +496,7 @@ void Map3MR::addNewLevelSqrt3Geom(bool embedNewVertices, VertexAttribute(dit); m_map.incCurrentLevel(); - unsigned int newemb = m_map.template setOrbitEmbeddingOnNewCell(dit) ; + unsigned int newemb = Algo::Topo::setOrbitEmbeddingOnNewCell(m_map,dit); m_map.template copyCell(newemb, emb); } @@ -1349,7 +1349,7 @@ void Map3MR::addNewLevel() }while(f != x); //replonger l'orbit de ditV. - m_map.template setOrbitEmbedding(x, m_map.template getEmbedding(x)); + Algo::Topo::setOrbitEmbedding(m_map,x, m_map.template getEmbedding(x)); m_map.decCurrentLevel() ; } diff --git a/include/Algo/ProgressiveMesh/pmesh.hpp b/include/Algo/ProgressiveMesh/pmesh.hpp index 745d2829..e628f0d5 100644 --- a/include/Algo/ProgressiveMesh/pmesh.hpp +++ b/include/Algo/ProgressiveMesh/pmesh.hpp @@ -215,9 +215,9 @@ void ProgressiveMesh::createPM(unsigned int percentWantedVertices) edgeCollapse(vs) ; // collapse edge - unsigned int newV = m_map.template setOrbitEmbeddingOnNewCell(d2) ; - unsigned int newE1 = m_map.template setOrbitEmbeddingOnNewCell(d2) ; - unsigned int newE2 = m_map.template setOrbitEmbeddingOnNewCell(dd2) ; + unsigned int newV = Algo::Topo::setOrbitEmbeddingOnNewCell(m_map,d2); + unsigned int newE1 = Algo::Topo::setOrbitEmbeddingOnNewCell(m_map,d2); + unsigned int newE2 = Algo::Topo::setOrbitEmbeddingOnNewCell(m_map,dd2); vs->setApproxV(newV) ; vs->setApproxE1(newE1) ; vs->setApproxE2(newE2) ; @@ -281,9 +281,10 @@ void ProgressiveMesh::coarsen() edgeCollapse(vs) ; // collapse edge - m_map.template setOrbitEmbedding(d2, vs->getApproxV()) ; - m_map.template setOrbitEmbedding(d2, vs->getApproxE1()) ; - m_map.template setOrbitEmbedding(dd2, vs->getApproxE2()) ; + Algo::Topo::setOrbitEmbedding(m_map, d2,s->getApproxV()) ; + Algo::Topo::setOrbitEmbedding(m_map, d2, vs->getApproxE1()) ; + Algo::Topo::setOrbitEmbedding(m_map, dd2, vs->getApproxE2()) ; + } template @@ -328,12 +329,12 @@ void ProgressiveMesh::refine() vertexSplit(vs) ; // split vertex - m_map.template setOrbitEmbedding(d, v1) ; // embed the - m_map.template setOrbitEmbedding(dd, v2) ; // new vertices - m_map.template setOrbitEmbedding(d1, e1) ; - m_map.template setOrbitEmbedding(d2, e2) ; // and new edges - m_map.template setOrbitEmbedding(dd1, e3) ; - m_map.template setOrbitEmbedding(dd2, e4) ; + Algo::Topo::setOrbitEmbedding(m_map, d, v1) ; // embed the + Algo::Topo::setOrbitEmbedding(m_map, dd, v2) ; // new vertices + Algo::Topo::setOrbitEmbedding(m_map, d1, e1) ; + Algo::Topo::setOrbitEmbedding(m_map, d2, e2) ; // and new edges + Algo::Topo::setOrbitEmbedding(m_map, dd1, e3) ; + Algo::Topo::setOrbitEmbedding(m_map, dd2, e4) ; if(!m_predictors.empty()) { -- GitLab