00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011 #ifndef CAL_CORESKELETON_H
00012 #define CAL_CORESKELETON_H
00013
00014 #include "cal3d/global.h"
00015 #include "cal3d/refcounted.h"
00016 #include "cal3d/refptr.h"
00017
00018
00019 class CalCoreBone;
00020 class CalCoreModel;
00021
00022
00023 class CAL3D_API CalCoreSkeleton : public cal3d::RefCounted
00024 {
00025 protected:
00026 ~CalCoreSkeleton();
00027
00028 public:
00029 CalCoreSkeleton();
00030
00031 int addCoreBone(CalCoreBone *pCoreBone);
00032 void calculateState();
00033 CalCoreBone* getCoreBone(int coreBoneId);
00034 CalCoreBone* getCoreBone(const std::string& strName);
00035 int getCoreBoneId(const std::string& strName);
00036 bool mapCoreBoneName(int coreBoneId, const std::string& strName);
00037 std::vector<int>& getVectorRootCoreBoneId();
00038 std::vector<CalCoreBone *>& getVectorCoreBone();
00039 void calculateBoundingBoxes(CalCoreModel * pCoreModel);
00040 void scale(float factor);
00041
00042 private:
00043 std::vector<CalCoreBone *> m_vectorCoreBone;
00044 std::map< std::string, int > m_mapCoreBoneNames;
00045 std::vector<int> m_vectorRootCoreBoneId;
00046 };
00047 typedef cal3d::RefPtr<CalCoreSkeleton> CalCoreSkeletonPtr;
00048
00049 #endif
00050
00051