HDK
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
UT_FixedVector< T, SIZE, INSTANTIATED > Class Template Reference

#include <UT_FixedVector.h>

Public Types

typedef UT_FixedVector< T,
SIZE, INSTANTIATED > 
ThisType
 
typedef T value_type
 
typedef T theType
 
typedef UT_StorageNum< TStorage
 

Public Member Functions

SYS_FORCE_INLINE UT_FixedVector ()=default
 
SYS_FORCE_INLINE UT_FixedVector (T that) noexcept
 Initializes every component to the same value. More...
 
SYS_FORCE_INLINE UT_FixedVector (const ThisType &that)=default
 
SYS_FORCE_INLINE UT_FixedVector (ThisType &&that)=default
 
template<typename S , bool S_INSTANTIATED>
SYS_FORCE_INLINE UT_FixedVector (const UT_FixedVector< S, SIZE, S_INSTANTIATED > &that) noexcept
 
template<typename S >
SYS_FORCE_INLINE UT_FixedVector (const S that[SIZE]) noexcept
 
SYS_FORCE_INLINE const Toperator[] (exint i) const noexcept
 
SYS_FORCE_INLINE Toperator[] (exint i) noexcept
 
SYS_FORCE_INLINE constexpr
const T
data () const noexcept
 
SYS_FORCE_INLINE Tdata () noexcept
 
SYS_FORCE_INLINE ThisTypeoperator= (const ThisType &that)=default
 
SYS_FORCE_INLINE ThisTypeoperator= (ThisType &&that)=default
 
template<typename S , bool S_INSTANTIATED>
SYS_FORCE_INLINE ThisTypeoperator= (const UT_FixedVector< S, SIZE, S_INSTANTIATED > &that) noexcept
 
SYS_FORCE_INLINE const ThisTypeoperator= (T that) noexcept
 
template<typename S , bool S_INSTANTIATED>
SYS_FORCE_INLINE void operator+= (const UT_FixedVector< S, SIZE, S_INSTANTIATED > &that)
 
SYS_FORCE_INLINE void operator+= (T that)
 
template<typename S , bool S_INSTANTIATED>
SYS_FORCE_INLINE
UT_FixedVector< typename
UT_StorageBetter< T, S >::Type,
SIZE
operator+ (const UT_FixedVector< S, SIZE, S_INSTANTIATED > &that) const
 
template<typename S , bool S_INSTANTIATED>
SYS_FORCE_INLINE void operator-= (const UT_FixedVector< S, SIZE, S_INSTANTIATED > &that)
 
SYS_FORCE_INLINE void operator-= (T that)
 
template<typename S , bool S_INSTANTIATED>
SYS_FORCE_INLINE
UT_FixedVector< typename
UT_StorageBetter< T, S >::Type,
SIZE
operator- (const UT_FixedVector< S, SIZE, S_INSTANTIATED > &that) const
 
template<typename S , bool S_INSTANTIATED>
SYS_FORCE_INLINE void operator*= (const UT_FixedVector< S, SIZE, S_INSTANTIATED > &that)
 
template<typename S , bool S_INSTANTIATED>
SYS_FORCE_INLINE
UT_FixedVector< typename
UT_StorageBetter< T, S >::Type,
SIZE
operator* (const UT_FixedVector< S, SIZE, S_INSTANTIATED > &that) const
 
SYS_FORCE_INLINE void operator*= (T that)
 
SYS_FORCE_INLINE
UT_FixedVector< T, SIZE
operator* (T that) const
 
template<typename S , bool S_INSTANTIATED>
SYS_FORCE_INLINE void operator/= (const UT_FixedVector< S, SIZE, S_INSTANTIATED > &that)
 
template<typename S , bool S_INSTANTIATED>
SYS_FORCE_INLINE
UT_FixedVector< typename
UT_StorageBetter< T, S >::Type,
SIZE
operator/ (const UT_FixedVector< S, SIZE, S_INSTANTIATED > &that) const
 
SYS_FORCE_INLINE void operator/= (T that)
 
SYS_FORCE_INLINE
UT_FixedVector< T, SIZE
operator/ (T that) const
 
SYS_FORCE_INLINE void negate ()
 
SYS_FORCE_INLINE
UT_FixedVector< T, SIZE
operator- () const
 
template<typename S , bool S_INSTANTIATED>
SYS_FORCE_INLINE bool operator== (const UT_FixedVector< S, SIZE, S_INSTANTIATED > &that) const noexcept
 
template<typename S , bool S_INSTANTIATED>
SYS_FORCE_INLINE bool operator!= (const UT_FixedVector< S, SIZE, S_INSTANTIATED > &that) const noexcept
 
SYS_FORCE_INLINE bool isNan () const
 
SYS_FORCE_INLINE bool isZero () const noexcept
 
SYS_FORCE_INLINE bool equalZero (T tol=T(SYS_FTOLERANCE)) const
 
template<typename S , bool S_INSTANTIATED>
SYS_FORCE_INLINE bool isEqual (const UT_FixedVector< S, SIZE, S_INSTANTIATED > &that, S tol=S(SYS_FTOLERANCE)) const
 
SYS_FORCE_INLINE T maxComponent () const
 
SYS_FORCE_INLINE T minComponent () const
 
SYS_FORCE_INLINE T avgComponent () const
 
SYS_FORCE_INLINE
Storage::AtLeast32Bit 
length2 () const noexcept
 
SYS_FORCE_INLINE Storage::MathFloat length () const
 
template<typename S , bool S_INSTANTIATED>
SYS_FORCE_INLINE UT_StorageNum
< typename UT_StorageBetter< T,
S >::Type >::AtLeast32Bit 
dot (const UT_FixedVector< S, SIZE, S_INSTANTIATED > &that) const
 
template<typename S , bool S_INSTANTIATED>
SYS_FORCE_INLINE UT_StorageNum
< typename UT_StorageBetter< T,
S >::Type >::AtLeast32Bit 
distance2 (const UT_FixedVector< S, SIZE, S_INSTANTIATED > &that) const
 
template<typename S , bool S_INSTANTIATED>
SYS_FORCE_INLINE UT_StorageNum
< typename UT_StorageBetter< T,
S >::Type >::MathFloat 
distance (const UT_FixedVector< S, SIZE, S_INSTANTIATED > &that) const
 
SYS_FORCE_INLINE Storage::MathFloat normalize ()
 

Public Attributes

T vec [SIZE]
 

Static Public Attributes

static const exint theSize = SIZE
 

Detailed Description

template<typename T, exint SIZE, bool INSTANTIATED = false>
class UT_FixedVector< T, SIZE, INSTANTIATED >

Definition at line 24 of file UT_FixedVector.h.

Member Typedef Documentation

template<typename T, exint SIZE, bool INSTANTIATED = false>
typedef UT_StorageNum<T> UT_FixedVector< T, SIZE, INSTANTIATED >::Storage

Definition at line 32 of file UT_FixedVector.h.

template<typename T, exint SIZE, bool INSTANTIATED = false>
typedef T UT_FixedVector< T, SIZE, INSTANTIATED >::theType

Definition at line 29 of file UT_FixedVector.h.

template<typename T, exint SIZE, bool INSTANTIATED = false>
typedef UT_FixedVector<T,SIZE,INSTANTIATED> UT_FixedVector< T, SIZE, INSTANTIATED >::ThisType

Definition at line 27 of file UT_FixedVector.h.

template<typename T, exint SIZE, bool INSTANTIATED = false>
typedef T UT_FixedVector< T, SIZE, INSTANTIATED >::value_type

Definition at line 28 of file UT_FixedVector.h.

Constructor & Destructor Documentation

template<typename T, exint SIZE, bool INSTANTIATED = false>
SYS_FORCE_INLINE UT_FixedVector< T, SIZE, INSTANTIATED >::UT_FixedVector ( )
default
template<typename T, exint SIZE, bool INSTANTIATED = false>
SYS_FORCE_INLINE UT_FixedVector< T, SIZE, INSTANTIATED >::UT_FixedVector ( T  that)
inlineexplicitnoexcept

Initializes every component to the same value.

Definition at line 37 of file UT_FixedVector.h.

template<typename T, exint SIZE, bool INSTANTIATED = false>
SYS_FORCE_INLINE UT_FixedVector< T, SIZE, INSTANTIATED >::UT_FixedVector ( const ThisType that)
default
template<typename T, exint SIZE, bool INSTANTIATED = false>
SYS_FORCE_INLINE UT_FixedVector< T, SIZE, INSTANTIATED >::UT_FixedVector ( ThisType &&  that)
default
template<typename T, exint SIZE, bool INSTANTIATED = false>
template<typename S , bool S_INSTANTIATED>
SYS_FORCE_INLINE UT_FixedVector< T, SIZE, INSTANTIATED >::UT_FixedVector ( const UT_FixedVector< S, SIZE, S_INSTANTIATED > &  that)
inlinenoexcept

Converts vector of S into vector of T, or just copies if same type.

Definition at line 49 of file UT_FixedVector.h.

template<typename T, exint SIZE, bool INSTANTIATED = false>
template<typename S >
SYS_FORCE_INLINE UT_FixedVector< T, SIZE, INSTANTIATED >::UT_FixedVector ( const S  that[SIZE])
inlinenoexcept

Definition at line 56 of file UT_FixedVector.h.

Member Function Documentation

template<typename T, exint SIZE, bool INSTANTIATED = false>
SYS_FORCE_INLINE T UT_FixedVector< T, SIZE, INSTANTIATED >::avgComponent ( ) const
inline

Definition at line 283 of file UT_FixedVector.h.

template<typename T, exint SIZE, bool INSTANTIATED = false>
SYS_FORCE_INLINE constexpr const T* UT_FixedVector< T, SIZE, INSTANTIATED >::data ( ) const
inlinenoexcept

Definition at line 73 of file UT_FixedVector.h.

template<typename T, exint SIZE, bool INSTANTIATED = false>
SYS_FORCE_INLINE T* UT_FixedVector< T, SIZE, INSTANTIATED >::data ( )
inlinenoexcept

Definition at line 77 of file UT_FixedVector.h.

template<typename T, exint SIZE, bool INSTANTIATED = false>
template<typename S , bool S_INSTANTIATED>
SYS_FORCE_INLINE UT_StorageNum<typename UT_StorageBetter<T,S>::Type>::MathFloat UT_FixedVector< T, SIZE, INSTANTIATED >::distance ( const UT_FixedVector< S, SIZE, S_INSTANTIATED > &  that) const
inline

Definition at line 331 of file UT_FixedVector.h.

template<typename T, exint SIZE, bool INSTANTIATED = false>
template<typename S , bool S_INSTANTIATED>
SYS_FORCE_INLINE UT_StorageNum<typename UT_StorageBetter<T,S>::Type>::AtLeast32Bit UT_FixedVector< T, SIZE, INSTANTIATED >::distance2 ( const UT_FixedVector< S, SIZE, S_INSTANTIATED > &  that) const
inline

Definition at line 318 of file UT_FixedVector.h.

template<typename T, exint SIZE, bool INSTANTIATED = false>
template<typename S , bool S_INSTANTIATED>
SYS_FORCE_INLINE UT_StorageNum<typename UT_StorageBetter<T,S>::Type>::AtLeast32Bit UT_FixedVector< T, SIZE, INSTANTIATED >::dot ( const UT_FixedVector< S, SIZE, S_INSTANTIATED > &  that) const
inline

Definition at line 309 of file UT_FixedVector.h.

template<typename T, exint SIZE, bool INSTANTIATED = false>
SYS_FORCE_INLINE bool UT_FixedVector< T, SIZE, INSTANTIATED >::equalZero ( T  tol = T(SYS_FTOLERANCE)) const
inline

Definition at line 250 of file UT_FixedVector.h.

template<typename T, exint SIZE, bool INSTANTIATED = false>
template<typename S , bool S_INSTANTIATED>
SYS_FORCE_INLINE bool UT_FixedVector< T, SIZE, INSTANTIATED >::isEqual ( const UT_FixedVector< S, SIZE, S_INSTANTIATED > &  that,
S  tol = S(SYS_FTOLERANCE) 
) const
inline

Definition at line 260 of file UT_FixedVector.h.

template<typename T, exint SIZE, bool INSTANTIATED = false>
SYS_FORCE_INLINE bool UT_FixedVector< T, SIZE, INSTANTIATED >::isNan ( ) const
inline

Definition at line 232 of file UT_FixedVector.h.

template<typename T, exint SIZE, bool INSTANTIATED = false>
SYS_FORCE_INLINE bool UT_FixedVector< T, SIZE, INSTANTIATED >::isZero ( ) const
inlinenoexcept

Definition at line 241 of file UT_FixedVector.h.

template<typename T, exint SIZE, bool INSTANTIATED = false>
SYS_FORCE_INLINE Storage::MathFloat UT_FixedVector< T, SIZE, INSTANTIATED >::length ( void  ) const
inline

Definition at line 303 of file UT_FixedVector.h.

template<typename T, exint SIZE, bool INSTANTIATED = false>
SYS_FORCE_INLINE Storage::AtLeast32Bit UT_FixedVector< T, SIZE, INSTANTIATED >::length2 ( ) const
inlinenoexcept

Definition at line 291 of file UT_FixedVector.h.

template<typename T, exint SIZE, bool INSTANTIATED = false>
SYS_FORCE_INLINE T UT_FixedVector< T, SIZE, INSTANTIATED >::maxComponent ( ) const
inline

Definition at line 269 of file UT_FixedVector.h.

