- Cal3D 0.11 API Reference -

coreanimation.h

00001 //****************************************************************************//
00002 // coreanimation.h                                                            //
00003 // Copyright (C) 2001, 2002 Bruno 'Beosil' Heidelberger                       //
00004 //****************************************************************************//
00005 // This library is free software; you can redistribute it and/or modify it    //
00006 // under the terms of the GNU Lesser General Public License as published by   //
00007 // the Free Software Foundation; either version 2.1 of the License, or (at    //
00008 // your option) any later version.                                            //
00009 //****************************************************************************//
00010 
00011 #ifndef CAL_COREANIMATION_H
00012 #define CAL_COREANIMATION_H
00013 
00014 #include "cal3d/global.h"
00015 #include "cal3d/quaternion.h"
00016 #include "cal3d/refcounted.h"
00017 #include "cal3d/refptr.h"
00018 
00019 struct CalAnimationCallback;
00020 class CalCoreTrack;
00021 
00022 class CAL3D_API CalCoreAnimation : public cal3d::RefCounted
00023 {
00024 protected:
00025   ~CalCoreAnimation();
00026 
00027 public:
00028   CalCoreAnimation();
00029 
00030   bool addCoreTrack(CalCoreTrack *pCoreTrack);
00031   CalCoreTrack *getCoreTrack(int coreBoneId);
00032 
00033     float getDuration() const;
00034   void setDuration(float duration);
00035   void scale(float factor);
00036   void setFilename(const std::string& filename);
00037   const std::string& getFilename(void) const;
00038   void setName(const std::string& name);
00039   const std::string& getName(void) const;
00040 
00041   void registerCallback(CalAnimationCallback *callback,float min_interval);
00042   void removeCallback(CalAnimationCallback *callback);
00043 
00044   unsigned int getTrackCount() const;
00045   std::list<CalCoreTrack *>& getListCoreTrack();
00046     unsigned int getTotalNumberOfKeyframes() const;
00047 
00048   struct CallbackRecord
00049   {
00050     CalAnimationCallback *callback;
00051     float                 min_interval;
00052   };
00053 
00054   std::vector<CallbackRecord>& getCallbackList() { return m_listCallbacks; }
00055 
00056 private:
00057 
00058   std::vector<CallbackRecord> m_listCallbacks;
00059 
00060   float m_duration;
00061   std::list<CalCoreTrack *> m_listCoreTrack;
00062   std::string m_name;
00063   std::string m_filename;
00064 };
00065 
00066 typedef cal3d::RefPtr<CalCoreAnimation> CalCoreAnimationPtr;
00067 
00068 #endif
00069 
00070 //****************************************************************************//

Generated at Thu Jun 29 19:03:59 2006 by The Cal3D Team with Doxygen 1.4.6