HDK
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
UT::Box< T, NAXES > Struct Template Reference

#include <UT_BVH.h>

Public Member Functions

SYS_FORCE_INLINE Box () noexcept=default
 
SYS_FORCE_INLINE constexpr Box (const Box &other) noexcept=default
 
SYS_FORCE_INLINE constexpr Box (Box &&other) noexcept=default
 
SYS_FORCE_INLINE Boxoperator= (const Box &other) noexcept=default
 
SYS_FORCE_INLINE Boxoperator= (Box &&other) noexcept=default
 
template<typename S >
SYS_FORCE_INLINE Box (const Box< S, NAXES > &other) noexcept
 
template<typename TS >
SYS_FORCE_INLINE Box (const TS &pt) noexcept
 
template<typename S >
SYS_FORCE_INLINE Boxoperator= (const Box< S, NAXES > &other) noexcept
 
SYS_FORCE_INLINE const T * operator[] (const size_t axis) const noexcept
 
SYS_FORCE_INLINE T * operator[] (const size_t axis) noexcept
 
SYS_FORCE_INLINE void initBounds () noexcept
 
SYS_FORCE_INLINE void initBounds (const Box< T, NAXES > &src) noexcept
 
SYS_FORCE_INLINE void initBoundsUnordered (const Box< T, NAXES > &src0, const Box< T, NAXES > &src1) noexcept
 
SYS_FORCE_INLINE void combine (const Box< T, NAXES > &src) noexcept
 
SYS_FORCE_INLINE void enlargeBounds (const Box< T, NAXES > &src) noexcept
 
template<typename TS >
SYS_FORCE_INLINE void initBounds (const TS &pt) noexcept
 
template<typename TS >
SYS_FORCE_INLINE void initBounds (const TS &min, const TS &max) noexcept
 
template<typename TS >
SYS_FORCE_INLINE void initBoundsUnordered (const TS &p0, const TS &p1) noexcept
 
template<typename TS >
SYS_FORCE_INLINE void enlargeBounds (const TS &pt) noexcept
 
template<typename TS >
SYS_FORCE_INLINE void combine (const TS &pt) noexcept
 
SYS_FORCE_INLINE
UT_FixedVector< T, NAXES > 
getMin () const noexcept
 
SYS_FORCE_INLINE
UT_FixedVector< T, NAXES > 
getMax () const noexcept
 
diameter2 () const noexcept
 
volume () const noexcept
 
half_surface_area () const noexcept
 
axis_sum () const noexcept
 
SYS_FORCE_INLINE void intersect (T &box_tmin, T &box_tmax, const UT_FixedVector< uint, NAXES > &signs, const UT_FixedVector< T, NAXES > &origin, const UT_FixedVector< T, NAXES > &inverse_direction) const noexcept
 
SYS_FORCE_INLINE void intersectTol (T &box_tmin, T &box_tmax, const UT_FixedVector< uint, NAXES > &signs, const UT_FixedVector< T, NAXES > &origin, const UT_FixedVector< T, NAXES > &inverse_direction, T tolerance) const noexcept
 Intersect the box expanded by the specified tolerance in all axes. More...
 
SYS_FORCE_INLINE void intersect (const Box &other, Box &dest) const noexcept
 
SYS_FORCE_INLINEminDistance2 (const UT_FixedVector< T, NAXES > &p) const noexcept
 
SYS_FORCE_INLINEmaxDistance2 (const UT_FixedVector< T, NAXES > &p) const noexcept
 
template<typename TS >
auto isInside (const TS &pt) const noexcept-> decltype(vals[0][0]<=pt[0])
 

Public Attributes

vals [NAXES][2]
 

Detailed Description

template<typename T, uint NAXES>
struct UT::Box< T, NAXES >

Definition at line 37 of file UT_BVH.h.

Constructor & Destructor Documentation

