- Cal3D 0.9 API Reference -

Main Page   Class Hierarchy   Alphabetical List   Compound List   File List   Compound Members   Related Pages  

coremodel.h

00001 //****************************************************************************//
00002 // coremodel.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_COREMODEL_H
00012 #define CAL_COREMODEL_H
00013 
00014 //****************************************************************************//
00015 // Includes                                                                   //
00016 //****************************************************************************//
00017 
00018 #include "cal3d/global.h"
00019 
00020 //****************************************************************************//
00021 // Forward declarations                                                       //
00022 //****************************************************************************//
00023 
00024 class CalCoreSkeleton;
00025 class CalCoreAnimation;
00026 class CalCoreMesh;
00027 class CalCoreMaterial;
00028 
00029 //****************************************************************************//
00030 // Class declaration                                                          //
00031 //****************************************************************************//
00032 
00033  /*****************************************************************************/
00037 class CAL3D_API CalCoreModel
00038 {
00039 // member variables
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 // constructors/destructor
00051 public:
00052   CalCoreModel();
00053   virtual ~CalCoreModel();
00054 
00055 // member functions
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 //****************************************************************************//

Generated at Sun Oct 12 18:38:47 2003 by The Cal3D Team with doxygen 1.2.14 © 1997-2001 Dimitri van Heesch