region: add rebase method

sets region base point
This commit is contained in:
Danny Robson 2015-03-02 18:48:20 +11:00
parent 3e2c70f251
commit 69864bdfcd
2 changed files with 14 additions and 0 deletions

View File

@ -126,6 +126,18 @@ util::region<T>::empty (void) const
}
//-----------------------------------------------------------------------------
template <typename T>
util::point<2,T>
util::region<T>::rebase (util::point<2,T> p)
{
x = p.x;
y = p.y;
return base ();
}
//-----------------------------------------------------------------------------
template <typename T>
util::point<2,T>

View File

@ -60,6 +60,8 @@ namespace util {
bool empty (void) const;
point<2,T> rebase (util::point<2,T>);
point<2,T> base (void) const;
point<2,T> away (void) const;
point<2,T> centre (void) const;