template<typename T, uint NAXES>
SYS_FORCE_INLINE UT::Box< T, NAXES >::Box ( )
defaultnoexcept
template<typename T, uint NAXES>
SYS_FORCE_INLINE constexpr UT::Box< T, NAXES >::Box ( const Box< T, NAXES > &  other)
defaultnoexcept
template<typename T, uint NAXES>
SYS_FORCE_INLINE constexpr UT::Box< T, NAXES >::Box ( Box< T, NAXES > &&  other)
defaultnoexcept
template<typename T, uint NAXES>
template<typename S >
SYS_FORCE_INLINE UT::Box< T, NAXES >::Box ( const Box< S, NAXES > &  other)
inlinenoexcept

Definition at line 47 of file UT_BVH.h.

template<typename T, uint NAXES>
template<typename TS >
SYS_FORCE_INLINE UT::Box< T, NAXES >::Box ( const TS &  pt)
inlineexplicitnoexcept

Definition at line 58 of file UT_BVH.h.

Member Function Documentation

template<typename T, uint NAXES>
T UT::Box< T, NAXES >::axis_sum ( ) const
inlinenoexcept

Definition at line 258 of file UT_BVH.h.

template<typename T, uint NAXES>
SYS_FORCE_INLINE void UT::Box< T, NAXES >::combine ( const Box< T, NAXES > &  src)
inlinenoexcept

Definition at line 110 of file UT_BVH.h.

template<typename T, uint NAXES>
template<typename TS >
SYS_FORCE_INLINE void UT::Box< T, NAXES >::combine ( const TS &  pt)
inlinenoexcept

Definition at line 176 of file UT_BVH.h.

template<typename T, uint NAXES>
T UT::Box< T, NAXES >::diameter2 ( ) const
inlinenoexcept

Definition at line 201 of file UT_BVH.h.

template<typename T, uint NAXES>
SYS_FORCE_INLINE void UT::Box< T, NAXES >::enlargeBounds ( const Box< T, NAXES > &  src)
inlinenoexcept

Definition at line 120 of file UT_BVH.h.

template<typename T, uint NAXES>
template<typename TS >
SYS_FORCE_INLINE void UT::Box< T, NAXES >::enlargeBounds ( const TS &  pt)
inlinenoexcept

Definition at line 165 of file UT_BVH.h.

template<typename T, uint NAXES>
SYS_FORCE_INLINE UT_FixedVector<T,NAXES> UT::Box< T, NAXES >::getMax ( ) const
inlinenoexcept

Definition at line 193 of file UT_BVH.h.

template<typename T, uint NAXES>
SYS_FORCE_INLINE UT_FixedVector<T,NAXES> UT::Box< T, NAXES >::getMin ( ) const
inlinenoexcept

Definition at line 184 of file UT_BVH.h.

template<typename T, uint NAXES>
T UT::Box< T, NAXES >::half_surface_area ( ) const
inlinenoexcept

Definition at line 217 of file UT_BVH.h.

template<typename T, uint NAXES>
SYS_FORCE_INLINE void UT::Box< T, NAXES >::initBounds ( )
inlinenoexcept

Definition at line 86 of file UT_BVH.h.

template<typename T, uint NAXES>
SYS_FORCE_INLINE void UT::Box< T, NAXES >::initBounds ( const Box< T, NAXES > &  src)
inlinenoexcept

Copy the source box. NOTE: This is so that in templated code that may have a Box or a UT_FixedVector, it can call initBounds and still work.

Definition at line 95 of file UT_BVH.h.

template<typename T, uint NAXES>
template<typename TS >
SYS_FORCE_INLINE void UT::Box< T, NAXES >::initBounds ( const TS &  pt)
inlinenoexcept

Definition at line 126 of file UT_BVH.h.

template<typename T, uint NAXES>
template<typename TS >
SYS_FORCE_INLINE void UT::Box< T, NAXES >::initBounds ( const TS &  min,
const TS &  max 
)
inlinenoexcept

Definition at line 138 of file UT_BVH.h.

template<typename T, uint NAXES>
SYS_FORCE_INLINE void UT::Box< T, NAXES >::initBoundsUnordered ( const Box< T, NAXES > &  src0,
const Box< T, NAXES > &  src1 
)
inlinenoexcept

