00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011 #ifndef CAL_COREANIMATION_H
00012 #define CAL_COREANIMATION_H
00013
00014
00015 #include "cal3d/global.h"
00016
00017
00018 class CalCoreTrack;
00019 struct CalAnimationCallback;
00020
00021 class CAL3D_API CalCoreAnimation
00022 {
00023 public:
00024 CalCoreAnimation();
00025 ~CalCoreAnimation();
00026
00027 void addCoreTrack(CalCoreTrack *pCoreTrack);
00028 CalCoreTrack *getCoreTrack(int coreBoneId);
00029 float getDuration();
00030 std::list<CalCoreTrack *>& getListCoreTrack();
00031 void setDuration(float duration);
00032 void scale(float factor);
00033 void setFilename(const std::string& filename);
00034 const std::string& getFilename(void);
00035 void setName(const std::string& name);
00036 const std::string& getName(void);
00037 void incRef();
00038 bool decRef();
00039
00040 void registerCallback(CalAnimationCallback *callback,float min_interval);
00041 void removeCallback(CalAnimationCallback *callback);
00042
00043 struct CallbackRecord
00044 {
00045 CalAnimationCallback *callback;
00046 float min_interval;
00047 };
00048
00049 std::vector<CallbackRecord>& getCallbackList() { return m_listCallbacks; }
00050
00051 private:
00052
00053
00054 std::vector<CallbackRecord> m_listCallbacks;
00055
00056 float m_duration;
00057 std::list<CalCoreTrack *> m_listCoreTrack;
00058 std::string m_name;
00059 std::string m_filename;
00060
00061 int m_referenceCount;
00062 };
00063
00064 #endif
00065
00066