Commit cb65f5ab authored by Pierre Kraemer's avatar Pierre Kraemer

suite du newMR..

parent 4e878d8e
...@@ -43,7 +43,7 @@ namespace Geometry ...@@ -43,7 +43,7 @@ namespace Geometry
//! @param position //! @param position
//! @return //! @return
template <typename PFP> template <typename PFP>
typename PFP::REAL triangleArea(typename PFP::MAP& map, Dart d, const VertexAttribute<typename PFP::VEC3>& position) ; typename PFP::REAL triangleArea(typename PFP::MAP& map, Dart d, const VertexAttribute<typename PFP::VEC3, typename PFP::MAP::IMPL>& position) ;
//! \brief Compute convex polygonal face area //! \brief Compute convex polygonal face area
//! @param map //! @param map
...@@ -51,14 +51,14 @@ typename PFP::REAL triangleArea(typename PFP::MAP& map, Dart d, const VertexAttr ...@@ -51,14 +51,14 @@ typename PFP::REAL triangleArea(typename PFP::MAP& map, Dart d, const VertexAttr
//! @param position //! @param position
//! @return //! @return
template <typename PFP> template <typename PFP>
typename PFP::REAL convexFaceArea(typename PFP::MAP& map, Dart d, const VertexAttribute<typename PFP::VEC3>& position) ; typename PFP::REAL convexFaceArea(typename PFP::MAP& map, Dart d, const VertexAttribute<typename PFP::VEC3, typename PFP::MAP::IMPL>& position) ;
//! \brief Compute the total area of a mesh by summing all face areas. //! \brief Compute the total area of a mesh by summing all face areas.
//! @param map //! @param map
//! @param position //! @param position
//! @return //! @return
template <typename PFP> template <typename PFP>
typename PFP::REAL totalArea(typename PFP::MAP& map, const VertexAttribute<typename PFP::VEC3>& position, unsigned int thread = 0) ; typename PFP::REAL totalArea(typename PFP::MAP& map, const VertexAttribute<typename PFP::VEC3, typename PFP::MAP::IMPL>& position, unsigned int thread = 0) ;
//! \brief Compute the area of the faces around a vertex. //! \brief Compute the area of the faces around a vertex.
//! @param map //! @param map
...@@ -66,25 +66,25 @@ typename PFP::REAL totalArea(typename PFP::MAP& map, const VertexAttribute<typen ...@@ -66,25 +66,25 @@ typename PFP::REAL totalArea(typename PFP::MAP& map, const VertexAttribute<typen
//! @param position //! @param position
//! @return //! @return
template <typename PFP> template <typename PFP>
typename PFP::REAL vertexOneRingArea(typename PFP::MAP& map, Dart d, const VertexAttribute<typename PFP::VEC3>& position) ; typename PFP::REAL vertexOneRingArea(typename PFP::MAP& map, Dart d, const VertexAttribute<typename PFP::VEC3, typename PFP::MAP::IMPL>& position) ;
template <typename PFP> template <typename PFP>
typename PFP::REAL vertexBarycentricArea(typename PFP::MAP& map, Dart d, const VertexAttribute<typename PFP::VEC3>& position) ; typename PFP::REAL vertexBarycentricArea(typename PFP::MAP& map, Dart d, const VertexAttribute<typename PFP::VEC3, typename PFP::MAP::IMPL>& position) ;
template <typename PFP> template <typename PFP>
typename PFP::REAL vertexVoronoiArea(typename PFP::MAP& map, Dart d, const VertexAttribute<typename PFP::VEC3>& position) ; typename PFP::REAL vertexVoronoiArea(typename PFP::MAP& map, Dart d, const VertexAttribute<typename PFP::VEC3, typename PFP::MAP::IMPL>& position) ;
template <typename PFP> template <typename PFP>
void computeAreaFaces(typename PFP::MAP& map, const VertexAttribute<typename PFP::VEC3>& position, FaceAttribute<typename PFP::REAL>& face_area) ; void computeAreaFaces(typename PFP::MAP& map, const VertexAttribute<typename PFP::VEC3, typename PFP::MAP::IMPL>& position, FaceAttribute<typename PFP::REAL, typename PFP::MAP::IMPL>& face_area) ;
template <typename PFP> template <typename PFP>
void computeOneRingAreaVertices(typename PFP::MAP& map, const VertexAttribute<typename PFP::VEC3>& position, VertexAttribute<typename PFP::REAL>& vertex_area) ; void computeOneRingAreaVertices(typename PFP::MAP& map, const VertexAttribute<typename PFP::VEC3, typename PFP::MAP::IMPL>& position, VertexAttribute<typename PFP::REAL, typename PFP::MAP::IMPL>& vertex_area) ;
template <typename PFP> template <typename PFP>
void computeBarycentricAreaVertices(typename PFP::MAP& map, const VertexAttribute<typename PFP::VEC3>& position, VertexAttribute<typename PFP::REAL>& vertex_area) ; void computeBarycentricAreaVertices(typename PFP::MAP& map, const VertexAttribute<typename PFP::VEC3, typename PFP::MAP::IMPL>& position, VertexAttribute<typename PFP::REAL, typename PFP::MAP::IMPL>& vertex_area) ;
template <typename PFP> template <typename PFP>
void computeVoronoiAreaVertices(typename PFP::MAP& map, const VertexAttribute<typename PFP::VEC3>& position, VertexAttribute<typename PFP::REAL>& vertex_area) ; void computeVoronoiAreaVertices(typename PFP::MAP& map, const VertexAttribute<typename PFP::VEC3, typename PFP::MAP::IMPL>& position, VertexAttribute<typename PFP::REAL, typename PFP::MAP::IMPL>& vertex_area) ;
} // namespace Geometry } // namespace Geometry
......
...@@ -40,7 +40,7 @@ namespace Geometry ...@@ -40,7 +40,7 @@ namespace Geometry
{ {
template <typename PFP> template <typename PFP>
typename PFP::REAL triangleArea(typename PFP::MAP& map, Dart d, const VertexAttribute<typename PFP::VEC3>& position) typename PFP::REAL triangleArea(typename PFP::MAP& map, Dart d, const VertexAttribute<typename PFP::VEC3, typename PFP::MAP::IMPL>& position)
{ {
typename PFP::VEC3 p1 = position[d] ; typename PFP::VEC3 p1 = position[d] ;
typename PFP::VEC3 p2 = position[map.phi1(d)] ; typename PFP::VEC3 p2 = position[map.phi1(d)] ;
...@@ -50,7 +50,7 @@ typename PFP::REAL triangleArea(typename PFP::MAP& map, Dart d, const VertexAttr ...@@ -50,7 +50,7 @@ typename PFP::REAL triangleArea(typename PFP::MAP& map, Dart d, const VertexAttr
} }
template <typename PFP> template <typename PFP>
typename PFP::REAL convexFaceArea(typename PFP::MAP& map, Dart d, const VertexAttribute<typename PFP::VEC3>& position) typename PFP::REAL convexFaceArea(typename PFP::MAP& map, Dart d, const VertexAttribute<typename PFP::VEC3, typename PFP::MAP::IMPL>& position)
{ {
typedef typename PFP::VEC3 VEC3 ; typedef typename PFP::VEC3 VEC3 ;
...@@ -72,7 +72,7 @@ typename PFP::REAL convexFaceArea(typename PFP::MAP& map, Dart d, const VertexAt ...@@ -72,7 +72,7 @@ typename PFP::REAL convexFaceArea(typename PFP::MAP& map, Dart d, const VertexAt
} }
template <typename PFP> template <typename PFP>
typename PFP::REAL totalArea(typename PFP::MAP& map, const VertexAttribute<typename PFP::VEC3>& position, unsigned int thread) typename PFP::REAL totalArea(typename PFP::MAP& map, const VertexAttribute<typename PFP::VEC3, typename PFP::MAP::IMPL>& position, unsigned int thread)
{ {
typename PFP::REAL area(0) ; typename PFP::REAL area(0) ;
TraversorF<typename PFP::MAP> t(map) ; TraversorF<typename PFP::MAP> t(map) ;
...@@ -82,7 +82,7 @@ typename PFP::REAL totalArea(typename PFP::MAP& map, const VertexAttribute<typen ...@@ -82,7 +82,7 @@ typename PFP::REAL totalArea(typename PFP::MAP& map, const VertexAttribute<typen
} }
template <typename PFP> template <typename PFP>
typename PFP::REAL vertexOneRingArea(typename PFP::MAP& map, Dart d, const VertexAttribute<typename PFP::VEC3>& position) typename PFP::REAL vertexOneRingArea(typename PFP::MAP& map, Dart d, const VertexAttribute<typename PFP::VEC3, typename PFP::MAP::IMPL>& position)
{ {
typename PFP::REAL area(0) ; typename PFP::REAL area(0) ;
Traversor2VF<typename PFP::MAP> t(map, d) ; Traversor2VF<typename PFP::MAP> t(map, d) ;
...@@ -92,7 +92,7 @@ typename PFP::REAL vertexOneRingArea(typename PFP::MAP& map, Dart d, const Verte ...@@ -92,7 +92,7 @@ typename PFP::REAL vertexOneRingArea(typename PFP::MAP& map, Dart d, const Verte
} }
template <typename PFP> template <typename PFP>
typename PFP::REAL vertexBarycentricArea(typename PFP::MAP& map, Dart d, const VertexAttribute<typename PFP::VEC3>& position) typename PFP::REAL vertexBarycentricArea(typename PFP::MAP& map, Dart d, const VertexAttribute<typename PFP::VEC3, typename PFP::MAP::IMPL>& position)
{ {
typename PFP::REAL area(0) ; typename PFP::REAL area(0) ;
Traversor2VF<typename PFP::MAP> t(map, d) ; Traversor2VF<typename PFP::MAP> t(map, d) ;
...@@ -102,7 +102,7 @@ typename PFP::REAL vertexBarycentricArea(typename PFP::MAP& map, Dart d, const V ...@@ -102,7 +102,7 @@ typename PFP::REAL vertexBarycentricArea(typename PFP::MAP& map, Dart d, const V
} }
template <typename PFP> template <typename PFP>
typename PFP::REAL vertexVoronoiArea(typename PFP::MAP& map, Dart d, const VertexAttribute<typename PFP::VEC3>& position) typename PFP::REAL vertexVoronoiArea(typename PFP::MAP& map, Dart d, const VertexAttribute<typename PFP::VEC3, typename PFP::MAP::IMPL>& position)
{ {
typename PFP::REAL area(0) ; typename PFP::REAL area(0) ;
Traversor2VF<typename PFP::MAP> t(map, d) ; Traversor2VF<typename PFP::MAP> t(map, d) ;
...@@ -130,7 +130,7 @@ typename PFP::REAL vertexVoronoiArea(typename PFP::MAP& map, Dart d, const Verte ...@@ -130,7 +130,7 @@ typename PFP::REAL vertexVoronoiArea(typename PFP::MAP& map, Dart d, const Verte
} }
template <typename PFP> template <typename PFP>
void computeAreaFaces(typename PFP::MAP& map, const VertexAttribute<typename PFP::VEC3>& position, FaceAttribute<typename PFP::REAL>& face_area) void computeAreaFaces(typename PFP::MAP& map, const VertexAttribute<typename PFP::VEC3, typename PFP::MAP::IMPL>& position, FaceAttribute<typename PFP::REAL, typename PFP::MAP::IMPL>& face_area)
{ {
TraversorF<typename PFP::MAP> t(map) ; TraversorF<typename PFP::MAP> t(map) ;
for(Dart d = t.begin(); d != t.end(); d = t.next()) for(Dart d = t.begin(); d != t.end(); d = t.next())
...@@ -138,7 +138,7 @@ void computeAreaFaces(typename PFP::MAP& map, const VertexAttribute<typename PFP ...@@ -138,7 +138,7 @@ void computeAreaFaces(typename PFP::MAP& map, const VertexAttribute<typename PFP
} }
template <typename PFP> template <typename PFP>
void computeOneRingAreaVertices(typename PFP::MAP& map, const VertexAttribute<typename PFP::VEC3>& position, VertexAttribute<typename PFP::REAL>& vertex_area) void computeOneRingAreaVertices(typename PFP::MAP& map, const VertexAttribute<typename PFP::VEC3, typename PFP::MAP::IMPL>& position, VertexAttribute<typename PFP::REAL, typename PFP::MAP::IMPL>& vertex_area)
{ {
TraversorV<typename PFP::MAP> t(map) ; TraversorV<typename PFP::MAP> t(map) ;
for(Dart d = t.begin(); d != t.end(); d = t.next()) for(Dart d = t.begin(); d != t.end(); d = t.next())
...@@ -146,7 +146,7 @@ void computeOneRingAreaVertices(typename PFP::MAP& map, const VertexAttribute<ty ...@@ -146,7 +146,7 @@ void computeOneRingAreaVertices(typename PFP::MAP& map, const VertexAttribute<ty
} }
template <typename PFP> template <typename PFP>
void computeBarycentricAreaVertices(typename PFP::MAP& map, const VertexAttribute<typename PFP::VEC3>& position, VertexAttribute<typename PFP::REAL>& vertex_area) void computeBarycentricAreaVertices(typename PFP::MAP& map, const VertexAttribute<typename PFP::VEC3, typename PFP::MAP::IMPL>& position, VertexAttribute<typename PFP::REAL, typename PFP::MAP::IMPL>& vertex_area)
{ {
TraversorV<typename PFP::MAP> t(map) ; TraversorV<typename PFP::MAP> t(map) ;
for(Dart d = t.begin(); d != t.end(); d = t.next()) for(Dart d = t.begin(); d != t.end(); d = t.next())
...@@ -154,7 +154,7 @@ void computeBarycentricAreaVertices(typename PFP::MAP& map, const VertexAttribut ...@@ -154,7 +154,7 @@ void computeBarycentricAreaVertices(typename PFP::MAP& map, const VertexAttribut
} }
template <typename PFP> template <typename PFP>
void computeVoronoiAreaVertices(typename PFP::MAP& map, const VertexAttribute<typename PFP::VEC3>& position, VertexAttribute<typename PFP::REAL>& vertex_area) void computeVoronoiAreaVertices(typename PFP::MAP& map, const VertexAttribute<typename PFP::VEC3, typename PFP::MAP::IMPL>& position, VertexAttribute<typename PFP::REAL, typename PFP::MAP::IMPL>& vertex_area)
{ {
TraversorV<typename PFP::MAP> t(map) ; TraversorV<typename PFP::MAP> t(map) ;
for(Dart d = t.begin(); d != t.end(); d = t.next()) for(Dart d = t.begin(); d != t.end(); d = t.next())
...@@ -162,15 +162,17 @@ void computeVoronoiAreaVertices(typename PFP::MAP& map, const VertexAttribute<ty ...@@ -162,15 +162,17 @@ void computeVoronoiAreaVertices(typename PFP::MAP& map, const VertexAttribute<ty
} }
namespace Parallel namespace Parallel
{ {
template <typename PFP> template <typename PFP>
class FunctorConvexFaceArea: public FunctorMapThreaded<typename PFP::MAP > class FunctorConvexFaceArea: public FunctorMapThreaded<typename PFP::MAP >
{ {
const VertexAttribute<typename PFP::VEC3>& m_position; const VertexAttribute<typename PFP::VEC3, typename PFP::MAP::IMPL>& m_position;
FaceAttribute<typename PFP::REAL>& m_area; FaceAttribute<typename PFP::REAL, typename PFP::MAP::IMPL>& m_area;
public: public:
FunctorConvexFaceArea<PFP>( typename PFP::MAP& map, const VertexAttribute<typename PFP::VEC3>& position, FaceAttribute<typename PFP::REAL>& area): FunctorConvexFaceArea<PFP>( typename PFP::MAP& map, const VertexAttribute<typename PFP::VEC3, typename PFP::MAP::IMPL>& position, FaceAttribute<typename PFP::REAL, typename PFP::MAP::IMPL>& area):
FunctorMapThreaded<typename PFP::MAP>(map), m_position(position), m_area(area) FunctorMapThreaded<typename PFP::MAP>(map), m_position(position), m_area(area)
{ } { }
...@@ -181,20 +183,19 @@ public: ...@@ -181,20 +183,19 @@ public:
}; };
template <typename PFP> template <typename PFP>
void computeAreaFaces(typename PFP::MAP& map, const VertexAttribute<typename PFP::VEC3>& position, FaceAttribute<typename PFP::REAL>& area, unsigned int nbth) void computeAreaFaces(typename PFP::MAP& map, const VertexAttribute<typename PFP::VEC3, typename PFP::MAP::IMPL>& position, FaceAttribute<typename PFP::REAL, typename PFP::MAP::IMPL>& area, unsigned int nbth)
{ {
FunctorConvexFaceArea<PFP> funct(map,position,area); FunctorConvexFaceArea<PFP> funct(map,position,area);
Algo::Parallel::foreach_cell<typename PFP::MAP,FACE>(map, funct, nbth, false); Algo::Parallel::foreach_cell<typename PFP::MAP,FACE>(map, funct, nbth, false);
} }
template <typename PFP> template <typename PFP>
class FunctorVertexOneRingArea: public FunctorMapThreaded<typename PFP::MAP > class FunctorVertexOneRingArea: public FunctorMapThreaded<typename PFP::MAP >
{ {
const VertexAttribute<typename PFP::VEC3>& m_position; const VertexAttribute<typename PFP::VEC3, typename PFP::MAP::IMPL>& m_position;
VertexAttribute<typename PFP::REAL>& m_area; VertexAttribute<typename PFP::REAL, typename PFP::MAP::IMPL>& m_area;
public: public:
FunctorVertexOneRingArea<PFP>( typename PFP::MAP& map, const VertexAttribute<typename PFP::VEC3>& position, VertexAttribute<typename PFP::REAL>& area): FunctorVertexOneRingArea<PFP>( typename PFP::MAP& map, const VertexAttribute<typename PFP::VEC3, typename PFP::MAP::IMPL>& position, VertexAttribute<typename PFP::REAL, typename PFP::MAP::IMPL>& area):
FunctorMapThreaded<typename PFP::MAP>(map), m_position(position), m_area(area) FunctorMapThreaded<typename PFP::MAP>(map), m_position(position), m_area(area)
{ } { }
...@@ -205,21 +206,19 @@ public: ...@@ -205,21 +206,19 @@ public:
}; };
template <typename PFP> template <typename PFP>
void computeOneRingAreaVertices(typename PFP::MAP& map, const VertexAttribute<typename PFP::VEC3>& position, VertexAttribute<typename PFP::REAL>& area, unsigned int nbth) void computeOneRingAreaVertices(typename PFP::MAP& map, const VertexAttribute<typename PFP::VEC3, typename PFP::MAP::IMPL>& position, VertexAttribute<typename PFP::REAL, typename PFP::MAP::IMPL>& area, unsigned int nbth)
{ {
FunctorConvexFaceArea<PFP> funct(map,position,area); FunctorConvexFaceArea<PFP> funct(map,position,area);
Algo::Parallel::foreach_cell<typename PFP::MAP,VERTEX>(map, funct, nbth, false); Algo::Parallel::foreach_cell<typename PFP::MAP,VERTEX>(map, funct, nbth, false);
} }
template <typename PFP> template <typename PFP>
class FunctorVertexVoronoiArea: public FunctorMapThreaded<typename PFP::MAP > class FunctorVertexVoronoiArea: public FunctorMapThreaded<typename PFP::MAP >
{ {
const VertexAttribute<typename PFP::VEC3>& m_position; const VertexAttribute<typename PFP::VEC3, typename PFP::MAP::IMPL>& m_position;
VertexAttribute<typename PFP::REAL>& m_area; VertexAttribute<typename PFP::REAL, typename PFP::MAP::IMPL>& m_area;
public: public:
FunctorVertexVoronoiArea<PFP>( typename PFP::MAP& map, const VertexAttribute<typename PFP::VEC3>& position, VertexAttribute<typename PFP::REAL>& area): FunctorVertexVoronoiArea<PFP>( typename PFP::MAP& map, const VertexAttribute<typename PFP::VEC3, typename PFP::MAP::IMPL>& position, VertexAttribute<typename PFP::REAL, typename PFP::MAP::IMPL>& area):
FunctorMapThreaded<typename PFP::MAP>(map), m_position(position), m_area(area) FunctorMapThreaded<typename PFP::MAP>(map), m_position(position), m_area(area)
{ } { }
...@@ -230,24 +229,19 @@ public: ...@@ -230,24 +229,19 @@ public:
}; };
template <typename PFP> template <typename PFP>
void computeVoronoiAreaVertices(typename PFP::MAP& map, const VertexAttribute<typename PFP::VEC3>& position, VertexAttribute<typename PFP::REAL>& area, unsigned int nbth) void computeVoronoiAreaVertices(typename PFP::MAP& map, const VertexAttribute<typename PFP::VEC3, typename PFP::MAP>& position, VertexAttribute<typename PFP::REAL, typename PFP::MAP>& area, unsigned int nbth)
{ {
FunctorConvexFaceArea<PFP> funct(map,position,area); FunctorConvexFaceArea<PFP> funct(map,position,area);
Algo::Parallel::foreach_cell<typename PFP::MAP,VERTEX>(map, funct, nbth, false); Algo::Parallel::foreach_cell<typename PFP::MAP, VERTEX>(map, funct, nbth, false);
} }
} // namespace Parallel
}
} // namespace Geometry } // namespace Geometry
} } // namespace Surface
} // namespace Algo } // namespace Algo
......
...@@ -43,7 +43,7 @@ namespace Geometry ...@@ -43,7 +43,7 @@ namespace Geometry
* vectorOutOfDart return a dart from the position of vertex attribute of d to the position of vertex attribute of phi1(d) * vectorOutOfDart return a dart from the position of vertex attribute of d to the position of vertex attribute of phi1(d)
*/ */
template <typename PFP> template <typename PFP>
inline typename PFP::VEC3 vectorOutOfDart(typename PFP::MAP& map, Dart d, const VertexAttribute<typename PFP::VEC3>& position) inline typename PFP::VEC3 vectorOutOfDart(typename PFP::MAP& map, Dart d, const VertexAttribute<typename PFP::VEC3, typename PFP::MAP::IMPL>& position)
{ {
typename PFP::VEC3 vec = position[map.phi1(d)] ; typename PFP::VEC3 vec = position[map.phi1(d)] ;
vec -= position[d] ; vec -= position[d] ;
...@@ -51,14 +51,14 @@ inline typename PFP::VEC3 vectorOutOfDart(typename PFP::MAP& map, Dart d, const ...@@ -51,14 +51,14 @@ inline typename PFP::VEC3 vectorOutOfDart(typename PFP::MAP& map, Dart d, const
} }
template <typename PFP> template <typename PFP>
inline typename PFP::REAL edgeLength(typename PFP::MAP& map, Dart d, const VertexAttribute<typename PFP::VEC3>& position) inline typename PFP::REAL edgeLength(typename PFP::MAP& map, Dart d, const VertexAttribute<typename PFP::VEC3, typename PFP::MAP::IMPL>& position)
{ {
typename PFP::VEC3 v = vectorOutOfDart<PFP>(map, d, position) ; typename PFP::VEC3 v = vectorOutOfDart<PFP>(map, d, position) ;
return v.norm() ; return v.norm() ;
} }
template <typename PFP> template <typename PFP>
inline float angle(typename PFP::MAP& map, Dart d1, Dart d2, const VertexAttribute<typename PFP::VEC3>& position) inline float angle(typename PFP::MAP& map, Dart d1, Dart d2, const VertexAttribute<typename PFP::VEC3, typename PFP::MAP::IMPL>& position)
{ {
typename PFP::VEC3 v1 = vectorOutOfDart<PFP>(map, d1, position) ; typename PFP::VEC3 v1 = vectorOutOfDart<PFP>(map, d1, position) ;
typename PFP::VEC3 v2 = vectorOutOfDart<PFP>(map, d2, position) ; typename PFP::VEC3 v2 = vectorOutOfDart<PFP>(map, d2, position) ;
...@@ -66,7 +66,7 @@ inline float angle(typename PFP::MAP& map, Dart d1, Dart d2, const VertexAttribu ...@@ -66,7 +66,7 @@ inline float angle(typename PFP::MAP& map, Dart d1, Dart d2, const VertexAttribu
} }
template <typename PFP> template <typename PFP>
bool isTriangleObtuse(typename PFP::MAP& map, Dart d, const VertexAttribute<typename PFP::VEC3>& position) bool isTriangleObtuse(typename PFP::MAP& map, Dart d, const VertexAttribute<typename PFP::VEC3, typename PFP::MAP::IMPL>& position)
{ {
return Geom::isTriangleObtuse(position[d], position[map.phi1(d)], position[map.phi_1(d)]) ; return Geom::isTriangleObtuse(position[d], position[map.phi1(d)], position[map.phi_1(d)]) ;
} }
......
...@@ -212,7 +212,7 @@ typename V_ATT::DATA_TYPE vertexBorderNormal(typename PFP::MAP& map, Dart d, con ...@@ -212,7 +212,7 @@ typename V_ATT::DATA_TYPE vertexBorderNormal(typename PFP::MAP& map, Dart d, con
VEC3 N(0) ; VEC3 N(0) ;
std::vector<Dart> faces; std::vector<Dart> faces;
CellMarker<FACE> f(map); CellMarker<typename PFP::MAP, FACE> f(map);
FunctorStore fs(faces); FunctorStore fs(faces);
map.foreach_dart_of_vertex(d,fs); map.foreach_dart_of_vertex(d,fs);
...@@ -237,8 +237,6 @@ typename V_ATT::DATA_TYPE vertexBorderNormal(typename PFP::MAP& map, Dart d, con ...@@ -237,8 +237,6 @@ typename V_ATT::DATA_TYPE vertexBorderNormal(typename PFP::MAP& map, Dart d, con
return N ; return N ;
} }
template <typename PFP, typename V_ATT, typename F_ATT> template <typename PFP, typename V_ATT, typename F_ATT>
void computeNormalFaces(typename PFP::MAP& map, const V_ATT& position, F_ATT& face_normal, unsigned int thread) void computeNormalFaces(typename PFP::MAP& map, const V_ATT& position, F_ATT& face_normal, unsigned int thread)
{ {
......
...@@ -40,15 +40,15 @@ namespace Volume ...@@ -40,15 +40,15 @@ namespace Volume
namespace IHM namespace IHM
{ {
template<typename T, unsigned int ORBIT> class AttributeHandler_IHM ; template<typename T, unsigned int ORBIT> class AttributeHandler_IHM ;
typedef EmbeddedMap3::IMPL EMap3_IMPL;
class ImplicitHierarchicalMap3 : public EmbeddedMap3 class ImplicitHierarchicalMap3 : public EmbeddedMap3
{ {
template<typename T, unsigned int ORBIT> friend class AttributeHandler_IHM ; template<typename T, unsigned int ORBIT> friend class AttributeHandler_IHM ;
public: public:
FunctorType* vertexVertexFunctor ; FunctorType* vertexVertexFunctor ;
FunctorType* edgeVertexFunctor ; FunctorType* edgeVertexFunctor ;
FunctorType* faceVertexFunctor ; FunctorType* faceVertexFunctor ;
...@@ -59,9 +59,9 @@ public: ...@@ -59,9 +59,9 @@ public:
unsigned int m_edgeIdCount ; unsigned int m_edgeIdCount ;
unsigned int m_faceIdCount; unsigned int m_faceIdCount;
DartAttribute<unsigned int> m_dartLevel ; DartAttribute<unsigned int, EMap3_IMPL> m_dartLevel ;
DartAttribute<unsigned int> m_edgeId ; DartAttribute<unsigned int, EMap3_IMPL> m_edgeId ;
DartAttribute<unsigned int> m_faceId ; DartAttribute<unsigned int, EMap3_IMPL> m_faceId ;
AttributeMultiVector<unsigned int>* m_nextLevelCell[NB_ORBITS] ; AttributeMultiVector<unsigned int>* m_nextLevelCell[NB_ORBITS] ;
...@@ -404,25 +404,25 @@ public: ...@@ -404,25 +404,25 @@ public:
} ; } ;
template <typename T, unsigned int ORBIT> template <typename T, unsigned int ORBIT>
class AttributeHandler_IHM : public AttributeHandler<T, ORBIT> class AttributeHandler_IHM : public AttributeHandler<T, ORBIT, EMap3_IMPL>
{ {
public: public:
typedef T DATA_TYPE ; typedef T DATA_TYPE ;
AttributeHandler_IHM() : AttributeHandler<T, ORBIT>() AttributeHandler_IHM() : AttributeHandler<T, ORBIT, EMap3_IMPL>()
{} {}
AttributeHandler_IHM(GenericMap* m, AttributeMultiVector<T>* amv) : AttributeHandler<T, ORBIT>(m, amv) AttributeHandler_IHM(ImplicitHierarchicalMap3* m, AttributeMultiVector<T>* amv) : AttributeHandler<T, ORBIT, EMap3_IMPL>(m, amv)
{} {}
AttributeMultiVector<T>* getDataVector() const AttributeMultiVector<T>* getDataVector() const
{ {
return AttributeHandler<T, ORBIT>::getDataVector() ; return AttributeHandler<T, ORBIT, EMap3_IMPL>::getDataVector() ;
} }
bool isValid() const bool isValid() const
{ {
return AttributeHandler<T, ORBIT>::isValid() ; return AttributeHandler<T, ORBIT, EMap3_IMPL>::isValid() ;
} }
virtual T& operator[](Dart d) ; virtual T& operator[](Dart d) ;
...@@ -431,12 +431,12 @@ public: ...@@ -431,12 +431,12 @@ public:
T& operator[](unsigned int a) T& operator[](unsigned int a)
{ {
return AttributeHandler<T, ORBIT>::operator[](a) ; return AttributeHandler<T, ORBIT, EMap3_IMPL>::operator[](a) ;
} }
const T& operator[](unsigned int a) const const T& operator[](unsigned int a) const
{ {
return AttributeHandler<T, ORBIT>::operator[](a) ; return AttributeHandler<T, ORBIT, EMap3_IMPL>::operator[](a) ;
} }
} ; } ;
...@@ -447,14 +447,16 @@ class VertexAttribute_IHM : public IHM::AttributeHandler_IHM<T, VERTEX> ...@@ -447,14 +447,16 @@ class VertexAttribute_IHM : public IHM::AttributeHandler_IHM<T, VERTEX>
public: public:
VertexAttribute_IHM() : IHM::AttributeHandler_IHM<T, VERTEX>() {} VertexAttribute_IHM() : IHM::AttributeHandler_IHM<T, VERTEX>() {}
VertexAttribute_IHM(const IHM::AttributeHandler_IHM<T, VERTEX>& ah) : IHM::AttributeHandler_IHM<T, VERTEX>(ah) {} VertexAttribute_IHM(const IHM::AttributeHandler_IHM<T, VERTEX>& ah) : IHM::AttributeHandler_IHM<T, VERTEX>(ah) {}
VertexAttribute_IHM<T>& operator=(const IHM::AttributeHandler_IHM<T, VERTEX>& ah) { this->IHM::AttributeHandler_IHM<T, VERTEX>::operator=(ah); return *this; } // VertexAttribute_IHM<T>& operator=(const IHM::AttributeHandler_IHM<T, VERTEX>& ah) { this->IHM::AttributeHandler_IHM<T, VERTEX>::operator=(ah); return *this; }