Antkeeper
0.0.1
|
n-dimensional axis-aligned rectangle. More...
#include <hyperrectangle.hpp>
Public Types | |
using | vector_type = math::vector< T, N > |
Vector type. More... | |
Public Member Functions | |
constexpr bool | contains (const vector_type &point) const noexcept |
Tests whether a point is contained within this hyperrectangle. More... | |
constexpr bool | contains (const hyperrectangle &other) const noexcept |
Tests whether another hyperrectangle is contained within this hyperrectangle. More... | |
constexpr vector_type | center () const noexcept |
Returns the center position of the hyperrectangle. More... | |
T | distance (const vector_type &point) const noexcept |
Calculates the signed distance from the hyperrectangle to a point. More... | |
void | extend (const vector_type &point) noexcept |
Extends the hyperrectangle to include a point. More... | |
void | extend (const hyperrectangle &other) noexcept |
Extends the hyperrectangle to include another hyperrectangle. More... | |
constexpr bool | intersects (const hyperrectangle &other) const noexcept |
Tests whether another hyperrectangle intersects this hyperrectangle. More... | |
constexpr vector_type | size () const noexcept |
Calculates the size of the hyperrectangle. More... | |
constexpr vector_type | extents () const noexcept |
Calculates the extents of the hyperrectangle. More... | |
constexpr bool | degenerate () const noexcept |
Returns true if any coordinates of min are greater than max , false otherwise. More... | |
constexpr T | volume () const noexcept |
Calculates the volume of the hyperrectangle. More... | |
constexpr vector_type | corner (std::size_t index) const noexcept |
Returns the nth corner of the hyperrectangle. More... | |
Public Attributes | |
vector_type | min |
Minimum extent of the hyperrectangle. More... | |
vector_type | max |
Maximum extent of the hyperrectangle. More... | |
n-dimensional axis-aligned rectangle.
T | Real type. |
N | Number of dimensions. |
Definition at line 36 of file hyperrectangle.hpp.
using geom::primitives::hyperrectangle< T, N >::vector_type = math::vector<T, N> |
Vector type.
Definition at line 39 of file hyperrectangle.hpp.
|
inlineconstexprnoexcept |
Returns the center position of the hyperrectangle.
Definition at line 86 of file hyperrectangle.hpp.
|
inlineconstexprnoexcept |
Tests whether another hyperrectangle is contained within this hyperrectangle.
other | Hyperrectangle to test for containment. |
true
if the hyperrectangle is contained within this hyperrectangle, false
otherwise. Definition at line 73 of file hyperrectangle.hpp.
|
inlineconstexprnoexcept |
Tests whether a point is contained within this hyperrectangle.
point | Point to test for containment. |
true
if the point is contained within this hyperrectangle, false
otherwise. Definition at line 54 of file hyperrectangle.hpp.
|
inlineconstexprnoexcept |
Returns the nth corner of the hyperrectangle.
index | Index of a corner. |
Definition at line 189 of file hyperrectangle.hpp.
|
inlineconstexprnoexcept |
Returns true
if any coordinates of min
are greater than max
, false
otherwise.
Definition at line 160 of file hyperrectangle.hpp.
|
inlinenoexcept |
Calculates the signed distance from the hyperrectangle to a point.
point | Input point. |
point
. Definition at line 98 of file hyperrectangle.hpp.
|
inlinenoexcept |
Extends the hyperrectangle to include another hyperrectangle.
other | Hyperrectangle to include in this hyperrectangle. |
Definition at line 120 of file hyperrectangle.hpp.
|
inlinenoexcept |
Extends the hyperrectangle to include a point.
point | Point to include in the hyperrectangle. |
Definition at line 109 of file hyperrectangle.hpp.
|
inlineconstexprnoexcept |
Calculates the extents of the hyperrectangle.
Definition at line 152 of file hyperrectangle.hpp.
|
inlineconstexprnoexcept |
Tests whether another hyperrectangle intersects this hyperrectangle.
other | Hyperrectangle to test for intersection. |
true
if the hyperrectangle intersects this hyperrectangle, false
otherwise. Definition at line 133 of file hyperrectangle.hpp.
|
inlineconstexprnoexcept |
Calculates the size of the hyperrectangle.
Definition at line 146 of file hyperrectangle.hpp.
|
inlineconstexprnoexcept |
Calculates the volume of the hyperrectangle.
Definition at line 174 of file hyperrectangle.hpp.
vector_type geom::primitives::hyperrectangle< T, N >::max |
Maximum extent of the hyperrectangle.
Definition at line 45 of file hyperrectangle.hpp.
vector_type geom::primitives::hyperrectangle< T, N >::min |
Minimum extent of the hyperrectangle.
Definition at line 42 of file hyperrectangle.hpp.