Commit 0c3be6e9 authored by Pierre Kraemer's avatar Pierre Kraemer

update MR filters

parent 28b02542
...@@ -44,7 +44,7 @@ inline void nextNonEmptyLine(std::ifstream& fp, std::string& line) ...@@ -44,7 +44,7 @@ inline void nextNonEmptyLine(std::ifstream& fp, std::string& line)
template <typename PFP> template <typename PFP>
bool importMRDAT(typename PFP::MAP& map, const std::string& filename, std::vector<std::string>& attrNames, QuadTree& qt) bool importMRDAT(typename PFP::MAP& map, const std::string& filename, std::vector<std::string>& attrNames, QuadTree& qt)
{ {
VertexAttribute<typename PFP::VEC3> position = map.template getAttribute<typename PFP::VEC3, VERTEX>("position") ; VertexAttribute<typename PFP::VEC3, typename PFP::MAP::IMPL> position = map.template getAttribute<typename PFP::VEC3, VERTEX>("position") ;
if (!position.isValid()) if (!position.isValid())
position = map.template addAttribute<typename PFP::VEC3, VERTEX>("position") ; position = map.template addAttribute<typename PFP::VEC3, VERTEX>("position") ;
...@@ -193,8 +193,8 @@ bool importMRDAT(typename PFP::MAP& map, const std::string& filename, std::vecto ...@@ -193,8 +193,8 @@ bool importMRDAT(typename PFP::MAP& map, const std::string& filename, std::vecto
std::cout << " Create base level mesh.." << std::flush ; std::cout << " Create base level mesh.." << std::flush ;
VertexAutoAttribute< NoTypeNameAttribute< std::vector<Dart> > > vecDartsPerVertex(map, "incidents") ; VertexAutoAttribute<NoTypeNameAttribute<std::vector<Dart> >, typename PFP::MAP::IMPL> vecDartsPerVertex(map, "incidents") ;
DartMarkerNoUnmark m(map) ; DartMarkerNoUnmark<typename PFP::MAP> m(map) ;
unsigned nbf = qt.roots.size() ; unsigned nbf = qt.roots.size() ;
...@@ -237,7 +237,7 @@ bool importMRDAT(typename PFP::MAP& map, const std::string& filename, std::vecto ...@@ -237,7 +237,7 @@ bool importMRDAT(typename PFP::MAP& map, const std::string& filename, std::vecto
if (good_dart != NIL) if (good_dart != NIL)
{ {
map.sewFaces(d, good_dart, false) ; map.sewFaces(d, good_dart, false) ;
m.unmarkOrbit<EDGE>(d) ; m.template unmarkOrbit<EDGE>(d) ;
} }
else else
{ {
......
...@@ -762,7 +762,7 @@ void computeBoundaryConstraintDual(typename PFP::MAP& map, VertexAttribute<typen ...@@ -762,7 +762,7 @@ void computeBoundaryConstraintDual(typename PFP::MAP& map, VertexAttribute<typen
DartMarkerStore<MAP> mf(map); DartMarkerStore<MAP> mf(map);
for(Dart dit = map.begin() ; dit != map.end() ; map.next(dit)) for(Dart dit = map.begin() ; dit != map.end() ; map.next(dit))
{ {
if(!mf.isMarked(dit) && map.isBoundaryMarked2(dit)) if(!mf.isMarked(dit) && map.template isBoundaryMarked<2>(dit))
{ {
boundsDart.push_back(dit); boundsDart.push_back(dit);
Dart db = dit; Dart db = dit;
...@@ -772,7 +772,7 @@ void computeBoundaryConstraintDual(typename PFP::MAP& map, VertexAttribute<typen ...@@ -772,7 +772,7 @@ void computeBoundaryConstraintDual(typename PFP::MAP& map, VertexAttribute<typen
map.cutEdge(map.phi_1(db)) ; map.cutEdge(map.phi_1(db)) ;
positionF[dit] = (position[dit] + position[map.phi2(dit)]) * REAL(0.5); positionF[dit] = (position[dit] + position[map.phi2(dit)]) * REAL(0.5);
mf.markOrbit<FACE>(dit); mf.template markOrbit<FACE>(dit);
Dart x = map.phi2(map.phi_1(db)) ; Dart x = map.phi2(map.phi_1(db)) ;
Dart dd = map.phi1(map.phi1(map.phi1(x))); Dart dd = map.phi1(map.phi1(map.phi1(x)));
...@@ -782,12 +782,12 @@ void computeBoundaryConstraintDual(typename PFP::MAP& map, VertexAttribute<typen ...@@ -782,12 +782,12 @@ void computeBoundaryConstraintDual(typename PFP::MAP& map, VertexAttribute<typen
Dart prev = map.phi_1(dd); Dart prev = map.phi_1(dd);
map.splitFace(dd, map.phi1(x)) ; map.splitFace(dd, map.phi1(x)) ;
positionF[prev] = (position[prev] + position[map.phi1(prev)]) * REAL(0.5); positionF[prev] = (position[prev] + position[map.phi1(prev)]) * REAL(0.5);
mf.markOrbit<FACE>(prev); mf.template markOrbit<FACE>(prev);
dd = next ; dd = next ;
} }
positionF[dprev] = (position[dprev] + position[map.phi1(dprev)]) * REAL(0.5); positionF[dprev] = (position[dprev] + position[map.phi1(dprev)]) * REAL(0.5);
mf.markOrbit<FACE>(dprev); mf.template markOrbit<FACE>(dprev);
} }
} }
...@@ -797,10 +797,10 @@ void computeBoundaryConstraintDual(typename PFP::MAP& map, VertexAttribute<typen ...@@ -797,10 +797,10 @@ void computeBoundaryConstraintDual(typename PFP::MAP& map, VertexAttribute<typen
// Fill the holes // Fill the holes
for(Dart dit = map.begin() ; dit != map.end() ; map.next(dit)) for(Dart dit = map.begin() ; dit != map.end() ; map.next(dit))
{ {
if(mf.isMarked(dit) && map.isBoundaryMarked2(dit)) if(mf.isMarked(dit) && map.template isBoundaryMarked<2>(dit))
{ {
map.fillHole(dit); map.fillHole(dit);
mf.unmarkOrbit<FACE>(dit); mf.template unmarkOrbit<FACE>(dit);
} }
} }
...@@ -833,7 +833,7 @@ void computeBoundaryConstraintKeepingOldVerticesDual(typename PFP::MAP& map, Ver ...@@ -833,7 +833,7 @@ void computeBoundaryConstraintKeepingOldVerticesDual(typename PFP::MAP& map, Ver
DartMarkerStore<MAP> mf(map); DartMarkerStore<MAP> mf(map);
for(Dart dit = map.begin() ; dit != map.end() ; map.next(dit)) for(Dart dit = map.begin() ; dit != map.end() ; map.next(dit))
{ {
if(!mf.isMarked(dit) && map.isBoundaryMarked2(dit)) if(!mf.isMarked(dit) && map.template isBoundaryMarked<2>(dit))
{ {
boundsDart.push_back(dit); boundsDart.push_back(dit);
Dart db = dit; Dart db = dit;
...@@ -843,7 +843,7 @@ void computeBoundaryConstraintKeepingOldVerticesDual(typename PFP::MAP& map, Ver ...@@ -843,7 +843,7 @@ void computeBoundaryConstraintKeepingOldVerticesDual(typename PFP::MAP& map, Ver
map.cutEdge(map.phi_1(db)) ; map.cutEdge(map.phi_1(db)) ;
positionF[dit] = (position[dit] + position[map.phi2(dit)]) * REAL(0.5); positionF[dit] = (position[dit] + position[map.phi2(dit)]) * REAL(0.5);
mf.markOrbit<FACE>(dit); mf.template markOrbit<FACE>(dit);
Dart x = map.phi2(map.phi_1(db)) ; Dart x = map.phi2(map.phi_1(db)) ;
Dart dd = map.phi1(map.phi1(map.phi1(x))); Dart dd = map.phi1(map.phi1(map.phi1(x)));
...@@ -853,12 +853,12 @@ void computeBoundaryConstraintKeepingOldVerticesDual(typename PFP::MAP& map, Ver ...@@ -853,12 +853,12 @@ void computeBoundaryConstraintKeepingOldVerticesDual(typename PFP::MAP& map, Ver
Dart prev = map.phi_1(dd); Dart prev = map.phi_1(dd);
map.splitFace(dd, map.phi1(x)) ; map.splitFace(dd, map.phi1(x)) ;
positionF[prev] = (position[prev] + position[map.phi1(prev)]) * REAL(0.5); positionF[prev] = (position[prev] + position[map.phi1(prev)]) * REAL(0.5);
mf.markOrbit<FACE>(prev); mf.template markOrbit<FACE>(prev);
dd = next ; dd = next ;
} }
positionF[dprev] = (position[dprev] + position[map.phi1(dprev)]) * REAL(0.5); positionF[dprev] = (position[dprev] + position[map.phi1(dprev)]) * REAL(0.5);
mf.markOrbit<FACE>(dprev); mf.template markOrbit<FACE>(dprev);
} }
} }
...@@ -868,10 +868,10 @@ void computeBoundaryConstraintKeepingOldVerticesDual(typename PFP::MAP& map, Ver ...@@ -868,10 +868,10 @@ void computeBoundaryConstraintKeepingOldVerticesDual(typename PFP::MAP& map, Ver
// Fill the holes // Fill the holes
for(Dart dit = map.begin() ; dit != map.end() ; map.next(dit)) for(Dart dit = map.begin() ; dit != map.end() ; map.next(dit))
{ {
if(mf.isMarked(dit) && map.isBoundaryMarked2(dit)) if(mf.isMarked(dit) && map.template isBoundaryMarked<2>(dit))
{ {
map.fillHole(dit); map.fillHole(dit);
mf.unmarkOrbit<FACE>(dit); mf.template unmarkOrbit<FACE>(dit);
} }
} }
...@@ -893,12 +893,12 @@ void computeBoundaryConstraintKeepingOldVerticesDual(typename PFP::MAP& map, Ver ...@@ -893,12 +893,12 @@ void computeBoundaryConstraintKeepingOldVerticesDual(typename PFP::MAP& map, Ver
// Manage old vertices with new FaceAttribute // Manage old vertices with new FaceAttribute
for(Dart dit = map.begin() ; dit != map.end() ; map.next(dit)) for(Dart dit = map.begin() ; dit != map.end() ; map.next(dit))
{ {
if(!mf.isMarked(dit) && map.isBoundaryMarked2(dit)) if(!mf.isMarked(dit) && map.template isBoundaryMarked<2>(dit))
{ {
Dart nd = map.cutEdge(dit); Dart nd = map.cutEdge(dit);
position[nd] = positionF[map.phi2(dit)]; position[nd] = positionF[map.phi2(dit)];
mf.markOrbit<EDGE>(dit); mf.template markOrbit<EDGE>(dit);
mf.markOrbit<EDGE>(nd); mf.template markOrbit<EDGE>(nd);
} }
} }
} }
......
...@@ -48,17 +48,22 @@ namespace Filters ...@@ -48,17 +48,22 @@ namespace Filters
template <typename PFP> template <typename PFP>
class CCVertexSynthesisFilter : public Algo::MR::Filter class CCVertexSynthesisFilter : public Algo::MR::Filter
{ {
typedef typename PFP::MAP MAP;
typedef typename PFP::MAP::IMPL MAP_IMPL;
typedef typename PFP::VEC3 VEC3;
typedef typename PFP::REAL REAL;
protected: protected:
typename PFP::MAP& m_map ; MAP& m_map ;
VertexAttribute<typename PFP::VEC3>& m_position ; VertexAttribute<VEC3, MAP_IMPL>& m_position ;
public: public:
CCVertexSynthesisFilter(typename PFP::MAP& m, VertexAttribute<typename PFP::VEC3>& p) : m_map(m), m_position(p) CCVertexSynthesisFilter(MAP& m, VertexAttribute<VEC3, MAP_IMPL>& p) : m_map(m), m_position(p)
{} {}
void operator() () void operator() ()
{ {
TraversorV<typename PFP::MAP> trav(m_map) ; TraversorV<MAP> trav(m_map) ;
for (Dart dV = trav.begin(); dV != trav.end(); dV = trav.next()) for (Dart dV = trav.begin(); dV != trav.end(); dV = trav.next())
{ {
m_map.incCurrentLevel() ; m_map.incCurrentLevel() ;
...@@ -69,11 +74,11 @@ public: ...@@ -69,11 +74,11 @@ public:
{ {
Dart d = m_map.phi1(m_map.phi2(m_map.phi1(m_map.phi2(dit)))); Dart d = m_map.phi1(m_map.phi2(m_map.phi1(m_map.phi2(dit))));
unsigned int degree = m_map.faceDegree(d); unsigned int degree = m_map.faceDegree(d);
typename PFP::VEC3 p(0.0); VEC3 p(0.0);
typename PFP::REAL a0 = 1.0 / 2.0 + 1.0 / (4.0 * typename PFP::REAL(degree)); REAL a0 = 1.0 / 2.0 + 1.0 / (4.0 * REAL(degree));
typename PFP::REAL a1 = 1.0 / 8.0 + 1.0 / (4.0 * typename PFP::REAL(degree)); REAL a1 = 1.0 / 8.0 + 1.0 / (4.0 * REAL(degree));
typename PFP::REAL ak_1 = a1; REAL ak_1 = a1;
if(degree == 3) if(degree == 3)
{ {
...@@ -86,7 +91,7 @@ public: ...@@ -86,7 +91,7 @@ public:
} }
else if(degree == 4) else if(degree == 4)
{ {
typename PFP::REAL a2 = 1.0 / (4.0 * typename PFP::REAL(degree)); REAL a2 = 1.0 / (4.0 * REAL(degree));
p += a0 * m_position[d] + a1 * m_position[m_map.phi1(d)] + a2 * m_position[m_map.phi1(m_map.phi1(d))] + ak_1 * m_position[m_map.phi_1(d)]; p += a0 * m_position[d] + a1 * m_position[m_map.phi1(d)] + a2 * m_position[m_map.phi1(m_map.phi1(d))] + ak_1 * m_position[m_map.phi_1(d)];
...@@ -102,7 +107,7 @@ public: ...@@ -102,7 +107,7 @@ public:
Dart dit = m_map.phi1(m_map.phi1(d)); Dart dit = m_map.phi1(m_map.phi1(d));
do do
{ {
typename PFP::REAL ai = 1.0 / (4.0 * typename PFP::REAL(degree)); REAL ai = 1.0 / (4.0 * REAL(degree));
p += ai * m_position[dit]; p += ai * m_position[dit];
dit = m_map.phi1(dit); dit = m_map.phi1(dit);
...@@ -125,7 +130,6 @@ public: ...@@ -125,7 +130,6 @@ public:
} }
} ; } ;
} // namespace Masks } // namespace Masks
} // namespace Primal } // namespace Primal
...@@ -139,4 +143,3 @@ public: ...@@ -139,4 +143,3 @@ public:
} // namespace CGoGN } // namespace CGoGN
#endif #endif
...@@ -48,28 +48,33 @@ namespace Filters ...@@ -48,28 +48,33 @@ namespace Filters
template <typename PFP> template <typename PFP>
class DooSabinVertexSynthesisFilter : public Algo::MR::Filter class DooSabinVertexSynthesisFilter : public Algo::MR::Filter
{ {
typedef typename PFP::MAP MAP;
typedef typename PFP::MAP::IMPL MAP_IMPL;
typedef typename PFP::VEC3 VEC3;
typedef typename PFP::REAL REAL;
protected: protected:
typename PFP::MAP& m_map ; MAP& m_map ;
VertexAttribute<typename PFP::VEC3>& m_position ; VertexAttribute<VEC3, MAP_IMPL>& m_position ;
public: public:
DooSabinVertexSynthesisFilter(typename PFP::MAP& m, VertexAttribute<typename PFP::VEC3>& p) : m_map(m), m_position(p) DooSabinVertexSynthesisFilter(MAP& m, VertexAttribute<VEC3, MAP_IMPL>& p) : m_map(m), m_position(p)
{} {}
void operator() () void operator() ()
{ {
for (Dart dV = m_map.begin(); dV != m_map.end(); m_map.next(dV)) for (Dart dV = m_map.begin(); dV != m_map.end(); m_map.next(dV))
{ {
typename PFP::VEC3 p(0.0); VEC3 p(0.0);
unsigned int N = m_map.faceDegree(dV); unsigned int N = m_map.faceDegree(dV);
typename PFP::REAL K0 = float(N+5)/float(4*N);//(1.0 / 4.0) + (5.0 / 4.0) * double(N); REAL K0 = float(N+5)/float(4*N);//(1.0 / 4.0) + (5.0 / 4.0) * double(N);
p += K0 * m_position[dV]; p += K0 * m_position[dV];
unsigned int j = 1; unsigned int j = 1;
Dart tmp = m_map.phi1(dV); Dart tmp = m_map.phi1(dV);
do do
{ {
typename PFP::REAL Kj = (3.0 + 2.0 * cos(2.0 * double(j) * M_PI / double(N))) / (4.0 * N); REAL Kj = (3.0 + 2.0 * cos(2.0 * double(j) * M_PI / double(N))) / (4.0 * N);
p += Kj * m_position[tmp]; p += Kj * m_position[tmp];
tmp = m_map.phi1(tmp); tmp = m_map.phi1(tmp);
++j; ++j;
...@@ -84,7 +89,6 @@ public: ...@@ -84,7 +89,6 @@ public:
} }
} ; } ;
} // namespace Masks } // namespace Masks
} // namespace Primal } // namespace Primal
...@@ -98,4 +102,3 @@ public: ...@@ -98,4 +102,3 @@ public:
} // namespace CGoGN } // namespace CGoGN
#endif #endif
...@@ -56,21 +56,25 @@ namespace Filters ...@@ -56,21 +56,25 @@ namespace Filters
template <typename PFP> template <typename PFP>
class Ber02OddAnalysisFilter : public Algo::MR::Filter class Ber02OddAnalysisFilter : public Algo::MR::Filter
{ {
typedef typename PFP::MAP MAP;
typedef typename PFP::MAP::IMPL MAP_IMPL;
typedef typename PFP::VEC3 VEC3;
protected: protected:
typename PFP::MAP& m_map ; MAP& m_map ;
VertexAttribute<typename PFP::VEC3>& m_position ; VertexAttribute<VEC3, MAP_IMPL>& m_position ;
typename PFP::VEC3::DATA_TYPE m_a; typename VEC3::DATA_TYPE m_a;
public: public:
Ber02OddAnalysisFilter(typename PFP::MAP& m, VertexAttribute<typename PFP::VEC3>& p, typename PFP::VEC3::DATA_TYPE a) : m_map(m), m_position(p), m_a(a) Ber02OddAnalysisFilter(MAP& m, VertexAttribute<VEC3, MAP_IMPL>& p, typename VEC3::DATA_TYPE a) : m_map(m), m_position(p), m_a(a)
{} {}
void operator() () void operator() ()
{ {
TraversorE<typename PFP::MAP> travE(m_map) ; TraversorE<MAP> travE(m_map) ;
for (Dart d = travE.begin(); d != travE.end(); d = travE.next()) for (Dart d = travE.begin(); d != travE.end(); d = travE.next())
{ {
typename PFP::VEC3 ve = (m_position[d] + m_position[m_map.phi1(d)]) * typename PFP::REAL(0.5); VEC3 ve = (m_position[d] + m_position[m_map.phi1(d)]) * typename PFP::REAL(0.5);
ve *= 2.0 * m_a; ve *= 2.0 * m_a;
m_map.incCurrentLevel() ; m_map.incCurrentLevel() ;
...@@ -79,14 +83,14 @@ public: ...@@ -79,14 +83,14 @@ public:
m_map.decCurrentLevel() ; m_map.decCurrentLevel() ;
} }
TraversorF<typename PFP::MAP> travF(m_map) ; TraversorF<MAP> travF(m_map) ;
for (Dart d = travF.begin(); d != travF.end(); d = travF.next()) for (Dart d = travF.begin(); d != travF.end(); d = travF.next())
{ {
typename PFP::VEC3 vf(0.0); VEC3 vf(0.0);
typename PFP::VEC3 ef(0.0); VEC3 ef(0.0);
unsigned int count = 0; unsigned int count = 0;
Traversor2FE<typename PFP::MAP> travFE(m_map, d); Traversor2FE<MAP> travFE(m_map, d);
for (Dart dit = travFE.begin(); dit != travFE.end(); dit = travFE.next()) for (Dart dit = travFE.begin(); dit != travFE.end(); dit = travFE.next())
{ {
vf += m_position[dit]; vf += m_position[dit];
...@@ -113,26 +117,30 @@ public: ...@@ -113,26 +117,30 @@ public:
template <typename PFP> template <typename PFP>
class Ber02EvenAnalysisFilter : public Algo::MR::Filter class Ber02EvenAnalysisFilter : public Algo::MR::Filter
{ {
typedef typename PFP::MAP MAP;
typedef typename PFP::MAP::IMPL MAP_IMPL;
typedef typename PFP::VEC3 VEC3;
protected: protected:
typename PFP::MAP& m_map ; MAP& m_map ;
VertexAttribute<typename PFP::VEC3>& m_position ; VertexAttribute<VEC3, MAP_IMPL>& m_position ;
typename PFP::VEC3::DATA_TYPE m_a; typename VEC3::DATA_TYPE m_a;
public: public:
Ber02EvenAnalysisFilter(typename PFP::MAP& m, VertexAttribute<typename PFP::VEC3>& p, typename PFP::VEC3::DATA_TYPE a) : m_map(m), m_position(p), m_a(a) Ber02EvenAnalysisFilter(MAP& m, VertexAttribute<VEC3, MAP_IMPL>& p, typename VEC3::DATA_TYPE a) : m_map(m), m_position(p), m_a(a)
{} {}
void operator() () void operator() ()
{ {
TraversorE<typename PFP::MAP> travE(m_map); TraversorE<MAP> travE(m_map);
for(Dart d = travE.begin() ; d != travE.end() ; d = travE.next()) for(Dart d = travE.begin() ; d != travE.end() ; d = travE.next())
{ {
if(!m_map.isBoundaryEdge(d)) if(!m_map.isBoundaryEdge(d))
{ {
unsigned int count = 0; unsigned int count = 0;
typename PFP::VEC3 fe(0); VEC3 fe(0);
Traversor2EF<typename PFP::MAP> travEF(m_map, d); Traversor2EF<MAP> travEF(m_map, d);
for(Dart dit = travEF.begin() ; dit != travEF.end() ; dit = travEF.next()) for(Dart dit = travEF.begin() ; dit != travEF.end() ; dit = travEF.next())
{ {
m_map.incCurrentLevel() ; m_map.incCurrentLevel() ;
...@@ -152,11 +160,11 @@ public: ...@@ -152,11 +160,11 @@ public:
} }
} }
TraversorV<typename PFP::MAP> travV(m_map); TraversorV<MAP> travV(m_map);
for(Dart d = travV.begin() ; d != travV.end() ; d = travV.next()) for(Dart d = travV.begin() ; d != travV.end() ; d = travV.next())
{ {
typename PFP::VEC3 ev(0.0); VEC3 ev(0.0);
typename PFP::VEC3 fv(0.0); VEC3 fv(0.0);
if(m_map.isBoundaryVertex(d)) if(m_map.isBoundaryVertex(d))
{ {
Dart db = m_map.findBoundaryEdgeOfVertex(d); Dart db = m_map.findBoundaryEdgeOfVertex(d);
...@@ -173,7 +181,7 @@ public: ...@@ -173,7 +181,7 @@ public:
{ {
unsigned int count = 0; unsigned int count = 0;
Traversor2VF<typename PFP::MAP> travVF(m_map,d); Traversor2VF<MAP> travVF(m_map,d);
for(Dart dit = travVF.begin(); dit != travVF.end() ; dit = travVF.next()) for(Dart dit = travVF.begin(); dit != travVF.end() ; dit = travVF.next())
{ {
m_map.incCurrentLevel() ; m_map.incCurrentLevel() ;
...@@ -201,18 +209,22 @@ public: ...@@ -201,18 +209,22 @@ public:
template <typename PFP> template <typename PFP>
class Ber02ScaleAnalysisFilter : public Algo::MR::Filter class Ber02ScaleAnalysisFilter : public Algo::MR::Filter
{ {
typedef typename PFP::MAP MAP;
typedef typename PFP::MAP::IMPL MAP_IMPL;
typedef typename PFP::VEC3 VEC3;
protected: protected:
typename PFP::MAP& m_map ; MAP& m_map ;
VertexAttribute<typename PFP::VEC3>& m_position ; VertexAttribute<VEC3, MAP_IMPL>& m_position ;
typename PFP::VEC3::DATA_TYPE m_a; typename VEC3::DATA_TYPE m_a;
public: public:
Ber02ScaleAnalysisFilter(typename PFP::MAP& m, VertexAttribute<typename PFP::VEC3>& p, typename PFP::VEC3::DATA_TYPE a) : m_map(m), m_position(p), m_a(a) Ber02ScaleAnalysisFilter(MAP& m, VertexAttribute<VEC3, MAP_IMPL>& p, typename VEC3::DATA_TYPE a) : m_map(m), m_position(p), m_a(a)
{} {}
void operator() () void operator() ()
{ {
TraversorE<typename PFP::MAP> travE(m_map) ; TraversorE<MAP> travE(m_map) ;
for (Dart d = travE.begin(); d != travE.end(); d = travE.next()) for (Dart d = travE.begin(); d != travE.end(); d = travE.next())
{ {
m_map.incCurrentLevel() ; m_map.incCurrentLevel() ;
...@@ -222,7 +234,7 @@ public: ...@@ -222,7 +234,7 @@ public:
m_map.decCurrentLevel() ; m_map.decCurrentLevel() ;
} }
TraversorV<typename PFP::MAP> travV(m_map) ; TraversorV<MAP> travV(m_map) ;
for (Dart d = travV.begin(); d != travV.end(); d = travV.next()) for (Dart d = travV.begin(); d != travV.end(); d = travV.next())
{ {
if(m_map.isBoundaryVertex(d)) if(m_map.isBoundaryVertex(d))
...@@ -243,26 +255,30 @@ public: ...@@ -243,26 +255,30 @@ public:
template <typename PFP> template <typename PFP>
class Ber02OddSynthesisFilter : public Algo::MR::Filter class Ber02OddSynthesisFilter : public Algo::MR::Filter
{ {
typedef typename PFP::MAP MAP;
typedef typename PFP::MAP::IMPL MAP_IMPL;
typedef typename PFP::VEC3 VEC3;
protected: protected:
typename PFP::MAP& m_map ; MAP& m_map ;
VertexAttribute<typename PFP::VEC3>& m_position ; VertexAttribute<VEC3, MAP_IMPL>& m_position ;
typename PFP::VEC3::DATA_TYPE m_a; typename VEC3::DATA_TYPE m_a;
public: public:
Ber02OddSynthesisFilter(typename PFP::MAP& m, VertexAttribute<typename PFP::VEC3>& p, typename PFP::VEC3::DATA_TYPE a) : m_map(m), m_position(p), m_a(a) Ber02OddSynthesisFilter(MAP& m, VertexAttribute<VEC3, MAP_IMPL>& p, typename VEC3::DATA_TYPE a) : m_map(m), m_position(p), m_a(a)
{} {}
void operator() () void operator() ()
{ {
TraversorF<typename PFP::MAP> travF(m_map) ; TraversorF<MAP> travF(m_map) ;
for (Dart d = travF.begin(); d != travF.end(); d = travF.next()) for (Dart d = travF.begin(); d != travF.end(); d = travF.next())
{ {
typename PFP::VEC3 vf(0.0); VEC3 vf(0.0);
typename PFP::VEC3 ef(0.0); VEC3 ef(0.0);