Added Region.shift

- Provided a default implementation using expand+contract in AbstractRegion
- Overrid the implementation in the subtypes
This commit is contained in:
TomyLobo
2012-01-03 16:13:50 +01:00
parent 4d708a5003
commit 3a828c9759
6 changed files with 51 additions and 5 deletions

View File

@ -136,6 +136,11 @@ public class EllipsoidRegion extends AbstractRegion {
public void contract(Vector change) {
}
@Override
public void shift(Vector change) throws RegionOperationException {
center = center.add(change);
}
/**
* Get the center.
*