- Cal3D 0.11 API Reference -

coremorphtrack.h

00001 //****************************************************************************//
00002 // coreMorphTrack.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_COREMORPHTRACK_H
00012 #define CAL_COREMORPHTRACK_H
00013 
00014 //****************************************************************************//
00015 // Includes                                                                   //
00016 //****************************************************************************//
00017 
00018 #include "cal3d/global.h"
00019 #include "cal3d/matrix.h"
00020 #include "cal3d/vector.h"
00021 #include "cal3d/quaternion.h"
00022 #include "cal3d/coremorphkeyframe.h"
00023 
00024 //****************************************************************************//
00025 // Forward declarations                                                       //
00026 //****************************************************************************//
00027 
00028 class CalCoreMorphKeyframe;
00029 
00030 //****************************************************************************//
00031 // Class declaration                                                          //
00032 //****************************************************************************//
00033 
00034 //*****************************************************************************/
00035 //** The core track class.
00036 //*****************************************************************************/
00037 
00038 class CAL3D_API CalCoreMorphTrack
00039 {
00040 // member variables
00041 protected:
00042 
00043   std::string m_morphName;
00044 
00046   std::vector<CalCoreMorphKeyframe> m_keyframes;
00047   std::vector<CalCoreMorphKeyframe*> m_keyframesToDelete;
00048 
00049 // constructors/destructor
00050 public:
00051   CalCoreMorphTrack();
00052   virtual ~CalCoreMorphTrack();
00053 
00054   bool create();
00055   void destroy();
00056 
00057   bool getState(float time, float & weightOut);
00058 
00059   std::string getMorphName() const;
00060   void setMorphName(std::string name);
00061   
00062   int getCoreMorphKeyframeCount() const;
00063   void reserve(int);
00064   
00065   CalCoreMorphKeyframe* getCoreMorphKeyframe(int idx);
00066   const CalCoreMorphKeyframe* getCoreMorphKeyframe(int idx) const;
00067 
00068   bool addCoreMorphKeyframe(CalCoreMorphKeyframe *pCoreKeyframe);
00069   
00070   const std::vector<CalCoreMorphKeyframe> & getVectorCoreMorphKeyframes() const;
00071   std::vector<CalCoreMorphKeyframe> & getVectorCoreMorphKeyframes();
00072 
00073   void scale(float factor);
00074 
00075 private:
00076   std::vector<CalCoreMorphKeyframe>::iterator getUpperBound(float time);
00077 };
00078 
00079 #endif
00080 
00081 //****************************************************************************//

Generated by The Cal3D Team with Doxygen 1.7.3