![]() |
Polygon Crucher SDK - Documentation
Documentation
|
This is the base class for any object that can be animated using C3DKeyframe. More...
This is the base class for any object that can be animated using C3DKeyframe.
The C3DSceneNode derived from this class and handles KEYFRAME_MATRIX, KEYFRAME_SCALE, KEYFRAME_ROT, KEYFRAME_TRANS keyframes. It is possible to add / remove keyframe of any kind and to evaluate the interpolation of 2 keyframes
#include <3DAnimatable.h>
Public Types | |
enum | TimeStamp { INVALID_TIME = -1 } |
enum | KeyframeFlags { KEYFRAME_NONE = 0x00 , KEYFRAME_REPLACE_KEY = 0x01 , KEYFRAME_DONT_EVALUATE = 0x02 } |
typedef enum C3DKeyframable::TimeStamp | TimeStamp |
![]() | |
enum | FindKey { KEYFRAME_PREV = 0x01 , KEYFRAME_NEXT = 0x02 , KEYFRAME_SAME = 0x04 } |
Public Member Functions | |
int | AddKey (int time, C3DKeyframe *newkey) |
Return -1 if fails or keyframe number. | |
int | AddKey (int time, const C3DKeyframe &newkey) |
Return keyframe number. | |
int | DeleteKey (int time, longuint classid=KEYFRAME_NULLID) |
If time = INVALID_TIME, then all key of classid are deleted or all keys are deleted if classid = KEYFRAME_NULLID. | |
void | DeleteAllKeys () |
C3DKeyframe * | CreateKey (int time, longuint classid, unsigned int flags=KEYFRAME_NONE) |
Create key of the given classid. flags is one or more KeyframeFlags. | |
C3DKeyframe * | GetKeyByIndex (unsigned int index, int *time=NULL, longuint classid=KEYFRAME_NULLID) |
This invalidate the cache, and can lead to slower computation. | |
const C3DKeyframe * | GetConstKeyByIndex (unsigned int index, int *time=NULL, longuint classid=KEYFRAME_NULLID) const |
int | GetKeyNbr (longuint classid=KEYFRAME_NULLID) const |
bool | Evaluate (int time, C3DKeyframe &findkey) const |
This method evaluate the key at the given time. Same but slower that the following method that return a pointer. | |
const C3DKeyframe * | Evaluate (int time, longuint classid) const |
This method evaluate the key at the given time. This is the fastest method. The key content cannot be changed. | |
int | CopyKeys (const C3DKeyframable *srckeys, longuint classid=KEYFRAME_NULLID, CTimeRange range=CTimeRange(0, CTimeRange::MAX_TIME)) |
Copy key of the given classid in the given time range. | |
bool | operator== (const C3DKeyframable &refkeys) const |
bool | operator= (const C3DKeyframable &key) |
virtual void | Serialize (CXArchive &ar) |
virtual void | OnKeyframesChanged (longuint classID) const |
virtual CTimeRange | GetTimeRange (longuint classid=KEYFRAME_NULLID) const |
virtual const C3DKeyframe * | GetConstKey (int time, unsigned int findKeyFlag, longuint classid=KEYFRAME_NULLID, int *findKeyTime=NULL) const |
Retrieve a keyframe at / before or after the specified time depending on findKeyFlag. | |
![]() | |
int | GetKeyTime (int time, unsigned int pos, longuint classid=KEYFRAME_NULLID) |
|
virtual |
Retrieve a keyframe at / before or after the specified time depending on findKeyFlag.
Implements C3DAnimatable.
|
virtual |
Implements C3DAnimatable.