52 constexpr Rect() =
default;
158#include <SFML/Graphics/Rect.inl>
Utility class for manipulating 2D axis aligned rectangles.
Definition Rect.hpp:43
constexpr Rect(Vector2< T > position, Vector2< T > size)
Construct the rectangle from position and size.
Vector2< int > size
Definition Rect.hpp:119
constexpr bool operator!=(const Rect< T > &lhs, const Rect< T > &rhs)
Overload of binary operator !=.
Vector2< int > position
Definition Rect.hpp:118
constexpr Rect()=default
Default constructor.
constexpr std::optional< Rect< T > > findIntersection(const Rect< T > &rectangle) const
Check the intersection between two rectangles.
constexpr bool operator==(const Rect< T > &lhs, const Rect< T > &rhs)
Overload of binary operator ==.
constexpr Vector2< T > getCenter() const
Get the position of the center of the rectangle.
constexpr Rect(const Rect< U > &rectangle)
Construct the rectangle from another type of rectangle.
constexpr bool contains(Vector2< T > point) const
Check if a point is inside the rectangle's area.
Class template for manipulating 2-dimensional vectors.
Definition Vector2.hpp:41
Definition BlendMode.hpp:34
Rect< float > FloatRect
Definition Rect.hpp:154
Rect< int > IntRect
Definition Rect.hpp:153