aabb: add diameter method
This commit is contained in:
parent
ed38fd0491
commit
a946b182f9
9
aabb.cpp
9
aabb.cpp
@ -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>
|
template <size_t S, typename T>
|
||||||
util::extent<S,T>
|
util::extent<S,T>
|
||||||
|
1
aabb.hpp
1
aabb.hpp
@ -30,6 +30,7 @@ namespace util {
|
|||||||
AABB () = default;
|
AABB () = default;
|
||||||
AABB (point<S,T>, point<S,T>);
|
AABB (point<S,T>, point<S,T>);
|
||||||
|
|
||||||
|
T diameter (void) const;
|
||||||
extent<S,T> magnitude (void) const;
|
extent<S,T> magnitude (void) const;
|
||||||
|
|
||||||
bool overlaps (point<S,T>) const;
|
bool overlaps (point<S,T>) const;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user