- Cal3D 0.9 API Reference - |
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 int getCoreBoneId(); 00059 bool setCoreBoneId(int coreBoneId); 00060 00061 int getCoreKeyframeCount(); 00062 CalCoreKeyframe* getCoreKeyframe(int idx); 00063 00064 bool addCoreKeyframe(CalCoreKeyframe *pCoreKeyframe); 00065 00066 private: 00067 std::vector<CalCoreKeyframe*>::iterator getUpperBound(float time); 00068 }; 00069 00070 #endif 00071 00072 //****************************************************************************//