- Cal3D 0.9 API Reference -

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

loader.h

00001 //****************************************************************************//
00002 // loader.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_LOADER_H
00012 #define CAL_LOADER_H
00013 
00014 //****************************************************************************//
00015 // Includes                                                                   //
00016 //****************************************************************************//
00017 
00018 
00019 #include <string>
00020 #include <istream>
00021 #include "cal3d/global.h"
00022 #include "cal3d/datasource.h"
00023 
00024 //****************************************************************************//
00025 // Forward declarations                                                       //
00026 //****************************************************************************//
00027 
00028 class CalCoreModel;
00029 class CalCoreSkeleton;
00030 class CalCoreBone;
00031 class CalCoreAnimation;
00032 class CalCoreTrack;
00033 class CalCoreKeyframe;
00034 class CalCoreMesh;
00035 class CalCoreSubmesh;
00036 class CalCoreMaterial;
00037 
00038 enum
00039 {
00040     LOADER_ROTATE_X_AXIS = 1,
00041     LOADER_INVERT_V_COORD = 2
00042 };
00043 
00044 //****************************************************************************//
00045 // Class declaration                                                          //
00046 //****************************************************************************//
00047 
00048  /*****************************************************************************/
00052 class CAL3D_API CalLoader
00053 {
00054 // member functions
00055 public:
00056   static CalCoreAnimation *loadCoreAnimation(const std::string& strFilename, CalCoreSkeleton *skel=NULL);
00057   static CalCoreMaterial *loadCoreMaterial(const std::string& strFilename);
00058   static CalCoreMesh *loadCoreMesh(const std::string& strFilename);
00059   static CalCoreSkeleton *loadCoreSkeleton(const std::string& strFilename);
00060 
00061   static CalCoreAnimation *loadCoreAnimation(std::istream& inputStream, CalCoreSkeleton *skel=NULL);
00062   static CalCoreMaterial *loadCoreMaterial(std::istream& inputStream);
00063   static CalCoreMesh *loadCoreMesh(std::istream& inputStream);
00064   static CalCoreSkeleton *loadCoreSkeleton(std::istream& inputStream);
00065 
00066   static CalCoreAnimation *loadCoreAnimation(void* inputBuffer, CalCoreSkeleton *skel=NULL);
00067   static CalCoreMaterial *loadCoreMaterial(void* inputBuffer);
00068   static CalCoreMesh *loadCoreMesh(void* inputBuffer);
00069   static CalCoreSkeleton *loadCoreSkeleton(void* inputBuffer);
00070 
00071   static CalCoreAnimation *loadCoreAnimation(CalDataSource& inputSrc, CalCoreSkeleton *skel=NULL);
00072   static CalCoreMaterial *loadCoreMaterial(CalDataSource& inputSrc);
00073   static CalCoreMesh *loadCoreMesh(CalDataSource& inputSrc);
00074   static CalCoreSkeleton *loadCoreSkeleton(CalDataSource& inputSrc);
00075 
00076   static void setLoadingMode(int flags);
00077 
00078 private:
00079   static CalCoreBone *loadCoreBones(CalDataSource& dataSrc);
00080   static CalCoreKeyframe *loadCoreKeyframe(CalDataSource& dataSrc);
00081   static CalCoreSubmesh *loadCoreSubmesh(CalDataSource& dataSrc);
00082   static CalCoreTrack *loadCoreTrack(CalDataSource& dataSrc, CalCoreSkeleton *skel);
00083 
00084   static CalCoreAnimation *loadXmlCoreAnimation(const std::string& strFilename, CalCoreSkeleton *skel=NULL);
00085   static CalCoreSkeleton *loadXmlCoreSkeleton(const std::string& strFilename);
00086   static CalCoreMesh *loadXmlCoreMesh(const std::string& strFilename);
00087   static CalCoreMaterial *loadXmlCoreMaterial(const std::string& strFilename);
00088 
00089   static int loadingMode;
00090 };
00091 
00092 #endif
00093 
00094 //****************************************************************************//

Generated at Wed Dec 8 21:50:43 2004 by The Cal3D Team with doxygen 1.3.9.1 © 1997-2001 Dimitri van Heesch