DistanceFunctor templated on the type of the query
This commit is contained in:
parent
d52199f64c
commit
f6da3d936d
|
@ -234,8 +234,13 @@ namespace vcg {
|
|||
return true;
|
||||
}
|
||||
|
||||
template <class S>
|
||||
class PointDistanceFunctor {
|
||||
public:
|
||||
typedef typename S ScalarType;
|
||||
typedef typename Point3<ScalarType> QueryType;
|
||||
static inline const Point3<ScalarType> & Pos(const QueryType & qt) {return qt;}
|
||||
|
||||
template <class FACETYPE, class SCALARTYPE>
|
||||
inline bool operator () (const FACETYPE & f, const Point3<SCALARTYPE> & p, SCALARTYPE & minDist, Point3<SCALARTYPE> & q) {
|
||||
const Point3<typename FACETYPE::ScalarType> fp = Point3<typename FACETYPE::ScalarType>::Construct(p);
|
||||
|
@ -430,10 +435,13 @@ namespace vcg {
|
|||
return true;
|
||||
}
|
||||
|
||||
|
||||
|
||||
template <class S>
|
||||
class PointDistanceBaseFunctor {
|
||||
public:
|
||||
typedef typename S ScalarType;
|
||||
typedef Point3<ScalarType> QueryType;
|
||||
|
||||
static inline const Point3<ScalarType> & Pos(const Point3<ScalarType> & qt) {return qt;}
|
||||
template <class FACETYPE, class SCALARTYPE>
|
||||
inline bool operator () (const FACETYPE & f, const Point3<SCALARTYPE> & p, SCALARTYPE & minDist, Point3<SCALARTYPE> & q) {
|
||||
const Point3<typename FACETYPE::ScalarType> fp = Point3<typename FACETYPE::ScalarType>::Construct(p);
|
||||
|
|
Loading…
Reference in New Issue