HDK
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
UsdSkelAnimMapper Class Reference

#include <animMapper.h>

Public Member Functions

USDSKEL_API UsdSkelAnimMapper ()
 Construct a null mapper. More...
 
USDSKEL_API UsdSkelAnimMapper (size_t size)
 
USDSKEL_API UsdSkelAnimMapper (const VtTokenArray &sourceOrder, const VtTokenArray &targetOrder)
 
USDSKEL_API UsdSkelAnimMapper (const TfToken *sourceOrder, size_t sourceOrderSize, const TfToken *targetOrder, size_t targetOrderSize)
 
template<typename Container >
bool Remap (const Container &source, Container *target, int elementSize=1, const typename Container::value_type *defaultValue=nullptr) const
 
USDSKEL_API bool Remap (const VtValue &source, VtValue *target, int elementSize=1, const VtValue &defaultValue=VtValue()) const
 
template<typename Matrix4 >
USDSKEL_API bool RemapTransforms (const VtArray< Matrix4 > &source, VtArray< Matrix4 > *target, int elementSize=1) const
 
USDSKEL_API bool IsIdentity () const
 
USDSKEL_API bool IsSparse () const
 
USDSKEL_API bool IsNull () const
 
USDSKEL_API size_t size () const
 
bool operator== (const UsdSkelAnimMapper &o) const
 
bool operator!= (const UsdSkelAnimMapper &o) const
 

Detailed Description

Definition at line 52 of file animMapper.h.

Constructor & Destructor Documentation

USDSKEL_API UsdSkelAnimMapper::UsdSkelAnimMapper ( )

Construct a null mapper.

USDSKEL_API UsdSkelAnimMapper::UsdSkelAnimMapper ( size_t  size)

Construct an identity mapper for remapping a range of size elems. An identity mapper is used to indicate that no remapping is required.

USDSKEL_API UsdSkelAnimMapper::UsdSkelAnimMapper ( const VtTokenArray &  sourceOrder,
const VtTokenArray &  targetOrder 
)

Construct a mapper for mapping data from sourceOrder to targetOrder.

USDSKEL_API UsdSkelAnimMapper::UsdSkelAnimMapper ( const TfToken sourceOrder,
size_t  sourceOrderSize,
const TfToken targetOrder,
size_t  targetOrderSize 
)

Construct a mapper for mapping data from sourceOrder to targetOrder, each being arrays of size sourceOrderSize and targetOrderSize, respectively.

Member Function Documentation

USDSKEL_API bool UsdSkelAnimMapper::IsIdentity ( ) const

Returns true if this is an identity map. The source and target orders of an identity map are identical.

USDSKEL_API bool UsdSkelAnimMapper::IsNull ( ) const

Returns true if this is a null mapping. No source elements of a null map are mapped to the target.

USDSKEL_API bool UsdSkelAnimMapper::IsSparse ( ) const

Returns true if this is a sparse mapping. A sparse mapping means that not all target values will be overridden by source values, when mapped with Remap().

bool UsdSkelAnimMapper::operator!= ( const UsdSkelAnimMapper o) const
inline

Definition at line 136 of file animMapper.h.

bool UsdSkelAnimMapper::operator== ( const UsdSkelAnimMapper o) const
template<typename Container >
bool UsdSkelAnimMapper::Remap ( const Container &  source,
Container *  target,
int  elementSize = 1,
const typename Container::value_type *  defaultValue = nullptr 
) const

Typed remapping of data in an arbitrary, stl-like container. The source array provides a run of elementSize for each path in the \em sourceOrder. These elements are remapped and copied over the target array. Prior to remapping, the target array is resized to the size of the \em targetOrder (as given at mapper construction time) multiplied by the elementSize. New element created in the array are initialized to defaultValue, if provided.

Definition at line 196 of file animMapper.h.

USDSKEL_API bool UsdSkelAnimMapper::Remap ( const VtValue source,
VtValue target,
int  elementSize = 1,
const VtValue defaultValue = VtValue() 
) const

Type-erased remapping of data from source into target. The source array provides a run of elementSize elements for each path in the \em sourceOrder. These elements are remapped and copied over the target array. Prior to remapping, the target array is resized to the size of the \em targetOrder (as given at mapper construction time) multiplied by the elementSize. New elements created in the array are initialized to defaultValue, if provided. Remapping is supported for registered Sdf array value types only.

template<typename Matrix4 >
USDSKEL_API bool UsdSkelAnimMapper::RemapTransforms ( const VtArray< Matrix4 > &  source,
VtArray< Matrix4 > *  target,
int  elementSize = 1 
) const

Convenience method for the common task of remapping transform arrays. This performs the same operation as Remap(), but sets the matrix identity as the default value.

USDSKEL_API size_t UsdSkelAnimMapper::size ( void  ) const
inline

Get the size of the output array that this mapper expects to map data into.

Definition at line 132 of file animMapper.h.


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