My Project
Public Member Functions | List of all members
ParaEngine::AnimatedVariable< T, Conv > Class Template Reference

key, value pairs More...

#include <IAnimated.h>

Inheritance diagram for ParaEngine::AnimatedVariable< T, Conv >:
ParaEngine::IAnimated

Public Member Functions

virtual bool GetValueByTime (int time, T &val)
 this function will return the interpolated animation vector frame number internally use binary search algorithm
 
virtual bool GetValue (int nIndex, T &val)
 
virtual void SetValue (int nIndex, const T &val)
 
virtual int GetNumKeys ()
 get total number of animated keys. More...
 
virtual void SetNumKeys (int nKeyCount)
 get set the total number of animated keys. More...
 
virtual void SetTime (int nIndex, int nTime)
 only applied to Animated attribute More...
 
virtual int GetTime (int nIndex)
 
virtual int GetNextKeyIndex (int time)
 return the index of the first key whose time is larger than or equal to time. More...
 
virtual int AddKey (int time, bool *isKeyExist=NULL)
 add a given key with default value at specified time if there is already a key at the index, we will return the old index. More...
 
- Public Member Functions inherited from ParaEngine::IAnimated
virtual void SetValue (int nIndex, const Quaternion &val)
 
virtual bool GetValue (int nIndex, Quaternion &val)
 
virtual bool GetValueByTime (int nTime, Quaternion &val)
 
virtual void SetValue (int nIndex, const Vector2 &val)
 
virtual bool GetValue (int nIndex, Vector2 &val)
 
virtual bool GetValueByTime (int nTime, Vector2 &val)
 
virtual void SetValue (int nIndex, const Vector3 &val)
 
virtual bool GetValue (int nIndex, Vector3 &val)
 
virtual bool GetValueByTime (int nTime, Vector3 &val)
 
virtual void SetValue (int nIndex, const double &val)
 
virtual bool GetValue (int nIndex, double &val)
 
virtual bool GetValueByTime (int nTime, double &val)
 
virtual void SetValue (int nIndex, const float &val)
 
virtual bool GetValue (int nIndex, float &val)
 
virtual bool GetValueByTime (int nTime, float &val)
 
virtual void SetValue (int nIndex, const int &val)
 
virtual bool GetValue (int nIndex, int &val)
 
virtual bool GetValueByTime (int nTime, int &val)
 
virtual void SetValue (int nIndex, const std::string &val)
 
virtual bool GetValue (int nIndex, std::string &val)
 
virtual bool GetValueByTime (int nTime, std::string &val)
 

Detailed Description

template<class T, class Conv = Identity<T>>
class ParaEngine::AnimatedVariable< T, Conv >

key, value pairs

Member Function Documentation

§ AddKey()

template<class T , class Conv = Identity<T>>
virtual int ParaEngine::AnimatedVariable< T, Conv >::AddKey ( int  time,
bool *  isKeyExist = NULL 
)
inlinevirtual

add a given key with default value at specified time if there is already a key at the index, we will return the old index.

return the key index.

Parameters
isKeyExistif not NULL, it will return whether the given key already exist at the index.

Reimplemented from ParaEngine::IAnimated.

§ GetNextKeyIndex()

template<class T , class Conv = Identity<T>>
virtual int ParaEngine::AnimatedVariable< T, Conv >::GetNextKeyIndex ( int  nTime)
inlinevirtual

return the index of the first key whose time is larger than or equal to time.

return -1 if no suitable index is found.

Reimplemented from ParaEngine::IAnimated.

§ GetNumKeys()

template<class T , class Conv = Identity<T>>
virtual int ParaEngine::AnimatedVariable< T, Conv >::GetNumKeys ( )
inlinevirtual

get total number of animated keys.

For non-animated attribute, this will return 1.

Reimplemented from ParaEngine::IAnimated.

§ SetNumKeys()

template<class T , class Conv = Identity<T>>
virtual void ParaEngine::AnimatedVariable< T, Conv >::SetNumKeys ( int  nKeyCount)
inlinevirtual

get set the total number of animated keys.

Reimplemented from ParaEngine::IAnimated.

§ SetTime()

template<class T , class Conv = Identity<T>>
virtual void ParaEngine::AnimatedVariable< T, Conv >::SetTime ( int  nIndex,
int  nTime 
)
inlinevirtual

only applied to Animated attribute

Parameters
nIndexkey index.
nTimein milliseconds

Reimplemented from ParaEngine::IAnimated.


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