00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011 #ifndef CAL_SKELETON_H
00012 #define CAL_SKELETON_H
00013
00014 #include "cal3d/global.h"
00015
00016 class CalCoreSkeleton;
00017 class CalCoreModel;
00018 class CalBone;
00019
00020 class CAL3D_API CalSkeleton
00021 {
00022 public:
00023 CalSkeleton(CalCoreSkeleton *pCoreSkeleton);
00024 ~CalSkeleton();
00025
00026 void calculateState();
00027 void clearState();
00028 bool create(CalCoreSkeleton *pCoreSkeleton);
00029 CalBone *getBone(int boneId);
00030 const CalBone *getBone(int boneId) const;
00031 CalCoreSkeleton *getCoreSkeleton();
00032 const CalCoreSkeleton *getCoreSkeleton() const;
00033 std::vector<CalBone *>& getVectorBone();
00034 const std::vector<CalBone *>& getVectorBone() const;
00035 void lockState();
00036 void getBoneBoundingBox(float *min, float *max);
00037 void calculateBoundingBoxes();
00038
00039
00040 int getBonePoints(float *pPoints) const;
00041 int getBonePointsStatic(float *pPoints) const;
00042 int getBoneLines(float *pLines) const;
00043 int getBoneLinesStatic(float *pLines) const;
00044
00045 private:
00046 CalCoreSkeleton *m_pCoreSkeleton;
00047 std::vector<CalBone *> m_vectorBone;
00048 bool m_isBoundingBoxesComputed;
00049 };
00050
00051 #endif
00052
00053