Atoms Crowd
7.0.0
|
#include <ImathInterval.h>
Public Member Functions | |
Constructors | |
ATOMSMATH_HOSTDEVICE ATOMSMATH_CONSTEXPR14 | Interval () noexcept |
Initialize to the empty interval. | |
ATOMSMATH_HOSTDEVICE ATOMSMATH_CONSTEXPR14 | Interval (const T &point) noexcept |
Intitialize to a single point. | |
ATOMSMATH_HOSTDEVICE ATOMSMATH_CONSTEXPR14 | Interval (const T &minT, const T &maxT) noexcept |
Intitialize to a given (min,max) | |
Comparison | |
constexpr ATOMSMATH_HOSTDEVICE bool | operator== (const Interval< T > &src) const noexcept |
Equality. | |
constexpr ATOMSMATH_HOSTDEVICE bool | operator!= (const Interval< T > &src) const noexcept |
Inequality. | |
Manipulation | |
ATOMSMATH_HOSTDEVICE void | makeEmpty () noexcept |
ATOMSMATH_HOSTDEVICE void | extendBy (const T &point) noexcept |
Extend the interval to include the given point. | |
ATOMSMATH_HOSTDEVICE void | extendBy (const Interval< T > &interval) noexcept |
Extend the interval to include the given interval. | |
ATOMSMATH_HOSTDEVICE void | makeInfinite () noexcept |
Make the interval include the entire range of the base type. | |
Query | |
ATOMSMATH_HOSTDEVICE ATOMSMATH_CONSTEXPR14 T | size () const noexcept |
Return the size of the interval. The size is (max-min). An empty box has a size of 0. | |
ATOMSMATH_HOSTDEVICE ATOMSMATH_CONSTEXPR14 T | center () const noexcept |
ATOMSMATH_HOSTDEVICE ATOMSMATH_CONSTEXPR14 bool | intersects (const T &point) const noexcept |
Return true if the given point is inside the interval, false otherwise. | |
ATOMSMATH_HOSTDEVICE ATOMSMATH_CONSTEXPR14 bool | intersects (const Interval< T > &interval) const noexcept |
Return true if the given interval is inside the interval, false otherwise. | |
ATOMSMATH_HOSTDEVICE ATOMSMATH_CONSTEXPR14 bool | isEmpty () const noexcept |
ATOMSMATH_HOSTDEVICE ATOMSMATH_CONSTEXPR14 bool | hasVolume () const noexcept |
ATOMSMATH_HOSTDEVICE ATOMSMATH_CONSTEXPR14 bool | isInfinite () const noexcept |
Public Attributes | |
Direct access to bounds | |
T | min |
The minimum value of the interval. | |
T | max |
The minimum value of the interval. | |
An Interval has a min and a max and some miscellaneous functions. It is basically a Box<T> that allows T to be a scalar.
|
inlinenoexcept |
Return the center of the interval. The center is defined as (max+min)/2. The center of an empty interval is undefined.
|
inlinenoexcept |
Return true if the interval is larger than a single point, false otherwise.
|
inlinenoexcept |
Return true if the interval is empty, false otherwise. An empty interval's minimum is greater than its maximum.
|
inlinenoexcept |
Return true if the interval contains all points, false otherwise. An infinite box has a mimimum of limits<t>::min
and a maximum of limits<T>::max
|
inlinenoexcept |
Set the interval to be empty. An interval is empty if the minimum is greater than the maximum.