Commit 7a24e258 authored by Pierre Kraemer's avatar Pierre Kraemer

temporary remove function..

parent 53ce7937
......@@ -40,9 +40,6 @@ void featureEdgeDetection(typename PFP::MAP& map, const typename PFP::TVEC3& pos
template <typename PFP>
std::vector<typename PFP::VEC3> occludingContoursDetection(typename PFP::MAP& map, const typename PFP::VEC3& cameraPosition, const typename PFP::TVEC3& position, const typename PFP::TVEC3& normal) ;
template <typename PFP>
std::vector<typename PFP::VEC3> featureLinesDetection(typename PFP::MAP& map, const typename PFP::TVEC3& position, const typename PFP::TVEC3& normal) ;
} // namespace Geometry
} // namespace Algo
......
......@@ -112,91 +112,6 @@ std::vector<typename PFP::VEC3> occludingContoursDetection(typename PFP::MAP& ma
return occludingContours ;
}
template <typename PFP>
std::vector<typename PFP::VEC3> 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<VEC3> featureLines ;
Geom::BoundingBox<VEC3> bb = Algo::Geometry::computeBoundingBox<PFP>(map, position) ;
AttributeHandler<REAL> edgeangle = map.template getAttribute<REAL>(EDGE, "edgeangle") ;
if(!edgeangle.isValid())
{
edgeangle = map.template addAttribute<REAL>(EDGE, "edgeangle") ;
Algo::Geometry::computeAnglesBetweenNormalsOnEdges<PFP>(map, position, edgeangle) ;
}
AttributeHandler<REAL> kmax = map.template getAttribute<REAL>(VERTEX, "kmax") ;
AttributeHandler<REAL> kmin = map.template getAttribute<REAL>(VERTEX, "kmin") ;
AttributeHandler<VEC3> Kmax = map.template getAttribute<VEC3>(VERTEX, "Kmax") ;
AttributeHandler<VEC3> Kmin = map.template getAttribute<VEC3>(VERTEX, "Kmin") ;
AttributeHandler<VEC3> Knormal = map.template getAttribute<VEC3>(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<REAL>(VERTEX, "kmax") ;
kmin = map.template addAttribute<REAL>(VERTEX, "kmin") ;
Kmax = map.template addAttribute<VEC3>(VERTEX, "Kmax") ;
Kmin = map.template addAttribute<VEC3>(VERTEX, "Kmin") ;
Knormal = map.template addAttribute<VEC3>(VERTEX, "Knormal") ;
Algo::Geometry::computeCurvatureVertices_NormalCycles<PFP>(map, 0.01f * bb.diagSize(), position, normal, edgeangle, kmax, kmin, Kmax, Kmin, Knormal) ;
}
AttributeHandler<VEC3> kmaxGrad = map.template addAttribute<VEC3>(FACE, "kmaxGrad") ;
AttributeHandler<VEC3> kminGrad = map.template addAttribute<VEC3>(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<VEC3> Ekmax = map.template addAttribute<VEC3>(VERTEX, "kmaxGradV") ;
AttributeHandler<VEC3> Ekmin = map.template addAttribute<VEC3>(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<PFP>(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
......
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