|
|
constexpr | axis_aligned_rectangle (axis_aligned_rectangle const &rhs) noexcept=default |
| |
|
constexpr axis_aligned_rectangle & | operator= (axis_aligned_rectangle const &rhs) noexcept=default |
| |
|
constexpr | axis_aligned_rectangle (axis_aligned_rectangle &&rhs) noexcept=default |
| |
|
constexpr axis_aligned_rectangle & | operator= (axis_aligned_rectangle &&rhs) noexcept=default |
| |
|
constexpr | axis_aligned_rectangle (array_type const &other) noexcept |
| |
| constexpr | axis_aligned_rectangle (value_type x, value_type y, value_type width, value_type height) noexcept |
| | Create a box from the position and size.
|
| |
| constexpr | axis_aligned_rectangle (extent< value_type, 2 > const &extent) noexcept |
| | Create a rectangle from the size.
|
| |
| constexpr | axis_aligned_rectangle (point< value_type, 2 > const &p0, point< value_type, 2 > const &p3) noexcept |
| | Create a rectangle from the left-bottom and right-top points.
|
| |
| constexpr | axis_aligned_rectangle (point< value_type, 2 > const &p0, extent< value_type, 2 > const &extent) noexcept |
| | Create a rectangle from the size.
|
| |
|
constexpr | operator array_type () const noexcept |
| |
| constexpr bool | holds_invariant () const noexcept |
| | Make sure p0 is left/bottom from p3.
|
| |
| constexpr bool | empty () const noexcept |
| | Check if the rectangle has no area.
|
| |
| constexpr | operator bool () const noexcept |
| | True when the rectangle has an area.
|
| |
| constexpr axis_aligned_rectangle & | operator|= (axis_aligned_rectangle const &rhs) noexcept |
| | Expand the current rectangle to include the new rectangle.
|
| |
| constexpr axis_aligned_rectangle & | operator|= (point< value_type, 2 > const &rhs) noexcept |
| | Expand the current rectangle to include the new rectangle.
|
| |
|
constexpr point< value_type, 2 > | operator[] (std::size_t i) const noexcept |
| |
| constexpr extent< value_type, 2 > | size () const noexcept |
| | Get size of the rectangle.
|
| |
|
constexpr value_type | x () const noexcept |
| |
|
constexpr value_type | y () const noexcept |
| |
|
constexpr value_type | width () const noexcept |
| |
|
constexpr value_type | height () const noexcept |
| |
|
constexpr value_type | bottom () const noexcept |
| |
|
constexpr value_type | top () const noexcept |
| |
|
constexpr value_type | left () const noexcept |
| |
|
constexpr value_type | right () const noexcept |
| |
| constexpr value_type | middle () const noexcept |
| | The middle on the y-axis between bottom and top.
|
| |
| constexpr value_type | center () const noexcept |
| | The center on the x-axis between left and right.
|
| |
|
constexpr axis_aligned_rectangle & | set_width (value_type newWidth) noexcept |
| |
|
constexpr axis_aligned_rectangle & | set_height (value_type newHeight) noexcept |
| |
| constexpr bool | contains (point< value_type, 2 > const &rhs) const noexcept |
| | Check if a 2D coordinate is inside the rectangle.
|
| |
| constexpr bool | contains (point< value_type, 3 > const &rhs) const noexcept |
| | Check if a 3D coordinate is inside the rectangle.
|
| |
|
|
template<int I> |
| constexpr friend point< value_type, 2 > | get (axis_aligned_rectangle const &rhs) noexcept |
| |
| constexpr friend point< value_type, 2 > | midpoint (axis_aligned_rectangle const &rhs) noexcept |
| | Get the center of the rectangle.
|
| |
| constexpr axis_aligned_rectangle | align (axis_aligned_rectangle haystack, extent< value_type, 2 > needle, alignment alignment) noexcept |
| | Align a rectangle within another rectangle.
|
| |
| constexpr axis_aligned_rectangle | align (axis_aligned_rectangle haystack, axis_aligned_rectangle needle, alignment alignment) noexcept |
| | Align a rectangle within another rectangle.
|
| |
|
constexpr bool | operator== (axis_aligned_rectangle const &lhs, axis_aligned_rectangle const &rhs) noexcept |
| |
|
constexpr bool | overlaps (axis_aligned_rectangle const &lhs, axis_aligned_rectangle const &rhs) noexcept |
| |
|
constexpr axis_aligned_rectangle | operator| (axis_aligned_rectangle const &lhs, axis_aligned_rectangle const &rhs) noexcept |
| |
|
constexpr axis_aligned_rectangle | operator| (axis_aligned_rectangle const &lhs, point< value_type, 2 > const &rhs) noexcept |
| |
| constexpr axis_aligned_rectangle | operator* (axis_aligned_rectangle const &lhs, value_type rhs) noexcept |
| | Expand the rectangle for the same amount in all directions.
|
| |
| constexpr axis_aligned_rectangle | operator+ (axis_aligned_rectangle const &lhs, value_type rhs) noexcept |
| | Expand the rectangle for the same amount in all directions.
|
| |
| constexpr axis_aligned_rectangle | operator- (axis_aligned_rectangle const &lhs, value_type rhs) noexcept |
| | Shrink the rectangle for the same amount in all directions.
|
| |
|
constexpr axis_aligned_rectangle | round (axis_aligned_rectangle const &rhs) noexcept |
| |
| constexpr axis_aligned_rectangle | ceil (axis_aligned_rectangle const &rhs) noexcept |
| | Round rectangle by expanding to pixel edge.
|
| |
| constexpr axis_aligned_rectangle | ceil (axis_aligned_rectangle const &lhs, extent< value_type, 2 > const &rhs) noexcept |
| | Round rectangle by expanding to a certain granularity.
|
| |
| constexpr axis_aligned_rectangle | floor (axis_aligned_rectangle const &rhs) noexcept |
| | Round rectangle by shrinking to pixel edge.
|
| |
|
constexpr axis_aligned_rectangle | bounding_rectangle (axis_aligned_rectangle const &rhs) noexcept |
| |
| constexpr axis_aligned_rectangle | intersect (axis_aligned_rectangle const &lhs, axis_aligned_rectangle const &rhs) noexcept |
| | Return the overlapping part of two rectangles.
|
| |
|
constexpr friend value_type | distance (axis_aligned_rectangle const &lhs, point< value_type, 2 > const &rhs) noexcept |
| |
template<typename T>
class hi::v1::geo::axis_aligned_rectangle< T >
Class which represents an axis-aligned rectangle.