Rectangle2D Sapphire's class.
More...
#include <Rectangle2D.hpp>
|
| Rect2D ()=default |
| Default constructor.
|
|
| Rect2D (const Vec2< T > &_offset, const Vec2< T > &_extent) noexcept |
| Constructor from offset and extent.
|
|
| Rect2D (T _x, T _y, T _width, T _height) noexcept |
| Constructor from (x, y) (offset) and (width, height) (extent).
|
|
|
union { | |
|
Vec2< T > offset = Vec2<T>() | |
| offset.
|
|
struct { | |
|
T x | |
| alias for offset.x
|
|
T y | |
| alias for offset.y
|
|
} | | |
|
}; | | |
|
union { | |
|
Vec2< T > extent = Vec2<T>() | |
| extents.
|
|
struct { | |
|
T width | |
| alias for extent.x
|
|
T height | |
| alias for extent.y
|
|
} | | |
|
}; | | |
|
template<typename T>
struct SA::Rect2D< T >
Rectangle2D Sapphire's class.
- Template Parameters
-
◆ Rect2D() [1/2]
Constructor from offset and extent.
- Parameters
-
_offset | Offset |
_extent | Extent |
◆ Rect2D() [2/2]
template<typename T >
SA::Rect2D< T >::Rect2D |
( |
T | _x, |
|
|
T | _y, |
|
|
T | _width, |
|
|
T | _height ) |
|
inlinenoexcept |
Constructor from (x, y) (offset) and (width, height) (extent).
- Parameters
-
_x | X offset value. |
_y | Y offset value |
_width | Width extent value. |
_height | Height extent value. |
The documentation for this struct was generated from the following file: