added a missing vcg::math:: namespace qualifier

This commit is contained in:
Paolo Cignoni 2010-04-21 21:09:57 +00:00
parent 956f343087
commit cb73c0bb80
1 changed files with 14 additions and 14 deletions

View File

@ -387,22 +387,22 @@ ScalarType DistancePoint3Box3(const Point3<ScalarType> &p,
const ScalarType dx = std::min<ScalarType>(b.max.X()-p.X(), p.X()-b.min.X());
const ScalarType dy = std::min<ScalarType>(b.max.Y()-p.Y(), p.Y()-b.min.Y());
const ScalarType dz = std::min<ScalarType>(b.max.Z()-p.Z(), p.Z()-b.min.Z());
return std::min<ScalarType>(dx, std::min<ScalarType>(dy, dz));
}
{
ScalarType sq_dist = ScalarType(0);
for (int i=0; i<3; ++i)
{
ScalarType delta = ScalarType(0);
if (p[i] < b.min[i]) delta = p[i] - b.min[i];
else if (p[i] > b.max[i]) delta = p[i] - b.max[i];
sq_dist += delta * delta;
}
return Sqrt(sq_dist);
}
{
ScalarType sq_dist = ScalarType(0);
for (int i=0; i<3; ++i)
{
ScalarType delta = ScalarType(0);
if (p[i] < b.min[i]) delta = p[i] - b.min[i];
else if (p[i] > b.max[i]) delta = p[i] - b.max[i];
sq_dist += delta * delta;
}
return math::Sqrt(sq_dist);
}
}