Commit 4b26d77d authored by Pierre Kraemer's avatar Pierre Kraemer

orbit as template -> remeshing

parent 0ba912f1
...@@ -99,7 +99,7 @@ public: ...@@ -99,7 +99,7 @@ public:
protected: protected:
AttributeHandler<VEC3, VERTEX> m_position ; AttributeHandler<VEC3, VERTEX> m_position ;
AttributeHandler<VEC3, VERTEX> m_approxPosition ; AttributeHandler<VEC3, EDGE> m_approxPosition ;
public: public:
Approximator_Frame(MAP& m, AttributeHandler<MATRIX33, VERTEX>& frame, Predictor<PFP, MATRIX33>* pred = NULL) : Approximator_Frame(MAP& m, AttributeHandler<MATRIX33, VERTEX>& frame, Predictor<PFP, MATRIX33>* pred = NULL) :
......
...@@ -128,8 +128,8 @@ void Approximator_RGBfunctionsHalf<PFP>::approximate(Dart d) ...@@ -128,8 +128,8 @@ void Approximator_RGBfunctionsHalf<PFP>::approximate(Dart d)
template <typename PFP> template <typename PFP>
bool Approximator_Frame<PFP>::init() bool Approximator_Frame<PFP>::init()
{ {
m_position = this->m_map.template getAttribute<VEC3>(VERTEX, "position") ; m_position = this->m_map.template getAttribute<VEC3, VERTEX>("position") ;
m_approxPosition = this->m_map.template getAttribute<VEC3>(EDGE, "approx_position") ; m_approxPosition = this->m_map.template getAttribute<VEC3, EDGE>("approx_position") ;
if (!m_position.isValid() || !m_approxPosition.isValid()) if (!m_position.isValid() || !m_approxPosition.isValid())
{ {
......
...@@ -35,7 +35,7 @@ namespace Remeshing ...@@ -35,7 +35,7 @@ namespace Remeshing
{ {
template <typename PFP> template <typename PFP>
void pliantRemeshing(typename PFP::MAP& map, typename PFP::TVEC3& position, typename PFP::TVEC3& normal) ; void pliantRemeshing(typename PFP::MAP& map, AttributeHandler<typename PFP::VEC3, VERTEX>& position, AttributeHandler<typename PFP::VEC3, VERTEX>& normal) ;
} // namespace Remeshing } // namespace Remeshing
......
...@@ -35,7 +35,7 @@ namespace Remeshing ...@@ -35,7 +35,7 @@ namespace Remeshing
{ {
template <typename PFP> template <typename PFP>
void pliantRemeshing(typename PFP::MAP& map, typename PFP::TVEC3& position, typename PFP::TVEC3& normal) void pliantRemeshing(typename PFP::MAP& map, AttributeHandler<typename PFP::VEC3, VERTEX>& position, AttributeHandler<typename PFP::VEC3, VERTEX>& normal)
{ {
typedef typename PFP::VEC3 VEC3 ; typedef typename PFP::VEC3 VEC3 ;
typedef typename PFP::REAL REAL ; typedef typename PFP::REAL REAL ;
...@@ -81,12 +81,12 @@ void pliantRemeshing(typename PFP::MAP& map, typename PFP::TVEC3& position, type ...@@ -81,12 +81,12 @@ void pliantRemeshing(typename PFP::MAP& map, typename PFP::TVEC3& position, type
} }
// compute feature edges // compute feature edges
CellMarker featureEdge(map, EDGE) ; CellMarker<EDGE> featureEdge(map) ;
Algo::Geometry::featureEdgeDetection<PFP>(map, position, featureEdge) ; Algo::Geometry::featureEdgeDetection<PFP>(map, position, featureEdge) ;
// compute feature vertices // compute feature vertices
CellMarker featureVertex(map, VERTEX) ; CellMarker<VERTEX> featureVertex(map) ;
CellMarker cornerVertex(map, VERTEX) ; CellMarker<VERTEX> cornerVertex(map) ;
DartMarker m3(map) ; DartMarker m3(map) ;
for(Dart d = map.begin(); d != map.end(); map.next(d)) for(Dart d = map.begin(); d != map.end(); map.next(d))
{ {
...@@ -178,10 +178,10 @@ void pliantRemeshing(typename PFP::MAP& map, typename PFP::TVEC3& position, type ...@@ -178,10 +178,10 @@ void pliantRemeshing(typename PFP::MAP& map, typename PFP::TVEC3& position, type
Algo::Geometry::computeNormalVertices<PFP>(map, position, normal) ; Algo::Geometry::computeNormalVertices<PFP>(map, position, normal) ;
// tangential relaxation // tangential relaxation
AttributeHandler<VEC3> centroid = map.template addAttribute<VEC3>(VERTEX, "centroid") ; AttributeHandler<VEC3, VERTEX> centroid = map.template addAttribute<VEC3, VERTEX>("centroid") ;
Algo::Geometry::computeNeighborhoodCentroidVertices<PFP>(map, position, centroid) ; Algo::Geometry::computeNeighborhoodCentroidVertices<PFP>(map, position, centroid) ;
CellMarker vm(map, VERTEX) ; CellMarker<VERTEX> vm(map) ;
for(Dart d = map.begin(); d != map.end(); map.next(d)) for(Dart d = map.begin(); d != map.end(); map.next(d))
{ {
if(!vm.isMarked(d)) if(!vm.isMarked(d))
...@@ -197,7 +197,7 @@ void pliantRemeshing(typename PFP::MAP& map, typename PFP::TVEC3& position, type ...@@ -197,7 +197,7 @@ void pliantRemeshing(typename PFP::MAP& map, typename PFP::TVEC3& position, type
} }
} }
map.template removeAttribute<VEC3>(centroid) ; map.removeAttribute(centroid) ;
} }
} // namespace Remeshing } // namespace Remeshing
......
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