A Region using dynamic vectors.
More...
#include <iolink/RegionX.h>
|
| RegionX (size_t dimension) |
| Creates an empty region.
|
|
| RegionX (const RegionX ®ion)=default |
| copy constructor
|
|
RegionX & | operator= (const RegionX &other)=default |
|
| RegionX (RegionX &®ion) noexcept=default |
| move constructor
|
|
RegionX & | operator= (RegionX &&other) noexcept=default |
|
| RegionX (const VectorType &origin, const SizeType &size) |
| Builds a region from its origin and size.
|
|
size_t | dimensionCount () const |
| The dimension of this region.
|
|
const VectorType & | origin () const |
| Returns the position of the region's origin.
|
|
const SizeType & | size () const |
| Returns the region's size.
|
|
VectorType | min () const |
| Returns the minimal point of the region.
|
|
VectorType | max () const |
| Return the maximal point of the region.
|
|
size_t | elementCount () const |
| Returns the number of cells in this region.
|
|
bool | isEmpty () const |
| Checks if the region is empty.
|
|
bool | contains (const RegionX &other) const |
| Checks if this region conatins another.
|
|
bool | contains (const VectorType &position) const |
| Checks if this region contains a point.
|
|
bool | intersect (const RegionX &other) const |
| Checks if this region intersect another.
|
|
RegionX | intersection (const RegionX &other) const |
| Returns the intersection of this region and another.
|
|
RegionX | extractSliceFromAxis (size_t dimension, T origin) const |
| Returns a region of size one along one axis.
|
|
bool | operator== (const RegionX &other) const |
|
bool | operator!= (const RegionX &other) const |
|
std::string | toString () const |
| Return a string representation.
|
|
|
static RegionX | fromIndex (const VectorX< T > &index) |
|
static RegionX | createFullRegion (const SizeType ®ionSize) |
| Utility factory that create the region of origin [0, 0, 0] and given size.
|
|
template<typename T>
class iolink::RegionX< T >
A Region using dynamic vectors.
◆ RegionX()
Creates an empty region.
- Parameters
-
dimension | The dimension of the region. |
◆ contains() [1/2]
Checks if this region conatins another.
- Exceptions
-
◆ contains() [2/2]
Checks if this region contains a point.
- Exceptions
-
◆ elementCount()
Returns the number of cells in this region.
Only applicable to integer typed regions. It will return 0 for floating point regions.
◆ extractSliceFromAxis()
Returns a region of size one along one axis.
- Parameters
-
dimension | axis on which the slice must be selected |
origin | position of slice in given dimension |
- Returns
- the slice at given position for given dimension
- Exceptions
-
e.g. a 3D region {{0, 0, 0}, {5, 6, 7}}
- extractSliceFromAxis(0, 3) returns 3D region {{3, 0, 0}, {1, 6, 7}}
- extractSliceFromAxis(1, 4) returns 3D region {{0, 4, 0}, {5, 1, 7}}
- extractSliceFromAxis(2, 5) returns 3D region {{0, 0, 5}, {5, 6, 1}}
e.g. a 3D region with non-null origin { {2, 3, 4}, {5, 6, 7}}
extractSliceFromAxis(0, 3) returns 3D region {{5, 3, 4}, {1, 6, 7}}
◆ intersect()
Checks if this region intersect another.
- Exceptions
-
◆ intersection()
Returns the intersection of this region and another.
If regions does not intersect, it returns an empty region.
- Exceptions
-
◆ isEmpty()
Checks if the region is empty.
An integer typed region is empty if one of its sizes is 0. A floating point region is empty is one of its sizes is Nan.
◆ min()
Returns the minimal point of the region.
Alias for origin.
The documentation for this class was generated from the following file: