- Cal3D 0.9 API Reference -

Main Page | Class Hierarchy | Alphabetical List | Class List | File List | Class 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 CalCoreMorphAnimation;
    00027 class CalCoreMesh;
    00028 class CalCoreMaterial;
    00029
    00030 //****************************************************************************//
    00031 // Class declaration                                                          //
    00032 //****************************************************************************//
    00033
    00034  /*****************************************************************************/
    00038 class CAL3D_API CalCoreModel
    00039 {
    00040 // member variables
    00041 protected:
    00042   std::string m_strName;
    00043   CalCoreSkeleton *m_pCoreSkeleton;
    00044   std::vector<CalCoreAnimation *> m_vectorCoreAnimation;
    00045   std::vector<CalCoreMorphAnimation *> m_vectorCoreMorphAnimation;
    00046   std::vector<CalCoreMesh *> m_vectorCoreMesh;
    00047   std::vector<CalCoreMaterial *> m_vectorCoreMaterial;
    00048   std::map<int, std::map<int, int> > m_mapmapCoreMaterialThread;
    00049   Cal::UserData m_userData;
    00050   std::map<std::string, int> m_animationHelper;
    00051
    00052 // constructors/destructor
    00053 public:
    00054   CalCoreModel();
    00055   virtual ~CalCoreModel();
    00056
    00057 // member functions
    00058 public:
    00059   int addCoreAnimation(CalCoreAnimation *pCoreAnimation);
    00060   int addCoreMorphAnimation(CalCoreMorphAnimation *pCoreMorphAnimation);
    00061   int addCoreMaterial(CalCoreMaterial *pCoreMaterial);
    00062   int addCoreMesh(CalCoreMesh *pCoreMesh);
    00063   bool create(const std::string& strName);
    00064   bool createCoreMaterialThread(int coreMaterialThreadId);
    00065   void destroy();
    00066   CalCoreAnimation *getCoreAnimation(int coreAnimationId);
    00067   CalCoreMorphAnimation *getCoreMorphAnimation(int coreMorphAnimationId);
    00068   int getCoreAnimationCount();
    00069   int getCoreMorphAnimationCount();
    00070   CalCoreMaterial *getCoreMaterial(int coreMaterialId);
    00071   int getCoreMaterialCount();
    00072   int getCoreMaterialId(int coreMaterialThreadId, int coreMaterialSetId);
    00073   CalCoreMesh *getCoreMesh(int coreMeshId);
    00074   int getCoreMeshCount();
    00075   CalCoreSkeleton *getCoreSkeleton();
    00076   Cal::UserData getUserData();
    00077   int loadCoreAnimation(const std::string& strFilename);
    00078   int loadCoreMaterial(const std::string& strFilename);
    00079   int loadCoreMesh(const std::string& strFilename);
    00080   bool loadCoreSkeleton(const std::string& strFilename);
    00081   bool saveCoreAnimation(const std::string& strFilename, int coreAnimtionId);
    00082   bool saveCoreMaterial(const std::string& strFilename, int coreMaterialId);
    00083   bool saveCoreMesh(const std::string& strFilename, int coreMeshId);
    00084   bool saveCoreSkeleton(const std::string& strFilename);
    00085   bool setCoreMaterialId(int coreMaterialThreadId, int coreMaterialSetId, int coreMaterialId);
    00086   void setCoreSkeleton(CalCoreSkeleton *pCoreSkeleton);
    00087   void setUserData(Cal::UserData userData);
    00088   void addBoneHelper(const std::string& strBoneName, int boneId);
    00089   void addAnimHelper(const std::string& strAnimName, int animId);
    00090   int getBoneId(const std::string& strBoneName);
    00091   int getAnimId(const std::string& strAnimName);
    00092
    00093 };
    00094
    00095 #endif
    00096
    00097 //****************************************************************************//

Generated at Wed Apr 7 16:57:16 2004 by The Cal3D Team with 1.3.6 © 1997-2001 Dimitri van Heesch