Création d'un compte pour un collaborateur extérieur au laboratoire depuis l'intranet ICube : https://intranet.icube.unistra.fr/fr/labs/member/profile

Commit c0fb7beb by Pierre Kraemer

### generic laplacian computation + cotangent weights

parent 3ea0e63a
 ... ... @@ -103,7 +103,7 @@ typename PFP::REAL vertexVoronoiArea(typename PFP::MAP& map, Dart d, const typen Dart it = d ; do { area += convexFaceArea(map, it, position) ; area += convexFaceArea(map, it, position) / 3 ; it = map.alpha1(it) ; } while(it != d) ; return area ; ... ...
 ... ... @@ -40,34 +40,34 @@ namespace Algo namespace Geometry { template typename PFP::VEC3 computeLaplacianTopoVertex( template ATTR_TYPE computeLaplacianTopoVertex( typename PFP::MAP& map, Dart d, const typename PFP::TVEC3& position) ; const AttributeHandler& attr) ; template typename PFP::VEC3 computeLaplacianCotanVertex( template ATTR_TYPE computeLaplacianCotanVertex( typename PFP::MAP& map, Dart d, const typename PFP::TVEC3& position, const typename PFP::TREAL& edgeWeight, const typename PFP::TREAL& vertexArea) ; const typename PFP::TREAL& vertexArea, const AttributeHandler& attr) ; template template void computeLaplacianTopoVertices( typename PFP::MAP& map, const typename PFP::TVEC3& position, typename PFP::TVEC3& laplacian, const AttributeHandler& attr, AttributeHandler& laplacian, const FunctorSelect& select = SelectorTrue()) ; template template void computeLaplacianCotanVertices( typename PFP::MAP& map, const typename PFP::TVEC3& position, const typename PFP::TREAL& edgeWeight, const typename PFP::TREAL& vertexArea, typename PFP::TVEC3& laplacian, const AttributeHandler& attr, AttributeHandler& laplacian, const FunctorSelect& select = SelectorTrue()) ; template ... ...
 ... ... @@ -33,45 +33,42 @@ namespace Algo namespace Geometry { template typename PFP::VEC3 computeLaplacianTopoVertex( template ATTR_TYPE computeLaplacianTopoVertex( typename PFP::MAP& map, Dart d, const typename PFP::TVEC3& position) const AttributeHandler& attr) { typedef typename PFP::VEC3 VEC3 ; VEC3 l(0) ; ATTR_TYPE l(0) ; unsigned int val = 0 ; Dart dd = d ; Dart it = d ; do { l += vectorOutOfDart(map, dd, position) ; l += attr[map.phi1(it)] - attr[it] ; val++ ; dd = map.alpha1(dd) ; } while(dd != d) ; it = map.alpha1(it) ; } while(it != d) ; l /= val ; return l ; } template typename PFP::VEC3 computeLaplacianCotanVertex( template ATTR_TYPE computeLaplacianCotanVertex( typename PFP::MAP& map, Dart d, const typename PFP::TVEC3& position, const typename PFP::TREAL& edgeWeight, const typename PFP::TREAL& vertexArea) const typename PFP::TREAL& vertexArea, const AttributeHandler& attr) { typedef typename PFP::VEC3 VEC3 ; typedef typename PFP::REAL REAL ; VEC3 l(0) ; ATTR_TYPE l(0) ; Dart it = d ; REAL vArea = vertexArea[d] ; REAL val = 0 ; do { REAL w = edgeWeight[it] / vArea ; VEC3 v = vectorOutOfDart(map, it, position) * w ; l += v ; l += (attr[map.phi1(it)] - attr[it]) * w ; val += w ; it = map.alpha1(it) ; } while(it != d) ; ... ... @@ -79,12 +76,12 @@ typename PFP::VEC3 computeLaplacianCotanVertex( return l ; } template template void computeLaplacianTopoVertices( typename PFP::MAP& map, const typename PFP::TVEC3& position, typename PFP::TVEC3& laplacian, const FunctorSelect& select) typename PFP::MAP& map, const AttributeHandler& attr, AttributeHandler& laplacian, const FunctorSelect& select) { CellMarker marker(map, VERTEX); for(Dart d = map.begin(); d != map.end(); map.next(d)) ... ... @@ -92,19 +89,19 @@ void computeLaplacianTopoVertices( if(select(d) && !marker.isMarked(d)) { marker.mark(d); laplacian[d] = computeLaplacianTopoVertex(map, d, position) ; laplacian[d] = computeLaplacianTopoVertex(map, d, attr) ; } } } template template void computeLaplacianCotanVertices( typename PFP::MAP& map, const typename PFP::TVEC3& position, const typename PFP::TREAL& edgeWeight, const typename PFP::TREAL& vertexArea, typename PFP::TVEC3& laplacian, const FunctorSelect& select) typename PFP::MAP& map, const typename PFP::TREAL& edgeWeight, const typename PFP::TREAL& vertexArea, const AttributeHandler& attr, AttributeHandler& laplacian, const FunctorSelect& select) { CellMarker marker(map, VERTEX); for(Dart d = map.begin(); d != map.end(); map.next(d)) ... ... @@ -112,7 +109,7 @@ void computeLaplacianCotanVertices( if(select(d) && !marker.isMarked(d)) { marker.mark(d); laplacian[d] = computeLaplacianCotanVertex(map, d, position, edgeWeight, vertexArea) ; laplacian[d] = computeLaplacianCotanVertex(map, d, edgeWeight, vertexArea, attr) ; } } } ... ...