00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011 #ifndef CAL_COREMODEL_H
00012 #define CAL_COREMODEL_H
00013
00014
00015
00016
00017
00018 #include "cal3d/global.h"
00019
00020
00021
00022
00023
00024 class CalCoreSkeleton;
00025 class CalCoreAnimation;
00026 class CalCoreMesh;
00027 class CalCoreMaterial;
00028
00029
00030
00031
00032
00033
00037 class CAL3D_API CalCoreModel
00038 {
00039
00040 protected:
00041 std::string m_strName;
00042 CalCoreSkeleton *m_pCoreSkeleton;
00043 std::vector<CalCoreAnimation *> m_vectorCoreAnimation;
00044 std::vector<CalCoreMesh *> m_vectorCoreMesh;
00045 std::vector<CalCoreMaterial *> m_vectorCoreMaterial;
00046 std::map<int, std::map<int, int> > m_mapmapCoreMaterialThread;
00047 Cal::UserData m_userData;
00048 std::map<std::string, int> m_animationHelper;
00049
00050
00051 public:
00052 CalCoreModel();
00053 virtual ~CalCoreModel();
00054
00055
00056 public:
00057 int addCoreAnimation(CalCoreAnimation *pCoreAnimation);
00058 int addCoreMaterial(CalCoreMaterial *pCoreMaterial);
00059 int addCoreMesh(CalCoreMesh *pCoreMesh);
00060 bool create(const std::string& strName);
00061 bool createCoreMaterialThread(int coreMaterialThreadId);
00062 void destroy();
00063 CalCoreAnimation *getCoreAnimation(int coreAnimationId);
00064 int getCoreAnimationCount();
00065 CalCoreMaterial *getCoreMaterial(int coreMaterialId);
00066 int getCoreMaterialCount();
00067 int getCoreMaterialId(int coreMaterialThreadId, int coreMaterialSetId);
00068 CalCoreMesh *getCoreMesh(int coreMeshId);
00069 int getCoreMeshCount();
00070 CalCoreSkeleton *getCoreSkeleton();
00071 Cal::UserData getUserData();
00072 int loadCoreAnimation(const std::string& strFilename);
00073 int loadCoreMaterial(const std::string& strFilename);
00074 int loadCoreMesh(const std::string& strFilename);
00075 bool loadCoreSkeleton(const std::string& strFilename);
00076 bool saveCoreAnimation(const std::string& strFilename, int coreAnimtionId);
00077 bool saveCoreMaterial(const std::string& strFilename, int coreMaterialId);
00078 bool saveCoreMesh(const std::string& strFilename, int coreMeshId);
00079 bool saveCoreSkeleton(const std::string& strFilename);
00080 bool setCoreMaterialId(int coreMaterialThreadId, int coreMaterialSetId, int coreMaterialId);
00081 void setCoreSkeleton(CalCoreSkeleton *pCoreSkeleton);
00082 void setUserData(Cal::UserData userData);
00083 void addBoneHelper(const std::string& strBoneName, int boneId);
00084 void addAnimHelper(const std::string& strAnimName, int animId);
00085 int getBoneId(const std::string& strBoneName);
00086 int getAnimId(const std::string& strAnimName);
00087
00088 };
00089
00090 #endif
00091
00092