|
|
bool | Normal () const noexcept |
| | is bottom <= top and left <= right
|
|
Rect & | Normalize () noexcept |
| | make bottom <= top and left <= right
|
| Valtype | Left () const noexcept |
| Valtype | Top () const noexcept |
| Valtype | Right () const noexcept |
| Valtype | Bottom () const noexcept |
|
Rect & | Left (Valtype val) noexcept |
| | Sets left edge of this rect.
|
|
Rect & | Top (Valtype val) noexcept |
| | Sets top edge of this rect.
|
|
Rect & | Right (Valtype val) noexcept |
| | Sets right edge of this rect.
|
|
Rect & | Bottom (Valtype val) noexcept |
| | Sets bottom edge of this rect.
|
| Position2D< Valtype > | LeftTop () const noexcept |
| Position2D< Valtype > | LeftBottom () const noexcept |
| Position2D< Valtype > | RightBottom () const noexcept |
| Position2D< Valtype > | RightTop () const noexcept |
| Position2D< Valtype > | Center () const noexcept |
| Valtype | Width () const noexcept |
| Valtype | Height () const noexcept |
| auto | Area () const noexcept -> decltype(Valtype{} *Valtype{}) |
| Valtype | Diagonal () const noexcept |
|
bool | IsArea () const noexcept |
| | Is non zero area?
|
|
Rect & | Union (const Rect &r1, const Rect &r2) noexcept |
| | Calculates the union of the two rects.
|
|
Rect & | Union (const Rect &rect) noexcept |
| | Calculates the union of this and rect.
|
| Rect & | Intersection (const Rect &r1, const Rect &r2) noexcept |
| | Calculates the intersection rect of r1 and r2.
|
| Rect & | Intersection (const Rect &rect) noexcept |
| | Calculates the intersection of this and rect.
|
| bool | Includes (Valtype x, Valtype y) const noexcept |
| bool | Includes (const Position2D< Valtype > &pt) const noexcept |
| Rect & | Expand (Valtype x, Valtype y) noexcept |
| | Expands the rect so that it touches (being included or laying on border) the point.
|
| Rect & | Expand (const Position2D< Valtype > &pt) noexcept |
| | Expands the rect so that it touches (being included or laying on border) the point.
|
| Rect & | Inflate (Valtype dx, Valtype dy) noexcept |
| | Moves the edges to the outside of the rect, thereyby inflating it.
|
| Rect & | Deflate (Valtype dx, Valtype dy) noexcept |
| | Moves the edges to the inward side of the rect, thereyby deflating it.
|
- Parameters
-
| lefttop | |
| rightbottom | |
| left | |
| top | |
| right | |
| bottom | |
|
|
| Rect () noexcept=default |
| | Does not initialize the members.
|
|
| Rect (Valtype width, Valtype height) noexcept |
| | Does not initialize the members.
|
|
| Rect (const common::Interval< Valtype > &width, const common::Interval< Valtype > &height) noexcept |
| | Does not initialize the members.
|
|
| Rect (const Vector2D< Valtype > &diagonal) noexcept |
| | Does not initialize the members.
|
|
| Rect (const Position2D< Valtype > &lefttop, const Position2D< Valtype > &rightbottom) noexcept |
| | Does not initialize the members.
|
|
| Rect (Valtype left, Valtype top, Valtype right, Valtype bottom) noexcept |
| | Does not initialize the members.
|
Initializes the interval to origin.
- Parameters
-
| left | Left edge of the Rect. |
| top | Right edge of the Rect. |
| width | Width of the Rect. |
| height | Height of the Rect. |
|
|
Rect & | Init () noexcept |
|
Rect & | Init (Valtype left, Valtype top, Valtype width, Valtype height) noexcept |
Moves the edges in one direction, thereby moving the rect.
- Parameters
-
| dx | Distance to move horizontal edges. |
| dy | Distance to move vertical edges. |
| offset | Distance to move the rect. |
|
|
Rect & | Move (Valtype dx, Valtype dy) noexcept |
|
Rect & | Move (const Vector2D< Valtype > &offset) noexcept |
template<typename Valtype>
struct spat::Rect< Valtype >
Axis aligned rectangle.