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 S , bool INSTANTIATED>
SYS_FORCE_INLINE Box (const UT_FixedVector< S, NAXES, INSTANTIATED > &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 S , bool INSTANTIATED>
SYS_FORCE_INLINE void initBounds (const UT_FixedVector< S, NAXES, INSTANTIATED > &pt) noexcept
 
template<bool INSTANTIATED>
SYS_FORCE_INLINE void initBounds (const UT_FixedVector< T, NAXES, INSTANTIATED > &min, const UT_FixedVector< T, NAXES, INSTANTIATED > &max) noexcept
 
template<bool INSTANTIATED>
SYS_FORCE_INLINE void initBoundsUnordered (const UT_FixedVector< T, NAXES, INSTANTIATED > &p0, const UT_FixedVector< T, NAXES, INSTANTIATED > &p1) noexcept
 
template<bool INSTANTIATED>
SYS_FORCE_INLINE void enlargeBounds (const UT_FixedVector< T, NAXES, INSTANTIATED > &pt) noexcept
 
template<bool INSTANTIATED>
SYS_FORCE_INLINE void combine (const UT_FixedVector< T, NAXES, INSTANTIATED > &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
 
template<bool INSTANTIATED0, bool INSTANTIATED1>
SYS_FORCE_INLINE void intersect (T &box_tmin, T &box_tmax, const UT_FixedVector< uint, NAXES, INSTANTIATED0 > &signs, const UT_FixedVector< T, NAXES, INSTANTIATED1 > &origin, const UT_FixedVector< T, NAXES, INSTANTIATED1 > &inverse_direction) const noexcept
 
template<bool INSTANTIATED0, bool INSTANTIATED1>
SYS_FORCE_INLINE void intersectTol (T &box_tmin, T &box_tmax, const UT_FixedVector< uint, NAXES, INSTANTIATED0 > &signs, const UT_FixedVector< T, NAXES, INSTANTIATED1 > &origin, const UT_FixedVector< T, NAXES, INSTANTIATED1 > &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
 
template<bool INSTANTIATED>
SYS_FORCE_INLINEminDistance2 (const UT_FixedVector< T, NAXES, INSTANTIATED > &p) const noexcept
 
template<bool INSTANTIATED>
SYS_FORCE_INLINEmaxDistance2 (const UT_FixedVector< T, NAXES, INSTANTIATED > &p) const noexcept
 
template<bool INSTANTIATED0>
auto isInside (const UT_FixedVector< T, NAXES, INSTANTIATED0 > &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 S , bool INSTANTIATED>
SYS_FORCE_INLINE UT::Box< T, NAXES >::Box ( const UT_FixedVector< S, NAXES, INSTANTIATED > &  pt)
inlineexplicitnoexcept

Definition at line 57 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 231 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 105 of file UT_BVH.h.

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

Definition at line 152 of file UT_BVH.h.

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

Definition at line 174 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 115 of file UT_BVH.h.

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

Definition at line 145 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 166 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 157 of file UT_BVH.h.

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

Definition at line 190 of file UT_BVH.h.

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

Definition at line 81 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 90 of file UT_BVH.h.

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

Definition at line 121 of file UT_BVH.h.

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

Definition at line 129 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 99 of file UT_BVH.h.

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

Definition at line 137 of file UT_BVH.h.

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

Definition at line 239 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 278 of file UT_BVH.h.

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

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

Definition at line 257 of file UT_BVH.h.

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

Definition at line 312 of file UT_BVH.h.

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

Definition at line 299 of file UT_BVH.h.

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

Definition at line 286 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 64 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 72 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 76 of file UT_BVH.h.

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

Definition at line 183 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: