HDK
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
HdTimeSampleArray< TYPE, CAPACITY > Struct Template Reference

#include <timeSampleArray.h>

Public Member Functions

 HdTimeSampleArray ()
 
 HdTimeSampleArray (const HdTimeSampleArray &rhs)
 
HdTimeSampleArrayoperator= (const HdTimeSampleArray &rhs)
 
void Resize (unsigned int newSize)
 Resize the internal buffers. More...
 
TYPE Resample (float u) const
 
void UnboxFrom (HdTimeSampleArray< VtValue, CAPACITY > const &box)
 

Public Attributes

size_t count
 
TfSmallVector< float, CAPACITY > times
 
TfSmallVector< TYPE, CAPACITY > values
 

Detailed Description

template<typename TYPE, unsigned int CAPACITY>
struct HdTimeSampleArray< TYPE, CAPACITY >

An array of a value sampled over time, in struct-of-arrays layout. This is provided as a convenience for time-sampling attributes. This type has static capacity but dynamic size, providing a limited ability to handle variable sampling without requiring heap allocation.

Definition at line 117 of file timeSampleArray.h.

Constructor & Destructor Documentation

template<typename TYPE, unsigned int CAPACITY>
HdTimeSampleArray< TYPE, CAPACITY >::HdTimeSampleArray ( )
inline

Definition at line 119 of file timeSampleArray.h.

template<typename TYPE, unsigned int CAPACITY>
HdTimeSampleArray< TYPE, CAPACITY >::HdTimeSampleArray ( const HdTimeSampleArray< TYPE, CAPACITY > &  rhs)
inline

Definition at line 125 of file timeSampleArray.h.

Member Function Documentation

template<typename TYPE, unsigned int CAPACITY>
HdTimeSampleArray& HdTimeSampleArray< TYPE, CAPACITY >::operator= ( const HdTimeSampleArray< TYPE, CAPACITY > &  rhs)
inline

Definition at line 131 of file timeSampleArray.h.

template<typename TYPE, unsigned int CAPACITY>
TYPE HdTimeSampleArray< TYPE, CAPACITY >::Resample ( float  u) const
inline

Convience method for invoking HdResampleRawTimeSamples on this HdTimeSampleArray.

Definition at line 147 of file timeSampleArray.h.

template<typename TYPE, unsigned int CAPACITY>
void HdTimeSampleArray< TYPE, CAPACITY >::Resize ( unsigned int  newSize)
inline

Resize the internal buffers.

Definition at line 139 of file timeSampleArray.h.

template<typename TYPE, unsigned int CAPACITY>
void HdTimeSampleArray< TYPE, CAPACITY >::UnboxFrom ( HdTimeSampleArray< VtValue, CAPACITY > const box)
inline

Unbox an HdTimeSampleArray holding boxed VtValue<VtArray<T>> samples into an aray holding VtArray<T> samples.

Similar to VtValue::Get(), this will issue a coding error if the VtValue is not holding the expected type.

See Also
VtValue::Get()

Definition at line 158 of file timeSampleArray.h.

Member Data Documentation

template<typename TYPE, unsigned int CAPACITY>
size_t HdTimeSampleArray< TYPE, CAPACITY >::count

Definition at line 170 of file timeSampleArray.h.

template<typename TYPE, unsigned int CAPACITY>
TfSmallVector<float, CAPACITY> HdTimeSampleArray< TYPE, CAPACITY >::times

Definition at line 171 of file timeSampleArray.h.

template<typename TYPE, unsigned int CAPACITY>
TfSmallVector<TYPE, CAPACITY> HdTimeSampleArray< TYPE, CAPACITY >::values

Definition at line 172 of file timeSampleArray.h.


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