31#include <SFML/System/Vector2.hpp>
67 Rect(T rectLeft, T rectTop, T rectWidth, T rectHeight);
213#include <SFML/Graphics/Rect.inl>
Utility class for manipulating 2D axis aligned rectangles.
Rect()
Default constructor.
Rect(T rectLeft, T rectTop, T rectWidth, T rectHeight)
Construct the rectangle from its coordinates.
Rect(const Vector2< T > &position, const Vector2< T > &size)
Construct the rectangle from position and size.
bool contains(const Vector2< T > &point) const
Check if a point is inside the rectangle's area.
T width
Width of the rectangle.
T height
Height of the rectangle.
Rect(const Rect< U > &rectangle)
Construct the rectangle from another type of rectangle.
sf::Vector2< T > getPosition() const
Get the position of the rectangle's top-left corner.
bool contains(T x, T y) const
Check if a point is inside the rectangle's area.
T left
Left coordinate of the rectangle.
sf::Vector2< T > getSize() const
Get the size of the rectangle.
T top
Top coordinate of the rectangle.
bool intersects(const Rect< T > &rectangle) const
Check the intersection between two rectangles.
bool intersects(const Rect< T > &rectangle, Rect< T > &intersection) const
Check the intersection between two rectangles.
Utility template class for manipulating 2-dimensional vectors.