HDK
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
Box< Vec2< T > > Class Template Reference

#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< Tmin
 The minimum value of the box. More...
 
Vec2< Tmax
 The maximum value of the box. More...
 

Detailed Description

template<class T>
class Box< Vec2< T > >

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 359 of file ImathBox.h.

Constructor & Destructor Documentation

template<class T >
IMATH_HOSTDEVICE IMATH_CONSTEXPR14 Box< Vec2< T > >::Box ( )
inline

Empty by default.

Definition at line 459 of file ImathBox.h.

template<class T >
IMATH_HOSTDEVICE IMATH_CONSTEXPR14 Box< Vec2< T > >::Box ( const Vec2< T > &  point)
inline

Construct a bounding box that contains a single point.

Definition at line 464 of file ImathBox.h.

template<class T >
IMATH_HOSTDEVICE IMATH_CONSTEXPR14 Box< Vec2< T > >::Box ( const Vec2< T > &  minT,
const Vec2< T > &  maxT 
)
inline

Construct a bounding box with the given minimum and maximum points.

Definition at line 471 of file ImathBox.h.

Member Function Documentation

template<class T >
IMATH_HOSTDEVICE constexpr Vec2< T > Box< Vec2< T > >::center ( ) const
inline

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 573 of file ImathBox.h.

template<class T >
IMATH_HOSTDEVICE void Box< Vec2< T > >::extendBy ( const Vec2< T > &  point)
inline

Extend the Box to include the given point.

Definition at line 509 of file ImathBox.h.

template<class T >
IMATH_HOSTDEVICE void Box< Vec2< T > >::extendBy ( const Box< Vec2< T >> &  box)
inline

Extend the Box to include the given box.

Definition at line 526 of file ImathBox.h.

template<class T >
IMATH_HOSTDEVICE IMATH_CONSTEXPR14 bool Box< Vec2< T > >::hasVolume ( ) const
inline

Return true if the box is larger than a single point, false otherwise.

Definition at line 603 of file ImathBox.h.

template<class T >
IMATH_HOSTDEVICE IMATH_CONSTEXPR14 bool Box< Vec2< T > >::intersects ( const Vec2< T > &  point) const
inline

Return true if the given point is inside the box, false otherwise.

Definition at line 543 of file ImathBox.h.

template<class T >
IMATH_HOSTDEVICE IMATH_CONSTEXPR14 bool Box< Vec2< T > >::intersects ( const Box< Vec2< T >> &  box) const
inline

Return true if the given box is inside the box, false otherwise.

Definition at line 553 of file ImathBox.h.

template<class T >
IMATH_HOSTDEVICE IMATH_CONSTEXPR14 bool Box< Vec2< T > >::isEmpty ( ) const
inline

Return true if the box is empty, false otherwise. An empty box's minimum is greater than its maximum.

Definition at line 580 of file ImathBox.h.

template<class T >
IMATH_HOSTDEVICE IMATH_CONSTEXPR14 bool Box< Vec2< T > >::isInfinite ( ) const
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 590 of file ImathBox.h.

template<class T >
IMATH_HOSTDEVICE IMATH_CONSTEXPR14 unsigned int Box< Vec2< T > >::majorAxis ( ) const
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 613 of file ImathBox.h.

template<class T >
IMATH_HOSTDEVICE void Box< Vec2< T > >::makeEmpty ( )
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 493 of file ImathBox.h.

template<class T >
IMATH_HOSTDEVICE void Box< Vec2< T > >::makeInfinite ( )
inline

Make the box include the entire range of T.

Definition at line 501 of file ImathBox.h.

template<class T >
IMATH_HOSTDEVICE constexpr bool Box< Vec2< T > >::operator!= ( const Box< Vec2< T >> &  src) const
inline

Inequality.

Definition at line 486 of file ImathBox.h.

template<class T >
IMATH_HOSTDEVICE constexpr bool Box< Vec2< T > >::operator== ( const Box< Vec2< T >> &  src) const
inline

Equality.

Definition at line 479 of file ImathBox.h.

template<class T >
IMATH_HOSTDEVICE IMATH_CONSTEXPR14 Vec2< T > Box< Vec2< T > >::size ( void  ) const
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 563 of file ImathBox.h.

Member Data Documentation

template<class T >
Vec2<T> Box< Vec2< T > >::max

The maximum value of the box.

Definition at line 370 of file ImathBox.h.

template<class T >
Vec2<T> Box< Vec2< T > >::min

The minimum value of the box.

Definition at line 367 of file ImathBox.h.


The documentation for this class was generated from the following file: