|
|
| axis_aligned_rectangle (axis_aligned_rectangle const &rhs) noexcept=default |
| |
|
axis_aligned_rectangle & | operator= (axis_aligned_rectangle const &rhs) noexcept=default |
| |
|
| axis_aligned_rectangle (axis_aligned_rectangle &&rhs) noexcept=default |
| |
|
axis_aligned_rectangle & | operator= (axis_aligned_rectangle &&rhs) noexcept=default |
| |
| | axis_aligned_rectangle (tt::arithmetic auto x, tt::arithmetic auto y, tt::arithmetic auto width, tt::arithmetic auto height) noexcept |
| | Create a box from the position and size.
|
| |
| | axis_aligned_rectangle (tt::arithmetic auto width, tt::arithmetic auto height) noexcept |
| | Create a box from the position and size.
|
| |
| | axis_aligned_rectangle (numeric_array< T, 4 > const &position, numeric_array< T, 4 > const &extent) noexcept |
| | Create a rectangle from the position and size.
|
| |
| | axis_aligned_rectangle (numeric_array< T, 4 > const &extent) noexcept |
| | Create a rectangle from the size.
|
| |
| bool | valid () const noexcept |
| | Make sure p0 is left/bottom from p3.
|
| |
| bool | empty () const noexcept |
| | Check if the rectangle has no area.
|
| |
| | operator bool () const noexcept |
| | True when the rectangle has an area.
|
| |
| axis_aligned_rectangle & | operator|= (axis_aligned_rectangle const &rhs) noexcept |
| | Expand the current rectangle to include the new rectangle.
|
| |
| axis_aligned_rectangle & | operator|= (numeric_array< T, 4 > const &rhs) noexcept |
| | Expand the current rectangle to include the new point.
|
| |
| axis_aligned_rectangle & | operator+= (numeric_array< T, 4 > const &rhs) noexcept |
| | Translate the box to a new position.
|
| |
| axis_aligned_rectangle & | operator-= (numeric_array< T, 4 > const &rhs) noexcept |
| | Translate the box to a new position.
|
| |
| axis_aligned_rectangle & | operator*= (T rhs) noexcept |
| | Scale the box by moving the positions (scaling the vectors).
|
| |
| template<size_t I> |
| numeric_array< T, 4 > | corner () const noexcept |
| | Get coordinate of a corner.
|
| |
|
numeric_array< T, 4 > | p0 () const noexcept |
| |
|
numeric_array< T, 4 > | p3 () const noexcept |
| |
| numeric_array< T, 4 > | offset () const noexcept |
| | Get vector from origin to the bottom-left corner.
|
| |
| numeric_array< T, 4 > | extent () const noexcept |
| | Get size of the rectangle.
|
| |
|
T | x () const noexcept |
| |
|
T | y () const noexcept |
| |
|
T | width () const noexcept |
| |
|
T | height () const noexcept |
| |
|
T | bottom () const noexcept |
| |
|
T | top () const noexcept |
| |
|
T | left () const noexcept |
| |
|
T | right () const noexcept |
| |
| T | middle () const noexcept |
| | The middle on the y-axis between bottom and top.
|
| |
| T | center () const noexcept |
| | The center on the x-axis between left and right.
|
| |
|
axis_aligned_rectangle & | set_width (T newWidth) noexcept |
| |
|
axis_aligned_rectangle & | set_height (T newHeight) noexcept |
| |
| bool | contains (numeric_array< T, 4 > const &rhs) const noexcept |
| | Check if a 2D coordinate is inside the rectangle.
|
| |
|
|
class | sfloat_rgba32 |
| |
| axis_aligned_rectangle | align (axis_aligned_rectangle haystack, axis_aligned_rectangle needle, alignment alignment) noexcept |
| | Align a rectangle within another rectangle.
|
| |
|
bool | operator== (axis_aligned_rectangle const &lhs, axis_aligned_rectangle const &rhs) noexcept |
| |
|
bool | operator!= (axis_aligned_rectangle const &lhs, axis_aligned_rectangle const &rhs) noexcept |
| |
|
bool | overlaps (axis_aligned_rectangle const &lhs, axis_aligned_rectangle const &rhs) noexcept |
| |
|
axis_aligned_rectangle | operator| (axis_aligned_rectangle const &lhs, axis_aligned_rectangle const &rhs) noexcept |
| |
|
axis_aligned_rectangle | operator| (axis_aligned_rectangle const &lhs, numeric_array< T, 4 > const &rhs) noexcept |
| |
|
axis_aligned_rectangle | operator+ (axis_aligned_rectangle const &lhs, numeric_array< T, 4 > const &rhs) noexcept |
| |
|
axis_aligned_rectangle | operator- (axis_aligned_rectangle const &lhs, numeric_array< T, 4 > const &rhs) noexcept |
| |
|
axis_aligned_rectangle | operator* (axis_aligned_rectangle const &lhs, T rhs) noexcept |
| |
| numeric_array< T, 4 > | center (axis_aligned_rectangle const &rhs) noexcept |
| | Get the center of the rectangle.
|
| |
| axis_aligned_rectangle | scale (axis_aligned_rectangle const &lhs, T rhs) noexcept |
| | Expand the rectangle for the same amount in all directions.
|
| |
| axis_aligned_rectangle | expand (axis_aligned_rectangle const &lhs, T rhs) noexcept |
| | Expand the rectangle for the same amount in all directions.
|
| |
| axis_aligned_rectangle | expand (axis_aligned_rectangle const &lhs, numeric_array< T, 4 > rhs) noexcept |
| | Expand the rectangle for the same amount in all directions.
|
| |
| axis_aligned_rectangle | shrink (axis_aligned_rectangle const &lhs, T rhs) noexcept |
| | Shrink the rectangle for the same amount in all directions.
|
| |
| axis_aligned_rectangle | shrink (axis_aligned_rectangle const &lhs, numeric_array< T, 4 > rhs) noexcept |
| | Shrink the rectangle for the same amount in all directions.
|
| |
|
axis_aligned_rectangle | round (axis_aligned_rectangle const &rhs) noexcept |
| |
| axis_aligned_rectangle | ceil (axis_aligned_rectangle const &rhs) noexcept |
| | Round rectangle by expanding to pixel edge.
|
| |
| axis_aligned_rectangle | floor (axis_aligned_rectangle const &rhs) noexcept |
| | Round rectangle by shrinking to pixel edge.
|
| |
| axis_aligned_rectangle | intersect (axis_aligned_rectangle const &lhs, axis_aligned_rectangle const &rhs) noexcept |
| | Return the overlapping part of two rectangles.
|
| |
| axis_aligned_rectangle | fit (axis_aligned_rectangle const &bounds, axis_aligned_rectangle const &rectangle) noexcept |
| | Make a rectangle fit inside bounds.
|
| |
template<typename T>
class tt::axis_aligned_rectangle< T >
Class which represents an axis-aligned rectangle.