|
HDK
|
#include <ImathBox.h>
Public Member Functions | |
Constructors and Assignment | |
| IMATH_HOSTDEVICE IMATH_CONSTEXPR14 | Box () IMATH_NOEXCEPT |
| Empty by default. More... | |
| IMATH_HOSTDEVICE IMATH_CONSTEXPR14 | Box (const Vec2< T > &point) IMATH_NOEXCEPT |
| Construct a bounding box that contains a single point. More... | |
| IMATH_HOSTDEVICE IMATH_CONSTEXPR14 | Box (const Vec2< T > &minT, const Vec2< T > &maxT) IMATH_NOEXCEPT |
| Construct a bounding box with the given minimum and maximum points. More... | |
Comparison | |
| IMATH_HOSTDEVICE constexpr bool | operator== (const Box< Vec2< T >> &src) const IMATH_NOEXCEPT |
| Equality. More... | |
| IMATH_HOSTDEVICE constexpr bool | operator!= (const Box< Vec2< T >> &src) const IMATH_NOEXCEPT |
| Inequality. More... | |
Manipulation | |
| IMATH_HOSTDEVICE void | makeEmpty () IMATH_NOEXCEPT |
| IMATH_HOSTDEVICE void | extendBy (const Vec2< T > &point) IMATH_NOEXCEPT |
| Extend the Box to include the given point. More... | |
| IMATH_HOSTDEVICE void | extendBy (const Box< Vec2< T >> &box) IMATH_NOEXCEPT |
| Extend the Box to include the given box. More... | |
| IMATH_HOSTDEVICE void | makeInfinite () IMATH_NOEXCEPT |
| Make the box include the entire range of T. More... | |
Query | |
| IMATH_HOSTDEVICE IMATH_CONSTEXPR14 Vec2< T > | size () const IMATH_NOEXCEPT |
| IMATH_HOSTDEVICE constexpr Vec2< T > | center () const IMATH_NOEXCEPT |
| IMATH_HOSTDEVICE IMATH_CONSTEXPR14 bool | intersects (const Vec2< T > &point) const IMATH_NOEXCEPT |
| Return true if the given point is inside the box, false otherwise. More... | |
| IMATH_HOSTDEVICE IMATH_CONSTEXPR14 bool | intersects (const Box< Vec2< T >> &box) const IMATH_NOEXCEPT |
| Return true if the given box is inside the box, false otherwise. More... | |
| IMATH_HOSTDEVICE IMATH_CONSTEXPR14 unsigned int | majorAxis () const IMATH_NOEXCEPT |
| IMATH_HOSTDEVICE IMATH_CONSTEXPR14 bool | isEmpty () const IMATH_NOEXCEPT |
| IMATH_HOSTDEVICE IMATH_CONSTEXPR14 bool | hasVolume () const IMATH_NOEXCEPT |
| Return true if the box is larger than a single point, false otherwise. More... | |
| IMATH_HOSTDEVICE IMATH_CONSTEXPR14 bool | isInfinite () const IMATH_NOEXCEPT |
Public Attributes | |
Direct access to bounds | |
| Vec2< T > | min |
| The minimum value of the box. More... | |
| Vec2< T > | max |
| The maximum value of the box. More... | |
The Box<Vec2<T>> template represents a 2D bounding box defined by minimum and maximum values of type Vec2<T>. The min and max members are public.
Definition at line 362 of file ImathBox.h.
|
inline |
Empty by default.
Definition at line 469 of file ImathBox.h.
|
inline |
Construct a bounding box that contains a single point.
Definition at line 475 of file ImathBox.h.
|
inline |
Construct a bounding box with the given minimum and maximum points.
Definition at line 483 of file ImathBox.h.
Return the center of the box. The center is defined as (max+min)/2. The center of an empty box is undefined.
Definition at line 567 of file ImathBox.h.
|
inline |
Extend the Box to include the given point.
Definition at line 522 of file ImathBox.h.
|
inline |
Extend the Box to include the given box.
Definition at line 532 of file ImathBox.h.
|
inline |
Return true if the box is larger than a single point, false otherwise.
Definition at line 594 of file ImathBox.h.
|
inline |
Return true if the given point is inside the box, false otherwise.
Definition at line 542 of file ImathBox.h.
|
inline |
Return true if the given box is inside the box, false otherwise.
Definition at line 550 of file ImathBox.h.
|
inline |
Return true if the box is empty, false otherwise. An empty box's minimum is greater than its maximum.
Definition at line 574 of file ImathBox.h.
|
inline |
Return true if the box contains all points, false otherwise. An infinite box has a mimimum of V::baseTypeMin() and a maximum of V::baseTypeMax().
Definition at line 581 of file ImathBox.h.
|
inline |
Return the major axis of the box. The major axis is the dimension with the greatest difference between maximum and minimum.
Definition at line 603 of file ImathBox.h.
|
inline |
Set the Box to be empty. A Box is empty if the mimimum is greater than the maximum. makeEmpty() sets the mimimum to std::numeric_limits<T>::max() and the maximum to std::numeric_limits<T>::lowest().
Definition at line 506 of file ImathBox.h.
|
inline |
Make the box include the entire range of T.
Definition at line 514 of file ImathBox.h.
|
inline |
Inequality.
Definition at line 499 of file ImathBox.h.
|
inline |
Equality.
Definition at line 492 of file ImathBox.h.
|
inline |
Return the size of the box. The size is of type V, defined as (max-min). An empty box has a size of V(0), i.e. 0 in each dimension.
Definition at line 558 of file ImathBox.h.
The maximum value of the box.
Definition at line 372 of file ImathBox.h.
The minimum value of the box.
Definition at line 369 of file ImathBox.h.