The Region3 class represents the cartesian product of intervals Ix ✕ Iy ✕ Iz, one per axis, yielding an axis-aligned region of R^3 space. It can be thought of as an intersection of halfspaces. Regions may be open or closed in their boundaries, if any. More...
#include <gz/math/Region3.hh>
Public Member Functions | |
Region3 ()=default | |
Constructor. | |
constexpr | Region3 (Interval< T > _ix, Interval< T > _iy, Interval< T > _iz) |
Constructor. | |
bool | Contains (const Region3< T > &_other) const |
Check if the region contains _other region. | |
bool | Contains (const Vector3< T > &_point) const |
Check if the region contains _point | |
bool | Empty () const |
Check if the region is empty A region is empty if any of the intervals it is defined with (i.e. Ix, Iy, Iz) are. | |
bool | Intersects (const Region3< T > &_other) const |
Check if the region intersects _other region. | |
const Interval< T > & | Ix () const |
Get the x-axis interval for the region. | |
const Interval< T > & | Iy () const |
Get the y-axis interval for the region. | |
const Interval< T > & | Iz () const |
Get the z-axis interval for the region. | |
bool | operator!= (const Region3< T > &_other) const |
Inequality test operator. | |
bool | operator== (const Region3< T > &_other) const |
Equality test operator. | |
Static Public Member Functions | |
static constexpr Region3< T > | Closed (T _xLeft, T _yLeft, T _zLeft, T _xRight, T _yRight, T _zRight) |
Make a closed region. | |
static constexpr Region3< T > | Open (T _xLeft, T _yLeft, T _zLeft, T _xRight, T _yRight, T _zRight) |
Make an open region. | |
Static Public Attributes | |
static const Region3< T > & | Unbounded = detail::gUnboundedRegion3<T> |
An unbounded region (-∞, ∞) ✕ (-∞, ∞) ✕ (-∞, ∞) | |
Detailed Description
class gz::math::Region3< T >
The Region3 class represents the cartesian product of intervals Ix ✕ Iy ✕ Iz, one per axis, yielding an axis-aligned region of R^3 space. It can be thought of as an intersection of halfspaces. Regions may be open or closed in their boundaries, if any.
Note that the Region3 class is essentially a set R ⊆ R^3. For 3D solid box semantics, use the AxisAlignedBox
class instead.
Example
Constructor & Destructor Documentation
◆ Region3() [1/2]
◆ Region3() [2/2]
|
inlineconstexpr |
Constructor.
- Parameters
-
[in] _ix x-axis interval [in] _iy y-axis interval [in] _iz z-axis interval
Member Function Documentation
◆ Closed()
|
inlinestaticconstexpr |
Make a closed region.
- Parameters
-
[in] _xLeft leftmost x-axis interval value [in] _xRight righmost x-axis interval value [in] _yLeft leftmost y-axis interval value [in] _yRight righmost y-axis interval value [in] _zLeft leftmost z-axis interval value [in] _zRight righmost z-axis interval value
- Returns
- the [
_xLeft
,_xRight
] ✕ [_yLeft
,_yRight
] ✕ [_zLeft
,_zRight
] closed region
◆ Contains() [1/2]
Check if the region contains _other
region.
- Parameters
-
[in] _other region to check for membership
- Returns
- true if it is contained, false otherwise
◆ Contains() [2/2]
Check if the region contains _point
- Parameters
-
[in] _point point to check for membership
- Returns
- true if it is contained, false otherwise
Referenced by Region3< T >::operator!=(), and Region3< T >::operator==().
◆ Empty()
Check if the region is empty A region is empty if any of the intervals it is defined with (i.e. Ix, Iy, Iz) are.
- Returns
- true if it is empty, false otherwise
◆ Intersects()
Check if the region intersects _other
region.
- Parameters
-
[in] _other region to check for intersection
- Returns
- true if it is contained, false otherwise
◆ Ix()
Get the x-axis interval for the region.
- Returns
- the x-axis interval
◆ Iy()
Get the y-axis interval for the region.
- Returns
- the y-axis interval
◆ Iz()
Get the z-axis interval for the region.
- Returns
- the z-axis interval
◆ Open()
|
inlinestaticconstexpr |
Make an open region.
- Parameters
-
[in] _xLeft leftmost x-axis interval value [in] _xRight righmost x-axis interval value [in] _yLeft leftmost y-axis interval value [in] _yRight righmost y-axis interval value [in] _zLeft leftmost z-axis interval value [in] _zRight righmost z-axis interval value
- Returns
- the (
_xLeft
,_xRight
) ✕ (_yLeft
,_yRight
) ✕ (_zLeft
,_zRight
) open region
◆ operator!=()
Inequality test operator.
- Parameters
-
_other region to check for inequality
- Returns
- true if regions are unequal, false otherwise
References Region3< T >::Contains().
◆ operator==()
Equality test operator.
- Parameters
-
_other region to check for equality
- Returns
- true if regions are equal, false otherwise
References Region3< T >::Contains().
Member Data Documentation
◆ Unbounded
An unbounded region (-∞, ∞) ✕ (-∞, ∞) ✕ (-∞, ∞)
The documentation for this class was generated from the following file: