Mitsuba Renderer  0.5.0
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
mitsuba::AnimationTrack< T > Class Template Reference

Parameterizable animation track. More...

#include <mitsuba/core/track.h>

+ Inheritance diagram for mitsuba::AnimationTrack< T >:

Public Types

typedef T ValueType
 
- Public Types inherited from mitsuba::AbstractAnimationTrack
enum  EType {
  EInvalid = 0, ETranslationX = 1, ETranslationY = 2, ETranslationZ = 3,
  ETranslationXYZ = 4, EScaleX = 5, EScaleY = 6, EScaleZ = 7,
  EScaleXYZ = 8, ERotationX = 9, ERotationY = 10, ERotationZ = 11,
  ERotationQuat = 12
}
 

Public Member Functions

 AnimationTrack (EType type, size_t nKeyframes=0)
 
 AnimationTrack (EType type, Stream *stream)
 
 AnimationTrack (const AnimationTrack *track)
 Copy constructor. More...
 
void setValue (size_t idx, const ValueType &value)
 Set the value of a certain keyframe. More...
 
const ValueTypegetValue (size_t idx) const
 Return the value of a certain keyframe. More...
 
void reserve (size_t count)
 Reserve space for a certain number of entries. More...
 
void append (Float time, const ValueType &value)
 Append a value. More...
 
AbstractAnimationTrackclone () const
 Clone this instance. More...
 
void prependTransformation (const ValueType &value)
 Prepend a transformation to every entry of this track. More...
 
void appendTransformation (const ValueType &value)
 Append a transformation to every entry of this track. More...
 
void serialize (Stream *stream) const
 Serialize to a binary data stream. More...
 
ValueType eval (Float time) const
 Evaluate the animation track at an arbitrary time value. More...
 
bool sortAndSimplify ()
 Sort all animation tracks and remove unnecessary data (for user-provided input) More...
 
- Public Member Functions inherited from mitsuba::AbstractAnimationTrack
EType getType () const
 Return the type of this track. More...
 
void setTime (size_t idx, Float time)
 Set the time value of a certain keyframe. More...
 
Float getTime (size_t idx) const
 Return the time value of a certain keyframe. More...
 
size_t getSize () const
 Return the number of keyframes. More...
 
virtual const ClassgetClass () const
 Retrieve this object's class. More...
 
- Public Member Functions inherited from Object
 Object ()
 Construct a new object. More...
 
int getRefCount () const
 Return the current reference count. More...
 
void incRef () const
 Increase the reference count of the object by one. More...
 
void decRef (bool autoDeallocate=true) const
 Decrease the reference count of the object and possibly deallocate it. More...
 
virtual std::string toString () const
 Return a human-readable string representation of the object's contents. More...
 

Protected Member Functions

ValueType lerp (size_t idx0, size_t idx1, Float t) const
 Evaluate the animation track using linear interpolation. More...
 
bool isNoOp (const ValueType &value) const
 Is this a "no-op" transformation? More...
 
ValueType concatenateTransformations (const ValueType &value1, const ValueType &value2) const
 Concatenate two transformations. More...
 
void unserialize (Stream *stream, ValueType &value)
 
void serialize (Stream *stream, const ValueType &value) const
 
- Protected Member Functions inherited from mitsuba::AbstractAnimationTrack
 AbstractAnimationTrack (EType type, size_t nKeyframes)
 
virtual ~AbstractAnimationTrack ()
 
- Protected Member Functions inherited from Object
virtual ~Object ()
 Virtual private deconstructor. (Will only be called by ref) More...
 

Additional Inherited Members

- Static Public Member Functions inherited from Object
static void staticInitialization ()
 Initializes the built-in reference count debugger (if enabled) More...
 
static void staticShutdown ()
 Free the memory taken by staticInitialization() More...
 
- Static Public Attributes inherited from mitsuba::AbstractAnimationTrack
static Classm_theClass
 
- Static Public Attributes inherited from Object
static Classm_theClass
 Pointer to the object's class descriptor. More...
 
- Protected Attributes inherited from mitsuba::AbstractAnimationTrack
EType m_type
 
std::vector< Floatm_times
 

Detailed Description

template<typename T>
class mitsuba::AnimationTrack< T >

Parameterizable animation track.

Member Typedef Documentation

template<typename T >
typedef T mitsuba::AnimationTrack< T >::ValueType

Constructor & Destructor Documentation

template<typename T >
mitsuba::AnimationTrack< T >::AnimationTrack ( EType  type,
size_t  nKeyframes = 0 
)
inline
template<typename T >
mitsuba::AnimationTrack< T >::AnimationTrack ( EType  type,
Stream stream 
)
inline
template<typename T >
mitsuba::AnimationTrack< T >::AnimationTrack ( const AnimationTrack< T > *  track)
inline

Copy constructor.

Member Function Documentation

template<typename T >
void mitsuba::AnimationTrack< T >::append ( Float  time,
const ValueType value 
)
inline

Append a value.

template<typename T >
void mitsuba::AnimationTrack< T >::appendTransformation ( const ValueType value)
inline

Append a transformation to every entry of this track.

template<typename T >
AbstractAnimationTrack* mitsuba::AnimationTrack< T >::clone ( ) const
inlinevirtual

Clone this instance.

Implements mitsuba::AbstractAnimationTrack.

template<typename T >
T AnimationTrack< T >::concatenateTransformations ( const ValueType value1,
const ValueType value2 
) const
inlineprotected

Concatenate two transformations.

template<typename T >
ValueType mitsuba::AnimationTrack< T >::eval ( Float  time) const
inline

Evaluate the animation track at an arbitrary time value.

template<typename T >
const ValueType& mitsuba::AnimationTrack< T >::getValue ( size_t  idx) const
inline

Return the value of a certain keyframe.

template<typename T >
bool AnimationTrack< T >::isNoOp ( const ValueType value) const
inlineprotected

Is this a "no-op" transformation?

template<typename T >
T AnimationTrack< T >::lerp ( size_t  idx0,
size_t  idx1,
Float  t 
) const
inlineprotected

Evaluate the animation track using linear interpolation.

template<typename T >
void mitsuba::AnimationTrack< T >::prependTransformation ( const ValueType value)
inline

Prepend a transformation to every entry of this track.

template<typename T >
void mitsuba::AnimationTrack< T >::reserve ( size_t  count)
inline

Reserve space for a certain number of entries.

template<typename T >
void mitsuba::AnimationTrack< T >::serialize ( Stream stream) const
inlinevirtual

Serialize to a binary data stream.

Implements mitsuba::AbstractAnimationTrack.

template<typename T >
void mitsuba::AnimationTrack< T >::serialize ( Stream stream,
const ValueType value 
) const
inlineprotected
template<typename T >
void mitsuba::AnimationTrack< T >::setValue ( size_t  idx,
const ValueType value 
)
inline

Set the value of a certain keyframe.

template<typename T >
bool mitsuba::AnimationTrack< T >::sortAndSimplify ( )
inline

Sort all animation tracks and remove unnecessary data (for user-provided input)

Returns
false if this animation track was deemed to be "trivial" after the cleanup (for instance, it only contains (0,0,0) translation operations)
template<typename T >
void mitsuba::AnimationTrack< T >::unserialize ( Stream stream,
ValueType value 
)
inlineprotected

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