|
constexpr | RectType () noexcept=default |
|
constexpr | RectType (const PointType< Dim > &point, const SizeType< Dim, DimCompat > &size) noexcept |
| Construct a rectangle with an explicit point and size. More...
|
|
template<typename Dim2 > |
constexpr | RectType (const RectType< Dim2 > &r) |
|
constexpr | RectType (const SizeType< Dim, DimCompat > &size) noexcept |
| Construct a rectangle with the specified size and the point being at the default origin 0,0. More...
|
|
constexpr | RectType (Dim x, Dim y, Dim width, Dim height) noexcept |
|
constexpr EGT_NODISCARD Dim | area () const noexcept |
| Calculate the area of the rectangle. More...
|
|
constexpr EGT_NODISCARD Dim | bottom () const noexcept |
| Get the bottom side the rectangle. More...
|
|
constexpr EGT_NODISCARD PointType< Dim, DimCompat > | bottom_left () const noexcept |
| Get the bottom left point of the rectangle. More...
|
|
constexpr EGT_NODISCARD PointType< Dim, DimCompat > | bottom_right () const noexcept |
| Get the bottom right point of the rectangle. More...
|
|
constexpr EGT_NODISCARD PointType< Dim, DimCompat > | center () const noexcept |
| Return the center point of the rectangle. More...
|
|
constexpr void | clear () noexcept |
| Clear the rectangle by giving it no width or height. More...
|
|
constexpr EGT_NODISCARD bool | contains (const RectType &rhs) const noexcept |
| Returns true if this rectangle contains the specified one. More...
|
|
constexpr EGT_NODISCARD bool | empty () const noexcept |
| Returns true if the rectangle has no width or height. More...
|
|
constexpr void | grow_around_center (Dim radius) noexcept |
| Grow the rectangle around its center by the specified radius. More...
|
|
constexpr EGT_NODISCARD Dim | height () const noexcept |
| Get the height value. More...
|
|
constexpr void | height (Dim height) noexcept |
| Set the height value. More...
|
|
constexpr EGT_NODISCARD bool | intersect (const PointType< Dim, DimCompat > &point) const noexcept |
| Returns true if the specified point is inside the rectangle. More...
|
|
constexpr EGT_NODISCARD bool | intersect (const RectType &rect) const noexcept |
| Determine if two rectangles intersect, or, overlap. More...
|
|
constexpr EGT_NODISCARD Dim | left () const noexcept |
| Get the left side the rectangle. More...
|
|
constexpr void | move_to_center (const PointType< Dim, DimCompat > ¢er) noexcept |
| Move the rectangle's center to the specified point. More...
|
|
constexpr RectType & | operator+= (const PointType< Dim, DimCompat > &rhs) noexcept |
| RectType operator. More...
|
|
constexpr RectType & | operator+= (const SizeType< Dim, DimCompat > &rhs) noexcept |
| RectType operator. More...
|
|
constexpr RectType & | operator-= (const PointType< Dim, DimCompat > &rhs) noexcept |
| RectType operator. More...
|
|
constexpr RectType & | operator-= (const SizeType< Dim, DimCompat > &rhs) noexcept |
| RectType operator. More...
|
|
constexpr EGT_NODISCARD const PointType< Dim, DimCompat > & | point () const noexcept |
| Get the PointType of the rectangle. More...
|
|
constexpr void | point (const PointType< Dim, DimCompat > &p) noexcept |
| Set the rectangle's origin to the specified point. More...
|
|
constexpr EGT_NODISCARD Dim | right () const noexcept |
| Get the right side the rectangle. More...
|
|
constexpr void | shrink_around_center (Dim radius) noexcept |
| Shrink the rectangle around its center by the specified radius. More...
|
|
constexpr EGT_NODISCARD const SizeType< Dim, DimCompat > & | size () const noexcept |
| Get the SizeType of the rectangle. More...
|
|
constexpr void | size (const SizeType< Dim, DimCompat > &size) noexcept |
| Set the SizeType of the rectangle. More...
|
|
constexpr EGT_NODISCARD Dim | top () const noexcept |
| Get the top side of the rectangle. More...
|
|
constexpr EGT_NODISCARD PointType< Dim, DimCompat > | top_left () const noexcept |
| Get the top left point of the rectangle. More...
|
|
constexpr EGT_NODISCARD PointType< Dim, DimCompat > | top_right () const noexcept |
| Get the top right point of the rectangle. More...
|
|
constexpr EGT_NODISCARD Dim | width () const noexcept |
| Get the width value. More...
|
|
constexpr void | width (Dim width) noexcept |
| Set the width value. More...
|
|
constexpr EGT_NODISCARD Dim | x () const noexcept |
| Get the x value. More...
|
|
constexpr void | x (Dim x) noexcept |
| Set the x value. More...
|
|
constexpr EGT_NODISCARD Dim | y () const noexcept |
| Get the y value. More...
|
|
constexpr void | y (Dim y) noexcept |
| Set the y value. More...
|
|
template<class Dim, detail::Compatible DimCompat = detail::Compatible::normal>
class egt::v1::RectType< Dim, DimCompat >
A rectangle with a point and a size.
Typically Rect, RectF are used as aliases.
All rectangle points are at the top left.