00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011 #ifndef CAL_MODEL_H
00012 #define CAL_MODEL_H
00013
00014
00015
00016
00017
00018 #include "cal3d/global.h"
00019 #include "cal3d/vector.h"
00020
00021
00022
00023
00024
00025
00026 class CalCoreModel;
00027 class CalSkeleton;
00028 class CalAbstractMixer;
00029 class CalMixer;
00030 class CalMorphTargetMixer;
00031 class CalPhysique;
00032 class CalSpringSystem;
00033 class CalRenderer;
00034 class CalMesh;
00035
00036
00037
00038
00039
00040
00044 class CAL3D_API CalModel
00045 {
00046
00047 protected:
00048 CalCoreModel *m_pCoreModel;
00049 CalSkeleton *m_pSkeleton;
00050 CalAbstractMixer *m_pMixer;
00051 CalMorphTargetMixer *m_pMorphTargetMixer;
00052 CalPhysique *m_pPhysique;
00053 CalSpringSystem *m_pSpringSystem;
00054 CalRenderer *m_pRenderer;
00055 Cal::UserData m_userData;
00056 std::vector<CalMesh *> m_vectorMesh;
00057 CalBoundingBox m_boundingBox;
00058
00059
00060 public:
00061 CalModel();
00062 virtual ~CalModel();
00063
00064
00065 public:
00066 bool attachMesh(int coreMeshId);
00067 bool create(CalCoreModel *pCoreModel);
00068 void destroy();
00069 bool detachMesh(int coreMeshId);
00070 CalCoreModel *getCoreModel() const;
00071 CalMesh *getMesh(int coreMeshId) const;
00072 CalMixer *getMixer() const;
00073 CalAbstractMixer *getAbstractMixer() const;
00074 void setAbstractMixer(CalAbstractMixer* pMixer);
00075 CalMorphTargetMixer *getMorphTargetMixer() const;
00076 CalPhysique *getPhysique() const;
00077 CalRenderer *getRenderer() const;
00078 CalSkeleton *getSkeleton() const;
00079 CalSpringSystem *getSpringSystem() const;
00080 CalBoundingBox & getBoundingBox(bool precision = false);
00081 Cal::UserData getUserData() const;
00082 std::vector<CalMesh *>& getVectorMesh();
00083 void setLodLevel(float lodLevel);
00084 void setMaterialSet(int setId);
00085 void setUserData(Cal::UserData userData);
00086 void update(float deltaTime);
00087 void disableInternalData();
00088 };
00089
00090 #endif
00091
00092