template<typename T, exint SIZE, bool INSTANTIATED = false>
SYS_FORCE_INLINE T UT_FixedVector< T, SIZE, INSTANTIATED >::minComponent ( ) const
inline

Definition at line 276 of file UT_FixedVector.h.

template<typename T, exint SIZE, bool INSTANTIATED = false>
SYS_FORCE_INLINE void UT_FixedVector< T, SIZE, INSTANTIATED >::negate ( )
inline

Definition at line 203 of file UT_FixedVector.h.

template<typename T, exint SIZE, bool INSTANTIATED = false>
SYS_FORCE_INLINE Storage::MathFloat UT_FixedVector< T, SIZE, INSTANTIATED >::normalize ( )
inline

Definition at line 337 of file UT_FixedVector.h.

template<typename T, exint SIZE, bool INSTANTIATED = false>
template<typename S , bool S_INSTANTIATED>
SYS_FORCE_INLINE bool UT_FixedVector< T, SIZE, INSTANTIATED >::operator!= ( const UT_FixedVector< S, SIZE, S_INSTANTIATED > &  that) const
inlinenoexcept

Definition at line 228 of file UT_FixedVector.h.

template<typename T, exint SIZE, bool INSTANTIATED = false>
template<typename S , bool S_INSTANTIATED>
SYS_FORCE_INLINE UT_FixedVector<typename UT_StorageBetter<T,S>::Type,SIZE> UT_FixedVector< T, SIZE, INSTANTIATED >::operator* ( const UT_FixedVector< S, SIZE, S_INSTANTIATED > &  that) const
inline

Definition at line 145 of file UT_FixedVector.h.

template<typename T, exint SIZE, bool INSTANTIATED = false>
SYS_FORCE_INLINE UT_FixedVector<T,SIZE> UT_FixedVector< T, SIZE, INSTANTIATED >::operator* ( T  that) const
inline

NOTE: Strictly speaking, this should use UT_StorageBetter<T,S>::Type, but in the interests of avoiding accidental precision escalation, it uses T.

Definition at line 161 of file UT_FixedVector.h.

template<typename T, exint SIZE, bool INSTANTIATED = false>
template<typename S , bool S_INSTANTIATED>
SYS_FORCE_INLINE void UT_FixedVector< T, SIZE, INSTANTIATED >::operator*= ( const UT_FixedVector< S, SIZE, S_INSTANTIATED > &  that)
inline

Definition at line 139 of file UT_FixedVector.h.

template<typename T, exint SIZE, bool INSTANTIATED = false>
SYS_FORCE_INLINE void UT_FixedVector< T, SIZE, INSTANTIATED >::operator*= ( T  that)
inline

Definition at line 153 of file UT_FixedVector.h.

template<typename T, exint SIZE, bool INSTANTIATED = false>
template<typename S , bool S_INSTANTIATED>
SYS_FORCE_INLINE UT_FixedVector<typename UT_StorageBetter<T,S>::Type,SIZE> UT_FixedVector< T, SIZE, INSTANTIATED >::operator+ ( const UT_FixedVector< S, SIZE, S_INSTANTIATED > &  that) const
inline

Definition at line 110 of file UT_FixedVector.h.

template<typename T, exint SIZE, bool INSTANTIATED = false>
template<typename S , bool S_INSTANTIATED>
SYS_FORCE_INLINE void UT_FixedVector< T, SIZE, INSTANTIATED >::operator+= ( const UT_FixedVector< S, SIZE, S_INSTANTIATED > &  that)
inline

Definition at line 99 of file UT_FixedVector.h.

template<typename T, exint SIZE, bool INSTANTIATED = false>
SYS_FORCE_INLINE void UT_FixedVector< T, SIZE, INSTANTIATED >::operator+= ( T  that)
inline

Definition at line 104 of file UT_FixedVector.h.

template<typename T, exint SIZE, bool INSTANTIATED = false>
template<typename S , bool S_INSTANTIATED>
SYS_FORCE_INLINE UT_FixedVector<typename UT_StorageBetter<T,S>::Type,SIZE> UT_FixedVector< T, SIZE, INSTANTIATED >::operator- ( const UT_FixedVector< S, SIZE, S_INSTANTIATED > &  that) const
inline

Definition at line 130 of file UT_FixedVector.h.

template<typename T, exint SIZE, bool INSTANTIATED = false>
SYS_FORCE_INLINE UT_FixedVector<T,SIZE> UT_FixedVector< T, SIZE, INSTANTIATED >::operator- ( ) const
inline

Definition at line 209 of file UT_FixedVector.h.