Initialize with the union of the source boxes. NOTE: This is so that in templated code that may have Box's or a UT_FixedVector's, it can call initBounds and still work.

Definition at line 104 of file UT_BVH.h.

template<typename T, uint NAXES>
template<typename TS >
SYS_FORCE_INLINE void UT::Box< T, NAXES >::initBoundsUnordered ( const TS &  p0,
const TS &  p1 
)
inlinenoexcept

Definition at line 153 of file UT_BVH.h.

template<typename T, uint NAXES>
SYS_FORCE_INLINE void UT::Box< T, NAXES >::intersect ( T &  box_tmin,
T &  box_tmax,
const UT_FixedVector< uint, NAXES > &  signs,
const UT_FixedVector< T, NAXES > &  origin,
const UT_FixedVector< T, NAXES > &  inverse_direction 
) const
inlinenoexcept

Definition at line 266 of file UT_BVH.h.

template<typename T, uint NAXES>
SYS_FORCE_INLINE void UT::Box< T, NAXES >::intersect ( const Box< T, NAXES > &  other,
Box< T, NAXES > &  dest 
) const
inlinenoexcept

Definition at line 304 of file UT_BVH.h.

template<typename T, uint NAXES>
SYS_FORCE_INLINE void UT::Box< T, NAXES >::intersectTol ( T &  box_tmin,
T &  box_tmax,
const UT_FixedVector< uint, NAXES > &  signs,
const UT_FixedVector< T, NAXES > &  origin,
const UT_FixedVector< T, NAXES > &  inverse_direction,
tolerance 
) const
inlinenoexcept

Intersect the box expanded by the specified tolerance in all axes.

Definition at line 283 of file UT_BVH.h.

template<typename T, uint NAXES>
template<typename TS >
auto UT::Box< T, NAXES >::isInside ( const TS &  pt) const -> decltype(vals[0][0] <= pt[0])
inlinenoexcept

Definition at line 339 of file UT_BVH.h.

template<typename T, uint NAXES>
SYS_FORCE_INLINE T UT::Box< T, NAXES >::maxDistance2 ( const UT_FixedVector< T, NAXES > &  p) const
inlinenoexcept

Definition at line 325 of file UT_BVH.h.

template<typename T, uint NAXES>
SYS_FORCE_INLINE T UT::Box< T, NAXES >::minDistance2 ( const UT_FixedVector< T, NAXES > &  p) const
inlinenoexcept

Definition at line 312 of file UT_BVH.h.

template<typename T, uint NAXES>
SYS_FORCE_INLINE Box& UT::Box< T, NAXES >::operator= ( const Box< T, NAXES > &  other)
defaultnoexcept
template<typename T, uint NAXES>
SYS_FORCE_INLINE Box& UT::Box< T, NAXES >::operator= ( Box< T, NAXES > &&  other)
defaultnoexcept
template<typename T, uint NAXES>
template<typename S >
SYS_FORCE_INLINE Box& UT::Box< T, NAXES >::operator= ( const Box< S, NAXES > &  other)
inlinenoexcept

Definition at line 69 of file UT_BVH.h.

template<typename T, uint NAXES>
SYS_FORCE_INLINE const T* UT::Box< T, NAXES >::operator[] ( const size_t  axis) const
inlinenoexcept

Definition at line 77 of file UT_BVH.h.

template<typename T, uint NAXES>
SYS_FORCE_INLINE T* UT::Box< T, NAXES >::operator[] ( const size_t  axis)
inlinenoexcept

Definition at line 81 of file UT_BVH.h.

template<typename T, uint NAXES>
T UT::Box< T, NAXES >::volume ( ) const
inlinenoexcept

Definition at line 210 of file UT_BVH.h.

Member Data Documentation

template<typename T, uint NAXES>
T UT::Box< T, NAXES >::vals[NAXES][2]

Definition at line 38 of file UT_BVH.h.


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