Flat 2D axis-aligned rectangle shape with a position and size.
More...
#include <donut/shapes.hpp>
|
| constexpr | operator Box< 2, T > () const noexcept |
| | Convert this rectangle to an equivalent 2D axis-aligned box.
|
| |
| constexpr bool | contains (const Point< 2, T > &point) const noexcept |
| | Check if a given point is contained within the extents of this rectangle.
|
| |
|
| Point< 2, T > | position |
| | Position of the bottom left corner of the rectangle.
|
| |
| Length< 2, T > | size |
| | Width and height of the rectangle.
|
| |
template<typename T>
struct donut::Rectangle< T >
Flat 2D axis-aligned rectangle shape with a position and size.
- Template Parameters
-
| T | component type for vector coordinates. |
◆ operator Box< 2, T >()
Convert this rectangle to an equivalent 2D axis-aligned box.
- Returns
- the rectangle as an axis-aligned box.
◆ contains()
Check if a given point is contained within the extents of this rectangle.
- Returns
- true if the rectangle contains the given point, false otherwise.
◆ position
Position of the bottom left corner of the rectangle.
◆ size
Width and height of the rectangle.
The documentation for this struct was generated from the following files: