From cdb021e82190699c26987e7526e9aded25908efb Mon Sep 17 00:00:00 2001 From: ganovelli Date: Tue, 30 Sep 2008 10:38:58 +0000 Subject: [PATCH] added typenames to compile with gcc --- vcg/simplex/edge/distance.h | 13 +++++++++---- 1 file changed, 9 insertions(+), 4 deletions(-) diff --git a/vcg/simplex/edge/distance.h b/vcg/simplex/edge/distance.h index d0158091..04efcba4 100644 --- a/vcg/simplex/edge/distance.h +++ b/vcg/simplex/edge/distance.h @@ -44,12 +44,12 @@ namespace vcg { typename EdgeType::ScalarType & dist, vcg::Point3 & p ) { - vcg::Segment3 s; + vcg::Segment3 s; s.P0()=e.V(0)->P(); s.P1()=e.V(1)->P(); - EdgeType::CoordType near; - vcg::ClosestPoint(s,near); - EdgeType::ScalarType d=(q-p).Norm(); + typename EdgeType::CoordType near; + vcg::ClosestPoint(s,near); + typename EdgeType::ScalarType d=(q-p).Norm(); if (d class PointDistanceFunctor { public: + typedef S ScalarType; + typedef Point3 QueryType; + static inline const Point3 & Pos(const QueryType & qt) {return qt;} + template inline bool operator () (const EDGETYPE & e, const Point3 & p, SCALARTYPE & minDist, Point3 & q) { const Point3 fp = Point3::Construct(p);