|
| BOX2 (const Vec &aPos, const Vec &aSize) |
|
void | SetMaximum () |
|
Vec | Centre () const |
|
template<class Container > |
void | Compute (const Container &aPointList) |
| Compute the bounding box from a given list of points. More...
|
|
void | Move (const Vec &aMoveVector) |
| Function Move moves the rectangle by the aMoveVector. More...
|
|
BOX2< Vec > & | Normalize () |
| Function Normalize ensures that the height ant width are positive.
|
|
bool | Contains (const Vec &aPoint) const |
| Function Contains. More...
|
|
bool | Contains (coord_type x, coord_type y) const |
| Function Contains. More...
|
|
bool | Contains (const BOX2< Vec > &aRect) const |
| Function Contains. More...
|
|
const Vec & | GetSize () const |
|
coord_type | GetX () const |
|
coord_type | GetY () const |
|
const Vec & | GetOrigin () const |
|
const Vec & | GetPosition () const |
|
const Vec | GetEnd () const |
|
coord_type | GetWidth () const |
|
coord_type | GetHeight () const |
|
coord_type | GetRight () const |
|
coord_type | GetBottom () const |
|
coord_type | GetLeft () const |
|
coord_type | GetTop () const |
|
void | MoveTopTo (coord_type aTop) |
|
void | MoveBottomTo (coord_type aBottom) |
|
void | MoveLeftTo (coord_type aLeft) |
|
void | MoveRightTo (coord_type aRight) |
|
void | SetOrigin (const Vec &pos) |
|
void | SetOrigin (coord_type x, coord_type y) |
|
void | SetSize (const Vec &size) |
|
void | SetSize (coord_type w, coord_type h) |
|
void | Offset (coord_type dx, coord_type dy) |
|
void | Offset (const Vec &offset) |
|
void | SetX (coord_type val) |
|
void | SetY (coord_type val) |
|
void | SetWidth (coord_type val) |
|
void | SetHeight (coord_type val) |
|
void | SetEnd (coord_type x, coord_type y) |
|
void | SetEnd (const Vec &pos) |
|
bool | Intersects (const BOX2< Vec > &aRect) const |
| Function Intersects. More...
|
|
BOX2< Vec > | Intersect (const BOX2< Vec > &aRect) |
| Function Intersect Returns the intersection of this with another rectangle.
|
|
const std::string | Format () const |
|
BOX2< Vec > & | Inflate (coord_type dx, coord_type dy) |
| Function Inflate inflates the rectangle horizontally by dx and vertically by dy. More...
|
|
BOX2< Vec > & | Inflate (int aDelta) |
| Function Inflate inflates the rectangle horizontally and vertically by aDelta. More...
|
|
BOX2< Vec > & | Merge (const BOX2< Vec > &aRect) |
| Function Merge modifies the position and size of the rectangle in order to contain aRect. More...
|
|
BOX2< Vec > & | Merge (const Vec &aPoint) |
| Function Merge modifies the position and size of the rectangle in order to contain the given point. More...
|
|
ecoord_type | GetArea () const |
| Function GetArea returns the area of the rectangle. More...
|
|
ecoord_type | Diagonal () const |
| Function GetArea returns the length of the diagonal of the rectangle. More...
|
|
ecoord_type | SquaredDistance (const Vec &aP) const |
|
ecoord_type | Distance (const Vec &aP) const |
|
ecoord_type | SquaredDistance (const BOX2< Vec > &aBox) const |
| Function SquaredDistance returns the square of the minimum distance between self and box aBox. More...
|
|
ecoord_type | Distance (const BOX2< Vec > &aBox) const |
| Function Distance returns the minimum distance between self and box aBox. More...
|
|
bool | operator== (const BOX2< Vec > &aOther) const |
|
bool | operator!= (const BOX2< Vec > &aOther) const |
|
template<class Vec>
class BOX2< Vec >
Class BOX2 handles a 2-D bounding box, built on top of an origin point and size vector, both of templated class Vec.