|
|
tt_force_inline | aarect (aarect const &rhs) noexcept=default |
| |
|
tt_force_inline aarect & | operator= (aarect const &rhs) noexcept=default |
| |
|
tt_force_inline | aarect (aarect &&rhs) noexcept=default |
| |
|
tt_force_inline aarect & | operator= (aarect &&rhs) noexcept=default |
| |
| template<typename X , typename Y , typename W = float, typename H = float, std::enable_if_t< std::is_arithmetic_v< X > &&std::is_arithmetic_v< Y > &&std::is_arithmetic_v< W > &&std::is_arithmetic_v< H >, int > = 0> |
| tt_force_inline | aarect (X x, Y y, W width, H height) noexcept |
| | Create a box from the position and size.
|
| |
| tt_force_inline | aarect (vec const &position, vec const &extent) noexcept |
| | Create a rectangle from the position and size.
|
| |
| tt_force_inline | aarect (vec const &extent) noexcept |
| | Create a rectangle from the size.
|
| |
|
| operator bool () const noexcept |
| |
| aarect & | operator|= (aarect const &rhs) noexcept |
| | Expand the current rectangle to include the new rectangle.
|
| |
| aarect & | operator|= (vec const &rhs) noexcept |
| | Expand the current rectangle to include the new point.
|
| |
| aarect & | operator+= (vec const &rhs) noexcept |
| | Translate the box to a new position.
|
| |
| aarect & | operator-= (vec const &rhs) noexcept |
| | Translate the box to a new position.
|
| |
| aarect & | operator*= (float rhs) noexcept |
| | Scale the box by moving the positions (scaling the vectors).
|
| |
| template<size_t I> |
| tt_force_inline vec | corner () const noexcept |
| | Get coordinate of a corner.
|
| |
| tt_force_inline vec | p0 () const noexcept |
| | Get coordinate of a corner.
|
| |
|
tt_force_inline vec | p3 () const noexcept |
| |
| tt_force_inline vec | offset () const noexcept |
| | Get vector from origin to the bottom-left corner.
|
| |
| vec | extent () const noexcept |
| | Get size of the rectangle.
|
| |
|
tt_force_inline float | x () const noexcept |
| |
|
tt_force_inline float | y () const noexcept |
| |
|
tt_force_inline float | width () const noexcept |
| |
|
tt_force_inline float | height () const noexcept |
| |
|
template<typename T , std::enable_if_t< std::is_arithmetic_v< T >, int > = 0> |
| tt_force_inline aarect & | width (T newWidth) noexcept |
| |
|
template<typename T , std::enable_if_t< std::is_arithmetic_v< T >, int > = 0> |
| tt_force_inline aarect & | height (T newHeight) noexcept |
| |
| bool | contains (vec const &rhs) const noexcept |
| | Check if a 2D coordinate is inside the rectangle.
|
| |
|
|
class | R32G32B32A32SFloat |
| |
| aarect | align (aarect haystack, aarect needle, Alignment alignment) noexcept |
| | Align a rectangle within another rectangle.
|
| |
|
bool | operator== (aarect const &lhs, aarect const &rhs) noexcept |
| |
|
bool | operator!= (aarect const &lhs, aarect const &rhs) noexcept |
| |
|
bool | overlaps (aarect const &lhs, aarect const &rhs) noexcept |
| |
|
aarect | operator| (aarect const &lhs, aarect const &rhs) noexcept |
| |
|
aarect | operator| (aarect const &lhs, vec const &rhs) noexcept |
| |
|
aarect | operator+ (aarect const &lhs, vec const &rhs) noexcept |
| |
|
aarect | operator- (aarect const &lhs, vec const &rhs) noexcept |
| |
|
aarect | operator* (aarect const &lhs, float rhs) noexcept |
| |
| aarect | scale (aarect const &lhs, float rhs) noexcept |
| | Expand the rectangle for the same amount in all directions.
|
| |
| aarect | expand (aarect const &lhs, float rhs) noexcept |
| | Expand the rectangle for the same amount in all directions.
|
| |
| aarect | shrink (aarect const &lhs, float rhs) noexcept |
| | Shrink the rectangle for the same amount in all directions.
|
| |
|
aarect | round (aarect const &rhs) noexcept |
| |
Class which represents an axis-aligned rectangle.
template<typename X , typename Y , typename W = float, typename H = float, std::enable_if_t< std::is_arithmetic_v< X > &&std::is_arithmetic_v< Y > &&std::is_arithmetic_v< W > &&std::is_arithmetic_v< H >, int > = 0>
| tt_force_inline tt::aarect::aarect |
( |
X | x, |
|
|
Y | y, |
|
|
W | width, |
|
|
H | height ) |
|
inlinenoexcept |
Create a box from the position and size.
- Parameters
-
| x | The x location of the left-bottom corner of the box |
| y | The y location of the left-bottom corner of the box |
| width | The width of the box. |
| height | The height of the box. |