From 7a24e258f807feb744645c0e410218cdf7d8a77f Mon Sep 17 00:00:00 2001 From: Pierre Kraemer Date: Fri, 6 Jan 2012 10:39:03 +0100 Subject: [PATCH] temporary remove function.. --- include/Algo/Geometry/feature.h | 3 -- include/Algo/Geometry/feature.hpp | 85 ------------------------------- 2 files changed, 88 deletions(-) diff --git a/include/Algo/Geometry/feature.h b/include/Algo/Geometry/feature.h index 46a438de..cbdbe6ca 100644 --- a/include/Algo/Geometry/feature.h +++ b/include/Algo/Geometry/feature.h @@ -40,9 +40,6 @@ void featureEdgeDetection(typename PFP::MAP& map, const typename PFP::TVEC3& pos template std::vector occludingContoursDetection(typename PFP::MAP& map, const typename PFP::VEC3& cameraPosition, const typename PFP::TVEC3& position, const typename PFP::TVEC3& normal) ; -template -std::vector featureLinesDetection(typename PFP::MAP& map, const typename PFP::TVEC3& position, const typename PFP::TVEC3& normal) ; - } // namespace Geometry } // namespace Algo diff --git a/include/Algo/Geometry/feature.hpp b/include/Algo/Geometry/feature.hpp index 201f4200..4aaf22d1 100644 --- a/include/Algo/Geometry/feature.hpp +++ b/include/Algo/Geometry/feature.hpp @@ -112,91 +112,6 @@ std::vector occludingContoursDetection(typename PFP::MAP& ma return occludingContours ; } -template -std::vector featureLinesDetection(typename PFP::MAP& map, const typename PFP::TVEC3& position, const typename PFP::TVEC3& normal) -{ - typedef typename PFP::VEC3 VEC3 ; - typedef typename PFP::REAL REAL ; - - std::vector featureLines ; - - Geom::BoundingBox bb = Algo::Geometry::computeBoundingBox(map, position) ; - - AttributeHandler edgeangle = map.template getAttribute(EDGE, "edgeangle") ; - if(!edgeangle.isValid()) - { - edgeangle = map.template addAttribute(EDGE, "edgeangle") ; - Algo::Geometry::computeAnglesBetweenNormalsOnEdges(map, position, edgeangle) ; - } - - AttributeHandler kmax = map.template getAttribute(VERTEX, "kmax") ; - AttributeHandler kmin = map.template getAttribute(VERTEX, "kmin") ; - AttributeHandler Kmax = map.template getAttribute(VERTEX, "Kmax") ; - AttributeHandler Kmin = map.template getAttribute(VERTEX, "Kmin") ; - AttributeHandler Knormal = map.template getAttribute(VERTEX, "Knormal") ; - // as all these attributes are computed simultaneously by computeCurvatureVertices - // one can assume that if one of them is not valid, the others must be created too - if(!kmax.isValid()) - { - kmax = map.template addAttribute(VERTEX, "kmax") ; - kmin = map.template addAttribute(VERTEX, "kmin") ; - Kmax = map.template addAttribute(VERTEX, "Kmax") ; - Kmin = map.template addAttribute(VERTEX, "Kmin") ; - Knormal = map.template addAttribute(VERTEX, "Knormal") ; - Algo::Geometry::computeCurvatureVertices_NormalCycles(map, 0.01f * bb.diagSize(), position, normal, edgeangle, kmax, kmin, Kmax, Kmin, Knormal) ; - } - - AttributeHandler kmaxGrad = map.template addAttribute(FACE, "kmaxGrad") ; - AttributeHandler kminGrad = map.template addAttribute(FACE, "kminGrad") ; - - CellMarker mf(map, FACE) ; - for(Dart d = map.begin(); d != map.end(); map.next(d)) - { - if(!mf.isMarked(d)) - { - mf.mark(d) ; - Dart v1 = d ; - Dart v2 = map.phi1(d) ; - Dart v3 = map.phi_1(d) ; - VEC3 v3v2 = position[v3] - position[v2] ; - VEC3 v1v3 = position[v1] - position[v3] ; - VEC3 v2v1 = position[v2] - position[v1] ; - VEC3 n = Geom::triangleNormal(position[v1], position[v2], position[v3]) ; - n.normalize() ; - VEC3 g1 = (n^v3v2 * kmax[v1]) + (n^v1v3 * kmax[v2]) + (n^v2v1 * kmax[v3]) ; - VEC3 g2 = (n^v3v2 * kmin[v1]) + (n^v1v3 * kmin[v2]) + (n^v2v1 * kmin[v3]) ; - g1.normalize() ; - kmaxGrad[d] = g1 ; - kminGrad[d] = g2 ; - } - } - - AttributeHandler Ekmax = map.template addAttribute(VERTEX, "kmaxGradV") ; - AttributeHandler Ekmin = map.template addAttribute(VERTEX, "kminGradV") ; - - CellMarker mv(map, VERTEX) ; - for(Dart d = map.begin(); d != map.end(); map.next(d)) - { - if(!mv.isMarked(d)) - { - mv.mark(d) ; - REAL res = 0 ; - REAL sumArea = 0 ; - Dart it = d ; - do - { - REAL area = Algo::Geometry::triangleArea(map, it, position) ; - res += area * (kmaxGrad[it] * Kmax[d]) ; - sumArea += area ; - it = map.alpha1(it) ; - } while(it != d) ; - res /= sumArea ; - } - } - - return featureLines ; -} - } // namespace Geometry } // namespace Algo -- GitLab