|
| | Rect () noexcept |
| | Constructor.
|
| | Rect (const Type x, const Type y, const Type width, const Type height) noexcept |
| | Argument constructor.
|
| | ~Rect () noexcept |
| | Destructor.
|
| bool | contains (const Type _x, const Type _y) const noexcept |
| | Does the rectangle contain the point (x, y).
|
| bool | contains (const Rect< Type > &b) const noexcept |
| | Does the rectangle contain another rectangle.
|
| bool | overlaps (const Rect< Type > &b) noexcept |
| | Do the rectangles a and b overlap.
|
| bool | intersects (const Rect< Type > &b) const noexcept |
| | Do two rectangles intersect.
|
| void | set_top_left (const glm::vec< 2, Type, glm::defaultp > &pos) noexcept |
| | Set the top-left position.
|
| Type | get_right () const noexcept |
| | Get top right corner.
|
| Type | get_bottom () const noexcept |
| | Get bottom left corner.
|
| glm::vec< 2, Type, glm::defaultp > | get_top_left () const noexcept |
| | Get the upper-left coordinate.
|
| glm::vec< 2, Type, glm::defaultp > | get_center () const noexcept |
| | Gets the center of the rectangle.
|
| glm::vec< 2, Type, glm::defaultp > | get_size () const noexcept |
| | Gets width and height of rectangle.
|
| auto | operator<=> (const Rect &) const noexcept=default |
| | Comparison operator.
|
template<meta::is_arithmetic Type>
class galaxy::Rect< Type >
Represents a rectangle object.
- Template Parameters
-
| Type | Arithmetic type to use for a rectangle. |
Definition at line 25 of file Rect.hpp.