template<typename T, exint SIZE, bool INSTANTIATED = false>
template<typename S , bool S_INSTANTIATED>
SYS_FORCE_INLINE void UT_FixedVector< T, SIZE, INSTANTIATED >::operator-= ( const UT_FixedVector< S, SIZE, S_INSTANTIATED > &  that)
inline

Definition at line 119 of file UT_FixedVector.h.

template<typename T, exint SIZE, bool INSTANTIATED = false>
SYS_FORCE_INLINE void UT_FixedVector< T, SIZE, INSTANTIATED >::operator-= ( T  that)
inline

Definition at line 124 of file UT_FixedVector.h.

template<typename T, exint SIZE, bool INSTANTIATED = false>
template<typename S , bool S_INSTANTIATED>
SYS_FORCE_INLINE UT_FixedVector<typename UT_StorageBetter<T,S>::Type,SIZE> UT_FixedVector< T, SIZE, INSTANTIATED >::operator/ ( const UT_FixedVector< S, SIZE, S_INSTANTIATED > &  that) const
inline

Definition at line 175 of file UT_FixedVector.h.

template<typename T, exint SIZE, bool INSTANTIATED = false>
SYS_FORCE_INLINE UT_FixedVector<T,SIZE> UT_FixedVector< T, SIZE, INSTANTIATED >::operator/ ( T  that) const
inline

NOTE: Strictly speaking, this should use UT_StorageBetter<T,S>::Type, but in the interests of avoiding accidental precision escalation, it uses T.

Definition at line 194 of file UT_FixedVector.h.

template<typename T, exint SIZE, bool INSTANTIATED = false>
template<typename S , bool S_INSTANTIATED>
SYS_FORCE_INLINE void UT_FixedVector< T, SIZE, INSTANTIATED >::operator/= ( const UT_FixedVector< S, SIZE, S_INSTANTIATED > &  that)
inline

Definition at line 169 of file UT_FixedVector.h.

template<typename T, exint SIZE, bool INSTANTIATED = false>
SYS_FORCE_INLINE void UT_FixedVector< T, SIZE, INSTANTIATED >::operator/= ( T  that)
inline

Definition at line 184 of file UT_FixedVector.h.

template<typename T, exint SIZE, bool INSTANTIATED = false>
SYS_FORCE_INLINE ThisType& UT_FixedVector< T, SIZE, INSTANTIATED >::operator= ( const ThisType that)
default
template<typename T, exint SIZE, bool INSTANTIATED = false>
SYS_FORCE_INLINE ThisType& UT_FixedVector< T, SIZE, INSTANTIATED >::operator= ( ThisType &&  that)
default
template<typename T, exint SIZE, bool INSTANTIATED = false>
template<typename S , bool S_INSTANTIATED>
SYS_FORCE_INLINE ThisType& UT_FixedVector< T, SIZE, INSTANTIATED >::operator= ( const UT_FixedVector< S, SIZE, S_INSTANTIATED > &  that)
inlinenoexcept

Definition at line 86 of file UT_FixedVector.h.

template<typename T, exint SIZE, bool INSTANTIATED = false>
SYS_FORCE_INLINE const ThisType& UT_FixedVector< T, SIZE, INSTANTIATED >::operator= ( T  that)
inlinenoexcept

Definition at line 92 of file UT_FixedVector.h.

template<typename T, exint SIZE, bool INSTANTIATED = false>
template<typename S , bool S_INSTANTIATED>
SYS_FORCE_INLINE bool UT_FixedVector< T, SIZE, INSTANTIATED >::operator== ( const UT_FixedVector< S, SIZE, S_INSTANTIATED > &  that) const
inlinenoexcept

Definition at line 218 of file UT_FixedVector.h.

template<typename T, exint SIZE, bool INSTANTIATED = false>
SYS_FORCE_INLINE const T& UT_FixedVector< T, SIZE, INSTANTIATED >::operator[] ( exint  i) const
inlinenoexcept

Definition at line 62 of file UT_FixedVector.h.

template<typename T, exint SIZE, bool INSTANTIATED = false>
SYS_FORCE_INLINE T& UT_FixedVector< T, SIZE, INSTANTIATED >::operator[] ( exint  i)
inlinenoexcept

Definition at line 67 of file UT_FixedVector.h.

Member Data Documentation

template<typename T, exint SIZE, bool INSTANTIATED = false>
const exint UT_FixedVector< T, SIZE, INSTANTIATED >::theSize = SIZE
static

Definition at line 30 of file UT_FixedVector.h.

template<typename T, exint SIZE, bool INSTANTIATED = false>
T UT_FixedVector< T, SIZE, INSTANTIATED >::vec[SIZE]

Definition at line 353 of file UT_FixedVector.h.


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