| - Cal3D 0.11 API Reference - |
00001 //****************************************************************************// 00002 // model.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_MODEL_H 00012 #define CAL_MODEL_H 00013 00014 00015 #include "cal3d/global.h" 00016 #include "cal3d/vector.h" 00017 00018 00019 class CalCoreModel; 00020 class CalSkeleton; 00021 class CalAbstractMixer; 00022 class CalMixer; 00023 class CalMorphTargetMixer; 00024 class CalPhysique; 00025 class CalSpringSystem; 00026 class CalRenderer; 00027 class CalMesh; 00028 00029 00030 class CAL3D_API CalModel : cal3d::noncopyable 00031 { 00032 public: 00033 CalModel(CalCoreModel *pCoreModel); 00034 ~CalModel(); 00035 00036 bool attachMesh(int coreMeshId); 00037 bool detachMesh(int coreMeshId); 00038 CalCoreModel *getCoreModel(); 00039 const CalCoreModel *getCoreModel() const; 00040 CalMesh *getMesh(int coreMeshId); 00041 const CalMesh *getMesh(int coreMeshId) const; 00042 CalMixer *getMixer(); 00043 const CalMixer *getMixer() const; 00044 const CalAbstractMixer *getAbstractMixer() const; 00045 void setAbstractMixer(CalAbstractMixer *pMixer); 00046 CalMorphTargetMixer *getMorphTargetMixer(); 00047 const CalMorphTargetMixer *getMorphTargetMixer() const; 00048 CalPhysique *getPhysique(); 00049 const CalPhysique *getPhysique() const; 00050 void setPhysique( CalPhysique *physique ); 00051 CalRenderer *getRenderer(); 00052 const CalRenderer *getRenderer() const; 00053 CalSkeleton *getSkeleton(); 00054 const CalSkeleton *getSkeleton() const; 00055 CalSpringSystem *getSpringSystem(); 00056 const CalSpringSystem *getSpringSystem() const; 00057 CalBoundingBox & getBoundingBox(bool precision = false); 00058 const Cal::UserData getUserData() const; 00059 std::vector<CalMesh *>& getVectorMesh(); 00060 void setLodLevel(float lodLevel); 00061 void setMaterialSet(int setId); 00062 void setUserData(Cal::UserData userData); 00063 void update(float deltaTime); 00064 void disableInternalData(); 00065 00066 private: 00067 CalCoreModel *m_pCoreModel; 00068 CalSkeleton *m_pSkeleton; 00069 CalAbstractMixer *m_pMixer; 00070 CalMorphTargetMixer *m_pMorphTargetMixer; 00071 CalPhysique *m_pPhysique; 00072 CalSpringSystem *m_pSpringSystem; 00073 CalRenderer *m_pRenderer; 00074 Cal::UserData m_userData; 00075 std::vector<CalMesh *> m_vectorMesh; 00076 CalBoundingBox m_boundingBox; 00077 }; 00078 00079 #endif 00080 00081 //****************************************************************************//