|
bool | CheckIsAnimated () |
| check if all key are equal
|
|
void | SetConstantKey (T key) |
| if all animated values equals to the key, this animation will be set unused
|
|
void | SetConstantKey (T key, float fEpsilon) |
| if all animated values are very close to a given key, this animation will be set unused
|
|
T | getValue (int anim, int time) |
| this function will return the interpolated animation vector at the specified anim id and frame number More...
|
|
T | getDefaultValue () |
|
T | getValue (int nCurrentAnim, int currentFrame, int nBlendingAnim, int blendingFrame, float blendingFactor) |
| get value with motion blending with a specified blending frame. More...
|
|
T | getValue (const AnimIndex &Index) |
| it accept anim index of both local and external animation
|
|
T | getValue (const AnimIndex &CurrentAnim, const AnimIndex &BlendingAnim, float blendingFactor) |
| it accept anim index of both local and external animation
|
|
void | SetRangeByAnimIndex (int nAnimIndex, const AnimRange &range) |
|
void | AppendKey (int time_, const T &data_) |
|
void | UpdateLastKey (int time_, const T &data_) |
|
int | GetKeyNum () |
|
void | CompressKeyLinear (float fEpsilon) |
| if multiple adjacent keys can be linearly interpolated and get an error smaller than fEpsilon, those keys will be collapsed to save space Note: this function only works when there is only one animation range. More...
|
|
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 nTime) |
| 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...
|
|
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) |
|
template<class T, class D = T, class Conv = Identity<T>>
this function will return the interpolated animation vector at the specified anim id and frame number
global animation has nothing to do the current animation. Such animation may be the blinking of eyes and some effects which always loops regardless of the current animation.
it is also a global animation, however, range[0] is used instead of globals
get the range according to the current animation.
by LiXizhi: use binary search for the time frame: 2005/09:
modify the brutal force search by binary search and use interpolation.
- location = -1;
- while ((more than one item in list)) 2A. look at the middle item 2B. if (middle item is target) have found target return location as the result else 2C. if (target < middle item) list = first half of list 2D. else (target > middle item) list = last half of list end while