HDK
|
#include <ImathInterval.h>
Public Member Functions | |
Constructors | |
IMATH_HOSTDEVICE IMATH_CONSTEXPR14 | Interval () IMATH_NOEXCEPT |
Initialize to the empty interval. More... | |
IMATH_HOSTDEVICE IMATH_CONSTEXPR14 | Interval (const T &point) IMATH_NOEXCEPT |
Intitialize to a single point. More... | |
IMATH_HOSTDEVICE IMATH_CONSTEXPR14 | Interval (const T &minT, const T &maxT) IMATH_NOEXCEPT |
Intitialize to a given (min,max) More... | |
Comparison | |
IMATH_HOSTDEVICE constexpr bool | operator== (const Interval< T > &src) const IMATH_NOEXCEPT |
Equality. More... | |
IMATH_HOSTDEVICE constexpr bool | operator!= (const Interval< T > &src) const IMATH_NOEXCEPT |
Inequality. More... | |
Manipulation | |
IMATH_HOSTDEVICE void | makeEmpty () IMATH_NOEXCEPT |
IMATH_HOSTDEVICE void | extendBy (const T &point) IMATH_NOEXCEPT |
Extend the interval to include the given point. More... | |
IMATH_HOSTDEVICE void | extendBy (const Interval< T > &interval) IMATH_NOEXCEPT |
Extend the interval to include the given interval. More... | |
IMATH_HOSTDEVICE void | makeInfinite () IMATH_NOEXCEPT |
Make the interval include the entire range of the base type. More... | |
Query | |
IMATH_HOSTDEVICE IMATH_CONSTEXPR14 T | size () const IMATH_NOEXCEPT |
Return the size of the interval. The size is (max-min). An empty box has a size of 0. More... | |
IMATH_HOSTDEVICE IMATH_CONSTEXPR14 T | center () const IMATH_NOEXCEPT |
IMATH_HOSTDEVICE IMATH_CONSTEXPR14 bool | intersects (const T &point) const IMATH_NOEXCEPT |
Return true if the given point is inside the interval, false otherwise. More... | |
IMATH_HOSTDEVICE IMATH_CONSTEXPR14 bool | intersects (const Interval< T > &interval) const IMATH_NOEXCEPT |
Return true if the given interval is inside the interval, false otherwise. More... | |
IMATH_HOSTDEVICE IMATH_CONSTEXPR14 bool | isEmpty () const IMATH_NOEXCEPT |
IMATH_HOSTDEVICE IMATH_CONSTEXPR14 bool | hasVolume () const IMATH_NOEXCEPT |
IMATH_HOSTDEVICE IMATH_CONSTEXPR14 bool | isInfinite () const IMATH_NOEXCEPT |
Public Attributes | |
Direct access to bounds | |
T | min |
The minimum value of the interval. More... | |
T | max |
The minimum value of the interval. More... | |
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.
Definition at line 25 of file ImathInterval.h.
|
inline |
Initialize to the empty interval.
Definition at line 130 of file ImathInterval.h.
|
inline |
Intitialize to a single point.
Definition at line 136 of file ImathInterval.h.
|
inline |
Intitialize to a given (min,max)
Definition at line 143 of file ImathInterval.h.
|
inline |
Return the center of the interval. The center is defined as (max+min)/2. The center of an empty interval is undefined.
Definition at line 228 of file ImathInterval.h.
|
inline |
Extend the interval to include the given point.
Definition at line 182 of file ImathInterval.h.
|
inline |
Extend the interval to include the given interval.
Definition at line 193 of file ImathInterval.h.
|
inline |
Return true if the interval is larger than a single point, false otherwise.
Definition at line 242 of file ImathInterval.h.
|
inline |
Return true if the given point is inside the interval, false otherwise.
Definition at line 204 of file ImathInterval.h.
|
inline |
Return true if the given interval is inside the interval, false otherwise.
Definition at line 211 of file ImathInterval.h.
|
inline |
Return true if the interval is empty, false otherwise. An empty interval's minimum is greater than its maximum.
Definition at line 235 of file ImathInterval.h.
|
inline |
Return true if the interval contains all points, false otherwise. An infinite box has a mimimum of std::numeric_limits<T>::lowest() and a maximum of std::numeric_limits<T>::max()
Definition at line 249 of file ImathInterval.h.
|
inline |
Set the interval to be empty. An interval is empty if the minimum is greater than the maximum.
Definition at line 165 of file ImathInterval.h.
|
inline |
Make the interval include the entire range of the base type.
Definition at line 173 of file ImathInterval.h.
|
inline |
Inequality.
Definition at line 158 of file ImathInterval.h.
|
inline |
Equality.
Definition at line 151 of file ImathInterval.h.
Return the size of the interval. The size is (max-min). An empty box has a size of 0.
Definition at line 218 of file ImathInterval.h.
The minimum value of the interval.
Definition at line 36 of file ImathInterval.h.
The minimum value of the interval.
Definition at line 33 of file ImathInterval.h.