aabb: add expand to include point

This commit is contained in:
Danny Robson 2015-03-12 01:05:47 +11:00
parent 5d9c2b1696
commit 800937086b
2 changed files with 12 additions and 0 deletions

View File

@ -45,6 +45,16 @@ AABB<S,T>::magnitude (void) const
}
//-----------------------------------------------------------------------------
template <size_t S, typename T>
void
AABB<S,T>::expand (point<S,T> p)
{
p0 = min (p, p0);
p1 = max (p, p1);
}
//-----------------------------------------------------------------------------
template <size_t S, typename T>
AABB<S,T>

View File

@ -34,6 +34,8 @@ namespace util {
extent<S,T> magnitude (void) const;
void expand (point<S,T>);
AABB<S,T> operator+ (vector<S,T>) const;
AABB<S,T> operator- (vector<S,T>) const;