Rect is an utility class for manipulating rectangles. More...
#include <Rect.hpp>
Public Member Functions | |
Rect () | |
Default constructor. More... | |
Rect (T LeftCoord, T TopCoord, T RightCoord, T BottomCoord) | |
Construct the rectangle from its coordinates. More... | |
T | GetWidth () const |
Get the width of the rectangle. More... | |
T | GetHeight () const |
Get the height of the rectangle. More... | |
void | Offset (T OffsetX, T OffsetY) |
Move the whole rectangle by the given offset. More... | |
bool | Contains (T X, T Y) const |
Check if a point is inside the rectangle's area. More... | |
bool | Intersects (const Rect< T > &Rectangle, Rect< T > *OverlappingRect=NULL) const |
Check intersection between two rectangles. More... | |
Public Attributes | |
T | Left |
Left coordinate of the rectangle. More... | |
T | Top |
Top coordinate of the rectangle. More... | |
T | Right |
Right coordinate of the rectangle. More... | |
T | Bottom |
Bottom coordinate of the rectangle. More... | |
Rect is an utility class for manipulating rectangles.
Template parameter defines the type of coordinates (integer, float, ...)
Rect::Rect | ( | T | LeftCoord, |
T | TopCoord, | ||
T | RightCoord, | ||
T | BottomCoord | ||
) |
Construct the rectangle from its coordinates.
Construct the color from its coordinates.
LeftCoord | : Left coordinate of the rectangle |
TopCoord | : Top coordinate of the rectangle |
RightCoord | : Right coordinate of the rectangle |
BottomCoord | : Bottom coordinate of the rectangle |
bool Rect::Contains | ( | T | X, |
T | Y | ||
) | const |
T Rect::GetHeight | ( | ) | const |
T Rect::GetWidth | ( | ) | const |
void Rect::Offset | ( | T | OffsetX, |
T | OffsetY | ||
) |
T sf::Rect< T >::Bottom |
T sf::Rect< T >::Left |
T sf::Rect< T >::Right |
T sf::Rect< T >::Top |