- Cal3D 0.9 API Reference -

Main Page | Class Hierarchy | Alphabetical List | Class List | File List | Class Members | Related Pages

coretrack.h

00001 //****************************************************************************//
00002 // coretrack.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_CORETRACK_H
00012 #define CAL_CORETRACK_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 
00023 //****************************************************************************//
00024 // Forward declarations                                                       //
00025 //****************************************************************************//
00026 
00027 class CalCoreBone;
00028 class CalCoreKeyframe;
00029 
00030 //****************************************************************************//
00031 // Class declaration                                                          //
00032 //****************************************************************************//
00033 
00034 //*****************************************************************************/
00035 //** The core track class.
00036 //*****************************************************************************/
00037 
00038 class CAL3D_API CalCoreTrack
00039 {
00040 // member variables
00041 protected:
00043   int m_coreBoneId;
00044 
00046   std::vector<CalCoreKeyframe*> m_keyframes;
00047 
00048 // constructors/destructor
00049 public:
00050   CalCoreTrack();
00051   virtual ~CalCoreTrack();
00052 
00053   bool create();
00054   void destroy();
00055 
00056   bool getState(float time, CalVector& translation, CalQuaternion& rotation);
00057 
00058   /*****************************************************************************/
00068   inline int getCoreBoneId()
00069   {
00070       return m_coreBoneId;
00071   }
00072 
00073   bool setCoreBoneId(int coreBoneId);
00074   
00075   int getCoreKeyframeCount();
00076   CalCoreKeyframe* getCoreKeyframe(int idx);
00077 
00078   bool addCoreKeyframe(CalCoreKeyframe *pCoreKeyframe);
00079 
00080   void scale(float factor);
00081 
00082 private:
00083   std::vector<CalCoreKeyframe*>::iterator getUpperBound(float time);
00084 };
00085 
00086 #endif
00087 
00088 //****************************************************************************//

Generated at Fri Nov 19 03:49:19 2004 by The Cal3D Team with doxygen 1.3.9.1 © 1997-2001 Dimitri van Heesch