|
Jafar
|
This class is used to represent a rectangle on an image. More...
This class is used to represent a rectangle on an image.
Definition at line 14 of file Rectangle.hpp.
#include <Rectangle.hpp>
Public Types | |
|
typedef boost::numeric::ublas::bounded_vector < _T_, 2 > | vec2 |
Public Member Functions | |
| Rectangle (const _T_ x, const _T_ y, const _T_ width, const _T_ height) | |
| Rectangle (const typename Rectangle::vec2 &topLeft, const typename Rectangle::vec2 &bottomRight) | |
| _T_ | left () const |
| Return the left coordinate of the rectangle. | |
| void | setLeft (_T_ v) |
| Set the left coordinate of the rectangle, width can be changed. | |
| void | moveLeft (_T_ v) |
| Set the left coordinate of the rectangle, but don't touch the width. | |
| _T_ | top () const |
| Return the top coordinate of the rectangle. | |
| void | setTop (_T_ v) |
| Set the top coordinate of the rectangle, height can be changed. | |
| void | moveTop (_T_ v) |
| Set the top coordinate of the rectangle, but don't touch the height. | |
| _T_ | right () const |
| Return the right coordinate of the rectangle. | |
| void | setRight (_T_ v) |
| Set the right coordinate of the rectangle, width can be changed. | |
| void | moveRight (_T_ v) |
| Set the right coordinate of the rectangle, but don't touch the width. | |
| _T_ | bottom () const |
| Return the bottom coordinate of the rectangle. | |
| void | setBottom (_T_ v) |
| Set the bottom coordinate of the rectangle, height can be changed. | |
| void | moveBottom (_T_ v) |
| Set the bottom coordinate of the rectangle, but don't touch the height. | |
| bool | contains (_T_ x, _T_ y) const |
| bool | contains (typename Rectangle::vec2 v) const |
| bool | strictlyContains (typename Rectangle::vec2 v) const |
| void | extend (const typename Rectangle::vec2 &v) |
| Extend the rectangle, in such a way that the rectangle contains the point. | |
| void | extend (const _T_ u, const _T_ v) |
| void | addCoord (_T_ x1, _T_ y1, _T_ x2, _T_ y2) |
| Add the coordinates to the respective coordinates of the corner of the point. | |
Private Attributes | |
| vec2 | m_topLeft |
| vec2 | m_bottomRight |
| bool jafar::geom::Rectangle< _T_ >::contains | ( | _T_ | x, |
| _T_ | y | ||
| ) | const [inline] |
Definition at line 55 of file Rectangle.hpp.
References jafar::geom::Rectangle< _T_ >::bottom(), jafar::geom::Rectangle< _T_ >::left(), jafar::geom::Rectangle< _T_ >::right(), and jafar::geom::Rectangle< _T_ >::top().
| bool jafar::geom::Rectangle< _T_ >::contains | ( | typename Rectangle< _T_ >::vec2 | v | ) | const [inline] |
Definition at line 61 of file Rectangle.hpp.
References jafar::geom::Rectangle< _T_ >::bottom(), jafar::geom::Rectangle< _T_ >::left(), jafar::geom::Rectangle< _T_ >::right(), and jafar::geom::Rectangle< _T_ >::top().
| bool jafar::geom::Rectangle< _T_ >::strictlyContains | ( | typename Rectangle< _T_ >::vec2 | v | ) | const [inline] |
Definition at line 66 of file Rectangle.hpp.
References jafar::geom::Rectangle< _T_ >::bottom(), jafar::geom::Rectangle< _T_ >::left(), jafar::geom::Rectangle< _T_ >::right(), and jafar::geom::Rectangle< _T_ >::top().
| Generated on Wed Oct 15 2014 00:37:37 for Jafar by doxygen 1.7.6.1 |
|