- 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 class CalCoreSkeleton;
00022 
00023 class CAL3D_API CalCoreAnimation : public cal3d::RefCounted
00024 {
00025 protected:
00026   ~CalCoreAnimation();
00027 
00028 public:
00029   CalCoreAnimation();
00030 
00031   size_t size();
00032   void fillInvalidTranslations( CalCoreSkeleton * skel );
00033   bool addCoreTrack(CalCoreTrack *pCoreTrack);
00034   CalCoreTrack *getCoreTrack(int coreBoneId);
00035   CalCoreTrack * nthCoreTrack( unsigned int );
00036     float getDuration() const;
00037   void setDuration(float duration);
00038   void scale(float factor);
00039   static int getNumCoreAnimations();
00040   void setFilename(const std::string& filename);
00041   const std::string& getFilename(void) const;
00042   void setName(const std::string& name);
00043   const std::string& getName(void) const;
00044 
00045   void registerCallback(CalAnimationCallback *callback, float min_interval);
00046   void removeCallback(CalAnimationCallback *callback);
00047 
00048   unsigned int getTrackCount() const;
00049   std::list<CalCoreTrack *>& getListCoreTrack();
00050     unsigned int getTotalNumberOfKeyframes() const;
00051 
00052   struct CallbackRecord
00053   {
00054     CalAnimationCallback *callback;
00055     float                 min_interval;
00056   };
00057 
00058   std::vector<CallbackRecord>& getCallbackList() { return m_listCallbacks; }
00059 
00060 private:
00061 
00062   std::vector<CallbackRecord> m_listCallbacks;
00063 
00064   float m_duration;
00065   std::list<CalCoreTrack *> m_listCoreTrack;
00066   std::string m_name;
00067   std::string m_filename;
00068 };
00069 
00070 typedef cal3d::RefPtr<CalCoreAnimation> CalCoreAnimationPtr;
00071 
00072 #endif
00073 
00074 //****************************************************************************//

Generated by The Cal3D Team with Doxygen 1.7.3