Commit e0307c22 authored by untereiner's avatar untereiner

changing some namespace path

parent 97325e21
...@@ -70,24 +70,86 @@ int main(int argc, char **argv) ...@@ -70,24 +70,86 @@ int main(int argc, char **argv)
// //
// Dual // Dual
// //
// FaceAttribute<PFP::VEC3> positionF = myMap.getAttribute<PFP::VEC3, FACE>("position") ;
// if(!positionF.isValid())
// positionF = myMap.addAttribute<PFP::VEC3, FACE>("position") ;
//
// Algo::Surface::Geometry::computeCentroidFaces<PFP>(myMap, position, positionF) ;
// myMap.computeDual();
// position = positionF ;
// FaceAttribute<PFP::VEC3> positionF = myMap.getAttribute<PFP::VEC3, FACE>("position") ; // AttributeHandler<PFP::VEC3, PFP::MAP::EDGE_OF_PARENT> positionE = myMap.getAttribute<PFP::VEC3, PFP::MAP::EDGE_OF_PARENT>("position") ;
// if(!positionF.isValid()) // if(!positionE.isValid())
// positionF = myMap.addAttribute<PFP::VEC3, FACE>("position") ; // positionE = myMap.addAttribute<PFP::VEC3, PFP::MAP::EDGE_OF_PARENT>("position") ;
//
// SelectorDartBoundary<PFP::MAP> sdb(myMap);
// TraversorE<PFP::MAP> te(myMap, sdb);
// for(Dart dit = te.begin() ; dit != te.end() ; dit = te.next())
// {
// positionE[dit] = (position[dit] + position[myMap.phi1(dit)]) * PFP::REAL(0.5);
// }
//
// std::cout << "boundary edges centroids : ok" << std::endl;
//
// //triangule old boundary faces
// std::vector<Dart> oldb;
//
// std::cout << "nb darts : " << myMap.getNbDarts() << std::endl;
//
// CellMarker<FACE> cmf(myMap);
// for(Dart d = myMap.begin(); d != myMap.end(); myMap.next(d))
// {
// if(!cmf.isMarked(d) && myMap.isBoundaryMarked2(d))
// {
// oldb.push_back(d);
// cmf.mark(d);
// std::cout << "d = " << d << std::endl;
// }
// }
//
// for(std::vector<Dart>::iterator it = oldb.begin() ; it != oldb.end() ; ++it)
// {
// Dart db = *it;
// Dart d1 = myMap.phi1(db);
// myMap.splitFace(db, d1) ;
// myMap.cutEdge(myMap.phi_1(db)) ;
// Dart x = myMap.phi2(myMap.phi_1(db)) ;
// Dart dd = myMap.phi1(myMap.phi1(myMap.phi1(x)));
// while(dd != x)
// {
// Dart next = myMap.phi1(dd) ;
// myMap.splitFace(dd, myMap.phi1(x)) ;
// dd = next ;
// }
//
// }
//
// std::cout << "boundary face triangulation : ok" << std::endl;
//
// myMap.swapEmbeddingContainers(FACE, PFP::MAP::EDGE_OF_PARENT) ;
//
// std::cout << "swap containers : ok" << std::endl;
//
// FaceAttribute<PFP::VEC3> positionF;
// positionF = positionE;
// //
// Algo::Surface::Geometry::computeCentroidFaces<PFP>(myMap, position, positionF) ; // Algo::Surface::Geometry::computeCentroidFaces<PFP>(myMap, position, positionF) ;
//
// for(std::vector<Dart>::iterator it = oldb.begin() ; it != oldb.end() ; ++it)
// {
// myMap.fillHole(*it);
// }
//
// std::cout << "fillHole : ok" << std::endl;
//
// myMap.computeDual(); // myMap.computeDual();
//
// //myMap.closeMap();
//
// position = positionF ; // position = positionF ;
//
EdgeAttribute<PFP::VEC3> positionE = myMap.getAttribute<PFP::VEC3, Edge>("position") ; // myMap.check();
if(!positionE.isValid())
positionE = myMap.addAttribute<PFP::VEC3, EDGE>("position") ;
Algo::Surface::Geometry::computeCentroidEdges<PFP>(myMap, position, positionF) ;
myMap.computeDual();
position = positionF ;
myMap.check();
Algo::Surface::Export::exportOFF<PFP>(myMap, position, "result.off"); Algo::Surface::Export::exportOFF<PFP>(myMap, position, "result.off");
std::cout << "Exported" << std::endl; std::cout << "Exported" << std::endl;
......
...@@ -46,7 +46,7 @@ namespace Filters ...@@ -46,7 +46,7 @@ namespace Filters
{ {
template <typename PFP> template <typename PFP>
class CCVertexSynthesisFilter : public Filter class CCVertexSynthesisFilter : public Algo::MR::Filter
{ {
protected: protected:
typename PFP::MAP& m_map ; typename PFP::MAP& m_map ;
......
...@@ -54,7 +54,7 @@ namespace Filters ...@@ -54,7 +54,7 @@ namespace Filters
//w-lift(a) //w-lift(a)
template <typename PFP> template <typename PFP>
class Ber02OddSynthesisFilter : public Filter class Ber02OddSynthesisFilter : public Algo::MR::Filter
{ {
protected: protected:
typename PFP::MAP& m_map ; typename PFP::MAP& m_map ;
...@@ -175,7 +175,7 @@ public: ...@@ -175,7 +175,7 @@ public:
// s-lift(a) // s-lift(a)
template <typename PFP> template <typename PFP>
class Ber02EvenSynthesisFilter : public Filter class Ber02EvenSynthesisFilter : public Algo::MR::Filter
{ {
protected: protected:
typename PFP::MAP& m_map ; typename PFP::MAP& m_map ;
...@@ -356,7 +356,7 @@ public: ...@@ -356,7 +356,7 @@ public:
// s-scale(a) // s-scale(a)
template <typename PFP> template <typename PFP>
class Ber02ScaleSynthesisFilter : public Filter class Ber02ScaleSynthesisFilter : public Algo::MR::Filter
{ {
protected: protected:
typename PFP::MAP& m_map ; typename PFP::MAP& m_map ;
...@@ -418,7 +418,7 @@ public: ...@@ -418,7 +418,7 @@ public:
//w-lift(a) //w-lift(a)
template <typename PFP> template <typename PFP>
class Ber02OddAnalysisFilter : public Filter class Ber02OddAnalysisFilter : public Algo::MR::Filter
{ {
protected: protected:
typename PFP::MAP& m_map ; typename PFP::MAP& m_map ;
...@@ -480,7 +480,7 @@ public: ...@@ -480,7 +480,7 @@ public:
// s-lift(a) // s-lift(a)
template <typename PFP> template <typename PFP>
class Ber02EvenAnalysisFilter : public Filter class Ber02EvenAnalysisFilter : public Algo::MR::Filter
{ {
protected: protected:
typename PFP::MAP& m_map ; typename PFP::MAP& m_map ;
...@@ -571,7 +571,7 @@ public: ...@@ -571,7 +571,7 @@ public:
// s-scale(a) // s-scale(a)
template <typename PFP> template <typename PFP>
class Ber02ScaleAnalysisFilter : public Filter class Ber02ScaleAnalysisFilter : public Algo::MR::Filter
{ {
protected: protected:
typename PFP::MAP& m_map ; typename PFP::MAP& m_map ;
......
...@@ -68,7 +68,7 @@ namespace Filters ...@@ -68,7 +68,7 @@ namespace Filters
* Lazy Wavelet * Lazy Wavelet
*********************************************************************************/ *********************************************************************************/
template <typename PFP> template <typename PFP>
class CCInitEdgeSynthesisFilter : public Filter class CCInitEdgeSynthesisFilter : public Algo::MR::Filter
{ {
protected: protected:
typename PFP::MAP& m_map ; typename PFP::MAP& m_map ;
...@@ -101,7 +101,7 @@ public: ...@@ -101,7 +101,7 @@ public:
} ; } ;
template <typename PFP> template <typename PFP>
class CCInitFaceSynthesisFilter : public Filter class CCInitFaceSynthesisFilter : public Algo::MR::Filter
{ {
protected: protected:
typename PFP::MAP& m_map ; typename PFP::MAP& m_map ;
...@@ -134,7 +134,7 @@ public: ...@@ -134,7 +134,7 @@ public:
} ; } ;
template <typename PFP> template <typename PFP>
class CCEdgeSynthesisFilter : public Filter class CCEdgeSynthesisFilter : public Algo::MR::Filter
{ {
protected: protected:
typename PFP::MAP& m_map ; typename PFP::MAP& m_map ;
...@@ -165,7 +165,7 @@ public: ...@@ -165,7 +165,7 @@ public:
} ; } ;
template <typename PFP> template <typename PFP>
class CCFaceSynthesisFilter : public Filter class CCFaceSynthesisFilter : public Algo::MR::Filter
{ {
protected: protected:
typename PFP::MAP& m_map ; typename PFP::MAP& m_map ;
...@@ -218,7 +218,7 @@ public: ...@@ -218,7 +218,7 @@ public:
} ; } ;
template <typename PFP> template <typename PFP>
class CCVertexSynthesisFilter : public Filter class CCVertexSynthesisFilter : public Algo::MR::Filter
{ {
protected: protected:
typename PFP::MAP& m_map ; typename PFP::MAP& m_map ;
...@@ -275,7 +275,7 @@ public: ...@@ -275,7 +275,7 @@ public:
} ; } ;
template <typename PFP> template <typename PFP>
class CCScalingSynthesisFilter : public Filter class CCScalingSynthesisFilter : public Algo::MR::Filter
{ {
protected: protected:
typename PFP::MAP& m_map ; typename PFP::MAP& m_map ;
...@@ -313,7 +313,7 @@ public: ...@@ -313,7 +313,7 @@ public:
} ; } ;
template <typename PFP> template <typename PFP>
class CCScalingAnalysisFilter : public Filter class CCScalingAnalysisFilter : public Algo::MR::Filter
{ {
protected: protected:
typename PFP::MAP& m_map ; typename PFP::MAP& m_map ;
...@@ -351,7 +351,7 @@ public: ...@@ -351,7 +351,7 @@ public:
} ; } ;
template <typename PFP> template <typename PFP>
class CCVertexAnalysisFilter : public Filter class CCVertexAnalysisFilter : public Algo::MR::Filter
{ {
protected: protected:
typename PFP::MAP& m_map ; typename PFP::MAP& m_map ;
...@@ -410,7 +410,7 @@ public: ...@@ -410,7 +410,7 @@ public:
} ; } ;
template <typename PFP> template <typename PFP>
class CCFaceAnalysisFilter : public Filter class CCFaceAnalysisFilter : public Algo::MR::Filter
{ {
protected: protected:
typename PFP::MAP& m_map ; typename PFP::MAP& m_map ;
...@@ -463,7 +463,7 @@ public: ...@@ -463,7 +463,7 @@ public:
} ; } ;
template <typename PFP> template <typename PFP>
class CCEdgeAnalysisFilter : public Filter class CCEdgeAnalysisFilter : public Algo::MR::Filter
{ {
protected: protected:
typename PFP::MAP& m_map ; typename PFP::MAP& m_map ;
......
...@@ -52,7 +52,7 @@ namespace Filters ...@@ -52,7 +52,7 @@ namespace Filters
// Quad refinement // Quad refinement
template <typename PFP> template <typename PFP>
class LerpQuadOddSynthesisFilter : public Filter class LerpQuadOddSynthesisFilter : public Algo::MR::Filter
{ {
protected: protected:
typename PFP::MAP& m_map ; typename PFP::MAP& m_map ;
...@@ -106,7 +106,7 @@ public: ...@@ -106,7 +106,7 @@ public:
// Tri/quad refinement // Tri/quad refinement
template <typename PFP> template <typename PFP>
class LerpTriQuadOddSynthesisFilter : public Filter class LerpTriQuadOddSynthesisFilter : public Algo::MR::Filter
{ {
protected: protected:
typename PFP::MAP& m_map ; typename PFP::MAP& m_map ;
...@@ -167,7 +167,7 @@ public: ...@@ -167,7 +167,7 @@ public:
// Quad refinement // Quad refinement
template <typename PFP> template <typename PFP>
class LerpQuadOddAnalysisFilter : public Filter class LerpQuadOddAnalysisFilter : public Algo::MR::Filter
{ {
protected: protected:
typename PFP::MAP& m_map ; typename PFP::MAP& m_map ;
...@@ -221,7 +221,7 @@ public: ...@@ -221,7 +221,7 @@ public:
// Tri/quad refinement // Tri/quad refinement
template <typename PFP> template <typename PFP>
class LerpTriQuadOddAnalysisFilter : public Filter class LerpTriQuadOddAnalysisFilter : public Algo::MR::Filter
{ {
protected: protected:
typename PFP::MAP& m_map ; typename PFP::MAP& m_map ;
......
...@@ -99,7 +99,7 @@ typename PFP::VEC3 loopEvenVertex(typename PFP::MAP& map, const VertexAttribute< ...@@ -99,7 +99,7 @@ typename PFP::VEC3 loopEvenVertex(typename PFP::MAP& map, const VertexAttribute<
*********************************************************************************/ *********************************************************************************/
template <typename PFP> template <typename PFP>
class LoopOddAnalysisFilter : public Filter class LoopOddAnalysisFilter : public Algo::MR::Filter
{ {
protected: protected:
typename PFP::MAP& m_map ; typename PFP::MAP& m_map ;
...@@ -132,7 +132,7 @@ public: ...@@ -132,7 +132,7 @@ public:
} ; } ;
template <typename PFP> template <typename PFP>
class LoopEvenAnalysisFilter : public Filter class LoopEvenAnalysisFilter : public Algo::MR::Filter
{ {
protected: protected:
typename PFP::MAP& m_map ; typename PFP::MAP& m_map ;
...@@ -159,7 +159,7 @@ public: ...@@ -159,7 +159,7 @@ public:
} ; } ;
template <typename PFP> template <typename PFP>
class LoopNormalisationAnalysisFilter : public Filter class LoopNormalisationAnalysisFilter : public Algo::MR::Filter
{ {
protected: protected:
typename PFP::MAP& m_map ; typename PFP::MAP& m_map ;
...@@ -193,7 +193,7 @@ public: ...@@ -193,7 +193,7 @@ public:
*********************************************************************************/ *********************************************************************************/
template <typename PFP> template <typename PFP>
class LoopOddSynthesisFilter : public Filter class LoopOddSynthesisFilter : public Algo::MR::Filter
{ {
protected: protected:
typename PFP::MAP& m_map ; typename PFP::MAP& m_map ;
...@@ -226,7 +226,7 @@ public: ...@@ -226,7 +226,7 @@ public:
} ; } ;
template <typename PFP> template <typename PFP>
class LoopEvenSynthesisFilter : public Filter class LoopEvenSynthesisFilter : public Algo::MR::Filter
{ {
protected: protected:
typename PFP::MAP& m_map ; typename PFP::MAP& m_map ;
...@@ -253,7 +253,7 @@ public: ...@@ -253,7 +253,7 @@ public:
} ; } ;
template <typename PFP> template <typename PFP>
class LoopNormalisationSynthesisFilter : public Filter class LoopNormalisationSynthesisFilter : public Algo::MR::Filter
{ {
protected: protected:
typename PFP::MAP& m_map ; typename PFP::MAP& m_map ;
......
...@@ -52,7 +52,7 @@ namespace Filters ...@@ -52,7 +52,7 @@ namespace Filters
template <typename PFP> template <typename PFP>
class Sqrt2FaceSynthesisFilter : public Filter class Sqrt2FaceSynthesisFilter : public Algo::MR::Filter
{ {
protected: protected:
typename PFP::MAP& m_map ; typename PFP::MAP& m_map ;
......
...@@ -103,7 +103,7 @@ inline double omega0(unsigned int n) ...@@ -103,7 +103,7 @@ inline double omega0(unsigned int n)
*********************************************************************************/ *********************************************************************************/
template <typename PFP> template <typename PFP>
class Sqrt3FaceSynthesisFilter : public Filter class Sqrt3FaceSynthesisFilter : public Algo::MR::Filter
{ {
protected: protected:
typename PFP::MAP& m_map ; typename PFP::MAP& m_map ;
...@@ -152,7 +152,7 @@ public: ...@@ -152,7 +152,7 @@ public:
} ; } ;
template <typename PFP> template <typename PFP>
class Sqrt3VertexSynthesisFilter : public Filter class Sqrt3VertexSynthesisFilter : public Algo::MR::Filter
{ {
protected: protected:
typename PFP::MAP& m_map ; typename PFP::MAP& m_map ;
...@@ -241,7 +241,7 @@ public: ...@@ -241,7 +241,7 @@ public:
} ; } ;
template <typename PFP> template <typename PFP>
class Sqrt3VertexAnalysisFilter : public Filter class Sqrt3VertexAnalysisFilter : public Algo::MR::Filter
{ {
protected: protected:
typename PFP::MAP& m_map ; typename PFP::MAP& m_map ;
...@@ -296,7 +296,7 @@ public: ...@@ -296,7 +296,7 @@ public:
} ; } ;
template <typename PFP> template <typename PFP>
class Sqrt3FaceAnalysisFilter : public Filter class Sqrt3FaceAnalysisFilter : public Algo::MR::Filter
{ {
protected: protected:
typename PFP::MAP& m_map ; typename PFP::MAP& m_map ;
......
...@@ -59,8 +59,8 @@ protected: ...@@ -59,8 +59,8 @@ protected:
MAP& m_map; MAP& m_map;
bool shareVertexEmbeddings ; bool shareVertexEmbeddings ;
std::vector<Filter*> synthesisFilters ; std::vector<Algo::MR::Filter*> synthesisFilters ;
std::vector<Filter*> analysisFilters ; std::vector<Algo::MR::Filter*> analysisFilters ;
public: public:
Map2MR(MAP& map); Map2MR(MAP& map);
...@@ -70,8 +70,8 @@ public: ...@@ -70,8 +70,8 @@ public:
//if true : tri and quad else quad //if true : tri and quad else quad
void addNewLevel(bool embedNewVertices = true) ; void addNewLevel(bool embedNewVertices = true) ;
void addSynthesisFilter(Filter* f) { synthesisFilters.push_back(f) ; } void addSynthesisFilter(Algo::MR::Filter* f) { synthesisFilters.push_back(f) ; }
void addAnalysisFilter(Filter* f) { analysisFilters.push_back(f) ; } void addAnalysisFilter(Algo::MR::Filter* f) { analysisFilters.push_back(f) ; }
void clearSynthesisFilters() { synthesisFilters.clear() ; } void clearSynthesisFilters() { synthesisFilters.clear() ; }
void clearAnalysisFilters() { analysisFilters.clear() ; } void clearAnalysisFilters() { analysisFilters.clear() ; }
......
...@@ -67,8 +67,8 @@ protected: ...@@ -67,8 +67,8 @@ protected:
MAP& m_map; MAP& m_map;
bool shareVertexEmbeddings ; bool shareVertexEmbeddings ;
std::vector<Filter*> synthesisFilters ; std::vector<Algo::MR::Filter*> synthesisFilters ;
std::vector<Filter*> analysisFilters ; std::vector<Algo::MR::Filter*> analysisFilters ;
FilterType filter; FilterType filter;
unsigned int thresholdLow; unsigned int thresholdLow;
...@@ -86,8 +86,8 @@ public: ...@@ -86,8 +86,8 @@ public:
void addNewLevelSqrt2(); void addNewLevelSqrt2();
void addSynthesisFilter(Filter* f) { synthesisFilters.push_back(f) ; } void addSynthesisFilter(Algo::MR::Filter* f) { synthesisFilters.push_back(f) ; }
void addAnalysisFilter(Filter* f) { analysisFilters.push_back(f) ; } void addAnalysisFilter(Algo::MR::Filter* f) { analysisFilters.push_back(f) ; }
void clearSynthesisFilters() { synthesisFilters.clear() ; } void clearSynthesisFilters() { synthesisFilters.clear() ; }
void clearAnalysisFilters() { analysisFilters.clear() ; } void clearAnalysisFilters() { analysisFilters.clear() ; }
......
...@@ -265,6 +265,7 @@ public: ...@@ -265,6 +265,7 @@ public:
FaceAttribute(GenericMap* m, AttributeMultiVector<T>* amv) : AttributeHandler<T, FACE>(m,amv) {} FaceAttribute(GenericMap* m, AttributeMultiVector<T>* amv) : AttributeHandler<T, FACE>(m,amv) {}
FaceAttribute<T>& operator=(const AttributeHandler<T, FACE>& ah) { this->AttributeHandler<T, FACE>::operator=(ah); return *this; } FaceAttribute<T>& operator=(const AttributeHandler<T, FACE>& ah) { this->AttributeHandler<T, FACE>::operator=(ah); return *this; }
FaceAttribute<T>& operator=(const AttributeHandler<T, VERTEX>& ah) { this->AttributeHandler<T,FACE>::operator=(ah); return *this; } FaceAttribute<T>& operator=(const AttributeHandler<T, VERTEX>& ah) { this->AttributeHandler<T,FACE>::operator=(ah); return *this; }
FaceAttribute<T>& operator=(const AttributeHandler<T, EDGE>& ah) { this->AttributeHandler<T,FACE>::operator=(ah); return *this; } //TODO dangerous
}; };
/** /**
......
...@@ -942,14 +942,14 @@ void Map2::computeDual() ...@@ -942,14 +942,14 @@ void Map2::computeDual()
reverseOrientation() ; reverseOrientation() ;
//boundary management // //boundary management
for(Dart d = begin(); d != end(); next(d)) // for(Dart d = begin(); d != end(); next(d))
{ // {
if(isBoundaryMarked2(d)) // if(isBoundaryMarked2(d))
{ // {
boundaryMarkOrbit<FACE,2>(deleteVertex(phi2(d))); //