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

#include <ImathBox.h>

Public Member Functions

IMATH_HOSTDEVICE constexpr bool operator== (const Box< Vec3< T >> &src) const IMATH_NOEXCEPT
 Equality. More...
 
IMATH_HOSTDEVICE constexpr bool operator!= (const Box< Vec3< T >> &src) const IMATH_NOEXCEPT
 Inequality. More...
 
IMATH_HOSTDEVICE void makeEmpty () IMATH_NOEXCEPT
 
IMATH_HOSTDEVICE void extendBy (const Vec3< T > &point) IMATH_NOEXCEPT
 Extend the Box to include the given point. More...
 
IMATH_HOSTDEVICE void extendBy (const Box< Vec3< 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...
 
IMATH_HOSTDEVICE
IMATH_CONSTEXPR14 Vec3< T
size () const IMATH_NOEXCEPT
 
IMATH_HOSTDEVICE constexpr
Vec3< T
center () const IMATH_NOEXCEPT
 
IMATH_HOSTDEVICE
IMATH_CONSTEXPR14 bool 
intersects (const Vec3< 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< Vec3< 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
 
Constructors
IMATH_HOSTDEVICE IMATH_CONSTEXPR14 Box () IMATH_NOEXCEPT
 Empty by default. More...
 
IMATH_HOSTDEVICE IMATH_CONSTEXPR14 Box (const Vec3< T > &point) IMATH_NOEXCEPT
 Construct a bounding box that contains a single point. More...
 
IMATH_HOSTDEVICE IMATH_CONSTEXPR14 Box (const Vec3< T > &minT, const Vec3< T > &maxT) IMATH_NOEXCEPT
 Construct a bounding box with the given minimum and maximum points. More...
 

Public Attributes

Direct access to bounds
Vec3< Tmin
 The minimum value of the box. More...
 
Vec3< Tmax
 The maximum value of the box. More...
 

Detailed Description

template<class T>
class Box< Vec3< T > >

The Box<Vec3> template represents a 3D bounding box defined by minimum and maximum values of type Vec3.

Definition at line 628 of file ImathBox.h.

Constructor & Destructor Documentation

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

Empty by default.

Definition at line 713 of file ImathBox.h.

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

Construct a bounding box that contains a single point.

Definition at line 718 of file ImathBox.h.

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

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

Definition at line 725 of file ImathBox.h.

Member Function Documentation

template<class T >
IMATH_HOSTDEVICE constexpr Vec3< T > Box< Vec3< 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 841 of file ImathBox.h.

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

Extend the Box to include the given point.

Definition at line 763 of file ImathBox.h.

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

Extend the Box to include the given box.

Definition at line 786 of file ImathBox.h.

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

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

Definition at line 873 of file ImathBox.h.

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

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

Definition at line 809 of file ImathBox.h.

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

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

Definition at line 820 of file ImathBox.h.

template<class T >
IMATH_HOSTDEVICE IMATH_CONSTEXPR14 bool Box< Vec3< 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 848 of file ImathBox.h.

template<class T >
IMATH_HOSTDEVICE IMATH_CONSTEXPR14 bool Box< Vec3< T > >::isInfinite ( ) const
inline

Return true if the box contains all points, false otherwise. An infinite box has a mimimum ofV::baseTypeMin() and a maximum of V::baseTypeMax().

Definition at line 858 of file ImathBox.h.

template<class T >
IMATH_HOSTDEVICE IMATH_CONSTEXPR14 unsigned int Box< Vec3< 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 883 of file ImathBox.h.

template<class T >
IMATH_HOSTDEVICE void Box< Vec3< 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 747 of file ImathBox.h.

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

Make the box include the entire range of T.

Definition at line 755 of file ImathBox.h.

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

Inequality.

Definition at line 740 of file ImathBox.h.

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

Equality.

Definition at line 733 of file ImathBox.h.

template<class T >
IMATH_HOSTDEVICE IMATH_CONSTEXPR14 Vec3< T > Box< Vec3< 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 831 of file ImathBox.h.

Member Data Documentation

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

The maximum value of the box.

Definition at line 639 of file ImathBox.h.

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

The minimum value of the box.

Definition at line 636 of file ImathBox.h.


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