My Project
|
Generic movie key frame class: T is the data type stored in the key frame. More...
#include <KeyFrame.h>
Public Member Functions | |
void | Clear () |
void | AppendNewKey (float fTime, const T &key) |
append a new key to the end of the key frame list | |
void | InsertNewKey (float fTime, const T &key) |
NOT TESTED: Insert a new key to the key frame list according to the time. More... | |
float | GetEndingTime () |
get the ending time | |
void | UpdateKeyFrame (int nIndex, float fTime, const T &key) |
update a key frame value is boundary safe. More... | |
void | PopKeyFrame (int nNum) |
pop a specified number of key frames from the end of the key frames More... | |
T & | operator[] (int nIndex) |
indexer | |
float | time (int nIndex) |
get the time. More... | |
int | GetPos () |
get the current position. More... | |
void | SetPos (int nPos) |
set the current position. More... | |
int | GetSize () |
Get the number of key frames. More... | |
T & | GetRelative (int nShiftPos=0) |
get the data at current position + nShiftPos. More... | |
int | GetKeyIndexByTime (float fTime) |
NOT TESTED: get the index nPos of the key frame, where time[nPos-1]<=fTime<time[nPos] a binary search is used internally. More... | |
int | UpdateTime (float &fTimeElapsed) |
update the current time position by a given time in seconds.the current time position may not be the same as the given value in case a rewinding occurs. More... | |
int | TrimToTime (float fTimeElapsed) |
trim the key frames to the specified time. More... | |
Generic movie key frame class: T is the data type stored in the key frame.
|
inline |
NOT TESTED: get the index nPos of the key frame, where time[nPos-1]<=fTime<time[nPos] a binary search is used internally.
if there is no key frame found. -1 is returned please note that times.size() may be returned in case the time is larger than all key times in the list
|
inline |
get the current position.
value is not boundary safe
|
inline |
get the data at current position + nShiftPos.
value is boundary safe. but there should be at least one element.
nShiftPos | the shift position. default value is 0. which is the current one |
|
inline |
Get the number of key frames.
|
inline |
NOT TESTED: Insert a new key to the key frame list according to the time.
fTime | time at which to insert the key, |
key | the key to be inserted. |
|
inline |
pop a specified number of key frames from the end of the key frames
nNum | the number of key frames to remove. |
|
inline |
set the current position.
value is not boundary safe
|
inline |
get the time.
value is boundary safe. but there should be at least one element.
|
inline |
trim the key frames to the specified time.
All key frames after the input time will be removed. This function is safe when the key frames are empty.
|
inline |
update a key frame value is boundary safe.
but there should be at least one element.
nIndex | the index of the key frame to update |
fTime | the time |
key | the key |
|
inline |
update the current time position by a given time in seconds.the current time position may not be the same as the given value in case a rewinding occurs.
in such case, the input contains the actual time set. value is not boundary safe.This function is safe when the key frames are empty.
fTimeElapsed | [in|out] time in seconds. the elapsed time might be reset by this function in case that a rewind occurs. |