aabb: add diameter method

This commit is contained in:
Danny Robson 2015-04-15 17:16:34 +10:00
parent ed38fd0491
commit a946b182f9
2 changed files with 10 additions and 0 deletions

View File

@ -30,6 +30,15 @@ AABB<S,T>::AABB (point<S,T> _p0, point<S,T> _p1):
}
//-----------------------------------------------------------------------------
template <size_t S, typename T>
T
AABB<S,T>::diameter (void) const
{
return magnitude ().diameter ();
}
//-----------------------------------------------------------------------------
template <size_t S, typename T>
util::extent<S,T>

View File

@ -30,6 +30,7 @@ namespace util {
AABB () = default;
AABB (point<S,T>, point<S,T>);
T diameter (void) const;
extent<S,T> magnitude (void) const;
bool overlaps (point<S,T>) const;