FIFE
2008.0
|
#include <rect.h>
Public Member Functions | |
RectType (T x=0, T y=0, T w=0, T h=0) | |
T | right () const |
T | bottom () const |
bool | operator== (const RectType< T > &rect) const |
bool | contains (const PointType2D< T > &point) const |
bool | intersects (const RectType< T > &rect) const |
bool | intersectInplace (const RectType< T > &rect) |
Public Attributes | |
T | x |
T | y |
T | w |
T | h |
A Rectangle on screen.
This is a small helper class used for screen coordinate arithmetics. The same thoughts reasong using int as value type as in Point apply.
|
inlineexplicit |
|
inline |
The Y coordinate of the bottom edge.
Definition at line 162 of file rect.h.
Referenced by FIFE::SDLImage::render(), and FIFE::GLImage::render().
|
inline |
|
inline |
Calculate rectangle intersection in place
rect | The other rectangle that is checked. |
Definition at line 181 of file rect.h.
References FIFE::RectType< T >::h, FIFE::RectType< T >::w, FIFE::RectType< T >::x, and FIFE::RectType< T >::y.
|
inline |
Check whether two rectangles share some area.
rect | The other rectangle that is checked. |
Definition at line 216 of file rect.h.
References FIFE::RectType< T >::h, FIFE::RectType< T >::w, FIFE::RectType< T >::x, and FIFE::RectType< T >::y.
|
inline |
Equivalence operator.
rect | The rectangle to which this is compared. |
Definition at line 167 of file rect.h.
References FIFE::RectType< T >::h, FIFE::RectType< T >::w, FIFE::RectType< T >::x, and FIFE::RectType< T >::y.
|
inline |
The X coordinate of the right edge.
Definition at line 157 of file rect.h.
Referenced by FIFE::SDLImage::render(), and FIFE::GLImage::render().
T FIFE::RectType< T >::h |
Height of the rectangle.
Definition at line 93 of file rect.h.
Referenced by FIFE::Camera::getMatchingInstances(), FIFE::RectType< T >::intersectInplace(), FIFE::RectType< T >::intersects(), FIFE::RectType< T >::operator==(), FIFE::SDLImage::render(), FIFE::GLImage::render(), FIFE::SDLImage::setClipArea(), FIFE::GLImage::setClipArea(), and FIFE::Camera::testRenderedViewPort().
T FIFE::RectType< T >::w |
Width of the rectangle.
Definition at line 90 of file rect.h.
Referenced by FIFE::Camera::getMatchingInstances(), FIFE::RectType< T >::intersectInplace(), FIFE::RectType< T >::intersects(), FIFE::RectType< T >::operator==(), FIFE::SDLImage::render(), FIFE::GLImage::render(), FIFE::SDLImage::setClipArea(), FIFE::GLImage::setClipArea(), and FIFE::Camera::testRenderedViewPort().
T FIFE::RectType< T >::x |
The X Coordinate.
Definition at line 84 of file rect.h.
Referenced by FIFE::Camera::getMatchingInstances(), FIFE::RectType< T >::intersectInplace(), FIFE::RectType< T >::intersects(), FIFE::RectType< T >::operator==(), FIFE::SDLImage::render(), FIFE::GLImage::render(), FIFE::SDLImage::setClipArea(), FIFE::GLImage::setClipArea(), and FIFE::Camera::testRenderedViewPort().
T FIFE::RectType< T >::y |
The Y Coordinate.
Definition at line 87 of file rect.h.
Referenced by FIFE::Camera::getMatchingInstances(), FIFE::RectType< T >::intersectInplace(), FIFE::RectType< T >::intersects(), FIFE::RectType< T >::operator==(), FIFE::SDLImage::render(), FIFE::GLImage::render(), FIFE::SDLImage::setClipArea(), FIFE::GLImage::setClipArea(), and FIFE::Camera::testRenderedViewPort().