region: add rebase method
sets region base point
This commit is contained in:
parent
3e2c70f251
commit
69864bdfcd
12
region.cpp
12
region.cpp
@ -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>
|
||||
|
@ -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;
|
||||
|
Loading…
Reference in New Issue
Block a user