Atoms Crowd  7.0.0
Box< Vec3< T > > Class Template Reference

#include <ImathBox.h>

Public Member Functions

constexpr ATOMSMATH_HOSTDEVICE bool operator== (const Box< Vec3< T >> &src) const noexcept
 Equality.
 
constexpr ATOMSMATH_HOSTDEVICE bool operator!= (const Box< Vec3< T >> &src) const noexcept
 Inequality.
 
ATOMSMATH_HOSTDEVICE void makeEmpty () noexcept
 
ATOMSMATH_HOSTDEVICE void extendBy (const Vec3< T > &point) noexcept
 Extend the Box to include the given point.
 
ATOMSMATH_HOSTDEVICE void extendBy (const Box< Vec3< T >> &box) noexcept
 Extend the Box to include the given box.
 
ATOMSMATH_HOSTDEVICE void makeInfinite () noexcept
 Make the box include the entire range of T.
 
ATOMSMATH_HOSTDEVICE ATOMSMATH_CONSTEXPR14 Vec3< T > size () const noexcept
 
constexpr ATOMSMATH_HOSTDEVICE Vec3< T > center () const noexcept
 
ATOMSMATH_HOSTDEVICE ATOMSMATH_CONSTEXPR14 bool intersects (const Vec3< T > &point) const noexcept
 Return true if the given point is inside the box, false otherwise.
 
ATOMSMATH_HOSTDEVICE ATOMSMATH_CONSTEXPR14 bool intersects (const Box< Vec3< T >> &box) const noexcept
 Return true if the given box is inside the box, false otherwise.
 
ATOMSMATH_HOSTDEVICE ATOMSMATH_CONSTEXPR14 unsigned int majorAxis () const noexcept
 
ATOMSMATH_HOSTDEVICE ATOMSMATH_CONSTEXPR14 bool isEmpty () const noexcept
 
ATOMSMATH_HOSTDEVICE ATOMSMATH_CONSTEXPR14 bool hasVolume () const noexcept
 Return true if the box is larger than a single point, false otherwise.
 
ATOMSMATH_HOSTDEVICE ATOMSMATH_CONSTEXPR14 bool isInfinite () const noexcept
 
Constructors
ATOMSMATH_HOSTDEVICE ATOMSMATH_CONSTEXPR14 Box () noexcept
 Empty by default.
 
ATOMSMATH_HOSTDEVICE ATOMSMATH_CONSTEXPR14 Box (const Vec3< T > &point) noexcept
 Construct a bounding box that contains a single point.
 
ATOMSMATH_HOSTDEVICE ATOMSMATH_CONSTEXPR14 Box (const Vec3< T > &minT, const Vec3< T > &maxT) noexcept
 Construct a bounding box with the given minimum and maximum points.
 

Public Attributes

Direct access to bounds
Vec3< T > min
 The minimum value of the box.
 
Vec3< T > max
 The maximum value of the box.
 

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.

Member Function Documentation

◆ center()

template<class T >
constexpr Vec3< T > Box< Vec3< T > >::center
inlineconstexprnoexcept

Return the center of the box. The center is defined as (max+min)/2. The center of an empty box is undefined.

◆ isEmpty()

template<class T >
ATOMSMATH_CONSTEXPR14 bool Box< Vec3< T > >::isEmpty
inlinenoexcept

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

◆ isInfinite()

template<class T >
ATOMSMATH_CONSTEXPR14 bool Box< Vec3< T > >::isInfinite
inlinenoexcept

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

◆ majorAxis()

template<class T >
ATOMSMATH_CONSTEXPR14 unsigned int Box< Vec3< T > >::majorAxis
inlinenoexcept

Return the major axis of the box. The major axis is the dimension with the greatest difference between maximum and minimum.

◆ makeEmpty()

template<class T >
void Box< Vec3< T > >::makeEmpty
inlinenoexcept

Set the Box to be empty. A Box is empty if the mimimum is greater than the maximum. makeEmpty() sets the mimimum to limits<T>::max() and the maximum to limits<T>::min().

◆ size()

template<class T >
ATOMSMATH_CONSTEXPR14 Vec3< T > Box< Vec3< T > >::size
inlinenoexcept

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.


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