|
constexpr | Box () noexcept |
| Default constructor. More...
|
|
constexpr | Box (Vector< T, N > p0, Vector< T, N > p1) noexcept |
| Constructor with two points. More...
|
|
constexpr | Box (const T(&p0)[N], const T(&p1)[N]) noexcept |
| Constructor with two points (as arrays) More...
|
|
constexpr | Box (Vector< T, N > p) noexcept |
| Constructor with one point. More...
|
|
constexpr Vector< T, N > | getPosition () const noexcept |
| Get the position of the box. More...
|
|
constexpr Vector< T, N > | getSize () const noexcept |
| Get the size of the box. More...
|
|
constexpr bool | isEmpty () const noexcept |
| Check if the box is empty. More...
|
|
constexpr Vector< T, N > | getCenter () const noexcept |
| Get the center of the box. More...
|
|
constexpr bool | contains (Vector< T, N > point) const noexcept |
| Check if a point is inside the box. More...
|
|
constexpr bool | contains (const Box< T, N > &other) const noexcept |
| Check if a box is totally inside the box. More...
|
|
constexpr bool | intersects (const Box< T, N > &other) const noexcept |
| Check if two boxes interset. More...
|
|
constexpr bool | intersects (const Box< T, N > &other, Box< T, N > &result) const noexcept |
| Check if two boxes interset and get the intersetion box. More...
|
|
constexpr Box< T, N > | getIntersection (const Box< T, N > &other) const noexcept |
| Compute the intersection of two boxes. More...
|
|
constexpr T | getIntersectionVolume (const Box< T, N > &other) const noexcept |
| Get the volume of the intersection. More...
|
|
constexpr T | getIntersectionExtentLength (const Box< T, N > &other) const noexcept |
| Get the extent length of the intersection. More...
|
|
constexpr void | extend (const T(&point)[N]) noexcept |
| Extend the box with a point (as array) More...
|
|
constexpr void | extend (Vector< T, N > point) noexcept |
| Extend the box with a point. More...
|
|
constexpr void | extend (const Box< T, N > &other) noexcept |
| Extend the box with a box. More...
|
|
constexpr Box< T, N > | getExtended (const Box< T, N > &other) const noexcept |
| Get the box extended by another box. More...
|
|
constexpr T | getVolume () const noexcept |
| Get the volume of the box. More...
|
|
constexpr T | getExtentLength () const noexcept |
| Get the extent length of the box. More...
|
|
constexpr T | getMinimumEdge () const noexcept |
| Get the minimum edge of the box. More...
|
|
constexpr Box< T, 2 > | grow (T value) const noexcept |
| Grow the box. More...
|
|
constexpr Box< T, 2 > | shrink (T value) const noexcept |
| Shrink the box. More...
|
|
constexpr void | normalize () noexcept |
| Ensures that min coordinates are less than max coordinates. More...
|
|
template<typename T, std::size_t N>
struct gf::Box< T, N >
A multi-dimensional box.
A box is defined by its minimum coordinates (included) and its maximum coordinates (excluded).
- See also
- gf::Rect