![]() |
xyginext
0.2.0
Second generation of xygine game creation framework
|
Functions for manipulating rectangle types. More...
Functions | |
template<typename T > | |
bool | contains (const sf::Rect< T > &first, const sf::Rect< T > &second) |
Returns true if the second given Rect is fully contained within the first. | |
template<typename T > | |
sf::Vector2< T > | centre (const sf::Rect< T > &rect) |
Returns the centre point of a given Rect. | |
template<typename T > | |
sf::Rect< T > | fromBounds (const sf::Vector2< T > &lower, const sf::Vector2< T > &upper) |
Returns a new Rect from the given upper and lower bounds. | |
template<typename T > | |
T | getPerimeter (sf::Rect< T > rect) |
Returns the total perimeter of the given rectangle. | |
template<typename T > | |
sf::Rect< T > | combine (sf::Rect< T > a, sf::Rect< T > b) |
Merges 2 given rectangles and returns the result. | |
Functions for manipulating rectangle types.