All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
VtKatana_ToVtConversion< ElementType > Class Template Reference

Conversion utilities for Katana attributes to VtArrays containing type T. More...

Static Public Member Functions

template<typename T = ElementType>
static std::enable_if
< VtKatana_IsNumericCastable
< T >::value, const VtArray< T >
>::type 
ZeroCopy (const AttrType &attribute, float time)
 Zero copy utility for numeric types (GfVec3f, GfMatrix4d, ...). More...
 
template<typename T = ElementType>
static std::enable_if
< VtKatana_IsNumericCastable
< T >::value, VtArray< T >
>::type 
Copy (const SampleType &sample)
 Copy utility for numeric types that don't require an intermediate copy to construct a VtArray (ie. More...
 
template<typename T = ElementType>
static std::enable_if
< VtKatana_IsNumericCopyRequiredScalar
< T >::value, VtArray< T >
>::type 
Copy (const SampleType &array)
 Copy utility for numeric scalar types require an intermediate copy to construct a VtArray (ie. More...
 
template<typename T = ElementType>
static std::enable_if
< VtKatana_IsNumericCopyRequiredTuple
< T >::value, VtArray< T >
>::type 
Copy (const SampleType &array)
 Copy utility for numeric tuple types require an intermediate copy to construct a VtArray (ie. More...
 
template<typename T = ElementType>
static std::enable_if
< VtKatana_IsString< T >
::value, VtArray< T > >::type 
Copy (const SampleType &sample)
 Copy utility for std::string. More...
 
template<typename T = ElementType>
static std::enable_if
< VtKatana_HoldsString< T >
::value, VtArray< T > >::type 
Copy (const SampleType &sample)
 Copy utility for holders of std::string (This assumes that the holder can be constructed from a string. More...
 
template<typename T = ElementType>
static std::enable_if
< VtKatana_IsNumericCopyRequired
< T >::value||VtKatana_IsOrHoldsString
< T >::value, const VtArray< T >
>::type 
MapInternal (const AttrType &attribute, float sample=0.0f)
 Maps a given attribute sample to a VtArray. More...
 
template<typename T = ElementType>
static std::enable_if
< VtKatana_IsNumericCastable
< T >::value, const VtArray< T >
>::type 
MapInternal (const AttrType &attribute, float sample=0.0f)
 Maps a given attribute sample to a VtArray. More...
 
template<typename T = ElementType>
static std::enable_if
< VtKatana_IsNumericScalar< T >
::value, T >::type 
CopyElement (const AttrType &attr, float time)
 
template<typename T = ElementType>
static std::enable_if
< GfIsGfVec< T >::value
&&VtKatana_IsNumericCastable
< T >::value, T >::type 
CopyElement (const AttrType &attr, float time)
 
template<typename T = ElementType>
static std::enable_if
< GfIsGfVec< T >::value
&&!VtKatana_IsNumericCastable
< T >::value, T >::type 
CopyElement (const AttrType &attr)
 
template<typename T = ElementType>
static std::enable_if
< GfIsGfMatrix< T >::value, T >
::type 
CopyElement (const AttrType &attr)
 
template<typename T = ElementType>
static std::enable_if
< VtKatana_IsString< T >
::value, T >::type 
CopyElement (const AttrType &attr)
 
template<typename T = ElementType>
static std::enable_if
< VtKatana_HoldsString< T >
::value, T >::type 
CopyElement (const AttrType &attr)
 

Detailed Description

template<typename ElementType>
class VtKatana_Internal::VtKatana_ToVtConversion< ElementType >

Conversion utilities for Katana attributes to VtArrays containing type T.

Definition at line 66 of file internalToVt.h.

Member Function Documentation

static std::enable_if<VtKatana_IsNumericCastable<T>::value, VtArray<T> >::type Copy ( const SampleType &  sample)
inlinestatic

Copy utility for numeric types that don't require an intermediate copy to construct a VtArray (ie.

FloatAttr->VtVec3fArray)

Definition at line 145 of file internalToVt.h.

static std::enable_if<VtKatana_IsNumericCopyRequiredScalar<T>::value, VtArray<T> >::type Copy ( const SampleType &  array)
inlinestatic

Copy utility for numeric scalar types require an intermediate copy to construct a VtArray (ie.

IntAttr->VtBoolArray)

Definition at line 165 of file internalToVt.h.

static std::enable_if<VtKatana_IsNumericCopyRequiredTuple<T>::value, VtArray<T> >::type Copy ( const SampleType &  array)
inlinestatic

Copy utility for numeric tuple types require an intermediate copy to construct a VtArray (ie.

FloatAttr->VtVec3hArray)

Definition at line 179 of file internalToVt.h.

static std::enable_if<VtKatana_IsString<T>::value, VtArray<T> >::type Copy ( const SampleType &  sample)
inlinestatic

Copy utility for std::string.

Definition at line 203 of file internalToVt.h.

static std::enable_if<VtKatana_HoldsString<T>::value, VtArray<T> >::type Copy ( const SampleType &  sample)
inlinestatic

Copy utility for holders of std::string (This assumes that the holder can be constructed from a string.

This is trivially true for TfToken, but there's some amibguity here with what the right thing to do with SdfAssetPath which takes one or two strings as an input.)

Definition at line 218 of file internalToVt.h.

static std::enable_if<VtKatana_IsNumericCopyRequired<T>::value || VtKatana_IsOrHoldsString<T>::value, const VtArray<T> >::type MapInternal ( const AttrType &  attribute,
float  sample = 0.0f 
)
inlinestatic

Maps a given attribute sample to a VtArray.

Specialization for types that require an intermediate copy for translation.

Definition at line 232 of file internalToVt.h.

static std::enable_if<VtKatana_IsNumericCastable<T>::value, const VtArray<T> >::type MapInternal ( const AttrType &  attribute,
float  sample = 0.0f 
)
inlinestatic

Maps a given attribute sample to a VtArray.

Specialization for types that DO NOT require an intermediate copy for translation.

Definition at line 243 of file internalToVt.h.

static std::enable_if<VtKatana_IsNumericCastable<T>::value, const VtArray<T> >::type ZeroCopy ( const AttrType &  attribute,
float  time 
)
inlinestatic

Zero copy utility for numeric types (GfVec3f, GfMatrix4d, ...).

The resulting VtArray retains a reference to the attribute to avoid the copy.

Definition at line 122 of file internalToVt.h.


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