Main Page | Modules | Namespace List | Class Hierarchy | Alphabetical List | Class List | Directories | File List | Namespace Members | Class Members | File Members | Related Pages

nvsg::InterpolatedAnimation< T > Class Template Reference

Base class for an interpolating Animation. More...

#include <InterpolatedAnimation.h>

Inheritance diagram for nvsg::InterpolatedAnimation< T >:

Inheritance graph
[legend]
Collaboration diagram for nvsg::InterpolatedAnimation< T >:

Collaboration graph
[legend]
List of all members.

Public Member Functions

virtual size_t getNumberOfFrames (void) const
 Get the number of frames in the animation.
size_t getNumberOfKeys (void) const
 Get the number of key frames in the animation.
void setNumberOfKeys (size_t count)
 Set the number of key frames in the animation.
void setKeyFrame (size_t key, unsigned int frame, const T &value)
 Set the frame and value of key key.
unsigned int getCurrentFrame (void) const
 Get the index of the current frame.
const T & getCurrentValue (void) const
 Get the value at the current frame.
unsigned int getFrame (size_t key) const
 Get the index of key frame key.
const T & getValue (size_t key) const
 Get the value on key key.
size_t getKey (unsigned int frame) const
 Get the key above or equal to frame frame.

Protected Member Functions

 InterpolatedAnimation (void)
 Default Constructor.
 InterpolatedAnimation (const InterpolatedAnimation &rhs)
 Copy Constructor.
virtual ~InterpolatedAnimation (void)
 Protected destructor to prevent explicit creation on stack.
void setCurrent (size_t key) const
 Set the current frame and value on key.
void setCurrent (unsigned int frame, const T &value) const
 Set the current frame and value.

Detailed Description

template<typename T>
class nvsg::InterpolatedAnimation< T >

Base class for an interpolating Animation.

An InterpolatedAnimation holds the information for a key-frame based animation. It provides the interface needed for an interpolated animation, but does not perform any interpolations. Interpolations must be performed by a class that is derived from this, such as LinearInterpolatedAnimation.


Constructor & Destructor Documentation

template<typename T>
nvsg::InterpolatedAnimation< T >::InterpolatedAnimation void   )  [inline, protected]
 

Default Constructor.

template<typename T>
nvsg::InterpolatedAnimation< T >::InterpolatedAnimation const InterpolatedAnimation< T > &  rhs  )  [inline, protected]
 

Copy Constructor.

Parameters:
rhs  InterpolatedAnimation to copy

template<typename T>
nvsg::InterpolatedAnimation< T >::~InterpolatedAnimation void   )  [inline, protected, virtual]
 

Protected destructor to prevent explicit creation on stack.


Member Function Documentation

template<typename T>
size_t nvsg::InterpolatedAnimation< T >::getNumberOfFrames void   )  const [inline, virtual]
 

Get the number of frames in the animation.

Returns:
number of animation frames

Implements nvsg::Animation< T >.

template<typename T>
size_t nvsg::InterpolatedAnimation< T >::getNumberOfKeys void   )  const [inline]
 

Get the number of key frames in the animation.

Returns:
The number of animation key frames

template<typename T>
void nvsg::InterpolatedAnimation< T >::setNumberOfKeys size_t  count  )  [inline]
 

Set the number of key frames in the animation.

Resizes the array of key animation values. On growing this array, the new elements are not initialized.

Parameters:
count  number of keys

template<typename T>
void nvsg::InterpolatedAnimation< T >::setKeyFrame size_t  key,
unsigned int  frame,
const T &  value
[inline]
 

Set the frame and value of key key.

Note:
There is no non-constant operator[] for an InterpolatedAnimation!
Parameters:
key  index of the key frame to set (not the frame index!)
frame  frame index to set
value  frame value to set

template<typename T>
unsigned int nvsg::InterpolatedAnimation< T >::getCurrentFrame void   )  const [inline]
 

Get the index of the current frame.

Returns:
The index of the current frame.

template<typename T>
const T & nvsg::InterpolatedAnimation< T >::getCurrentValue void   )  const [inline]
 

Get the value at the current frame.

Returns:
The value of the current frame.

template<typename T>
unsigned int nvsg::InterpolatedAnimation< T >::getFrame size_t  key  )  const [inline]
 

Get the index of key frame key.

Returns:
The frame index at the key th keyframe.

template<typename T>
const T & nvsg::InterpolatedAnimation< T >::getValue size_t  key  )  const [inline]
 

Get the value on key key.

Returns:
The frame value at the key th keyframe.

template<typename T>
size_t nvsg::InterpolatedAnimation< T >::getKey unsigned int  frame  )  const [inline]
 

Get the key above or equal to frame frame.

Returns:
The key index above or equal to the frame index frame.

template<typename T>
void nvsg::InterpolatedAnimation< T >::setCurrent size_t  key  )  const [inline, protected]
 

Set the current frame and value on key.

template<typename T>
void nvsg::InterpolatedAnimation< T >::setCurrent unsigned int  frame,
const T &  value
const [inline, protected]
 

Set the current frame and value.


The documentation for this class was generated from the following file:
Generated on Tue Mar 1 13:20:48 2005 for NVSGSDK by NVIDIA