- Cal3D 0.9 API Reference - |
00001 //****************************************************************************// 00002 // coreskeleton.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_CORESKELETON_H 00012 #define CAL_CORESKELETON_H 00013 00014 //****************************************************************************// 00015 // Includes // 00016 //****************************************************************************// 00017 00018 #include "cal3d/global.h" 00019 00020 //****************************************************************************// 00021 // Forward declarations // 00022 //****************************************************************************// 00023 00024 class CalCoreBone; 00025 class CalCoreModel; 00026 00027 //****************************************************************************// 00028 // Class declaration // 00029 //****************************************************************************// 00030 00031 /*****************************************************************************/ 00035 class CAL3D_API CalCoreSkeleton 00036 { 00037 // member variables 00038 protected: 00039 std::vector<CalCoreBone *> m_vectorCoreBone; 00040 std::map< std::string, int > m_mapCoreBoneNames; 00041 std::list<int> m_listRootCoreBoneId; 00042 00043 // constructors/destructor 00044 public: 00045 CalCoreSkeleton(); 00046 virtual ~CalCoreSkeleton(); 00047 00048 // member functions 00049 public: 00050 int addCoreBone(CalCoreBone *pCoreBone); 00051 void calculateState(); 00052 bool create(); 00053 void destroy(); 00054 CalCoreBone* getCoreBone(int coreBoneId); 00055 CalCoreBone* getCoreBone(const std::string& strName); 00056 int getCoreBoneId(const std::string& strName); 00057 bool mapCoreBoneName(int coreBoneId, const std::string& strName); 00058 std::list<int>& getListRootCoreBoneId(); 00059 std::vector<CalCoreBone *>& getVectorCoreBone(); 00060 void calculateBoundingBox(CalCoreModel * pCoreModel); 00061 00062 }; 00063 00064 #endif 00065 00066 //****************************************************************************//