home *** CD-ROM | disk | FTP | other *** search
/ Enter 2005 March / ENTER.ISO / files / fwp-0.0.6-win32-installer.exe / L3dsLoader.h < prev    next >
Encoding:
C/C++ Source or Header  |  2004-06-07  |  1.1 KB  |  43 lines

  1. #ifndef __L3dsLoader_h__
  2. #define __L3dsLoader_h__
  3.  
  4. /*!
  5. \file l3dsloader.h
  6. \author Karsten Schwenk
  7. \version 1.0
  8.  
  9. \brief This file contains the function #load3DS() that loads a 3ds file into a #Model object.
  10.  
  11. This loader uses the lib3ds by XY (http://...).
  12.  
  13. \todo coordinate system transformation is not correct
  14. */
  15.  
  16. #include "Model.h"
  17.  
  18. #include "lib3ds/file.h"
  19. #include "lib3ds/vector.h"
  20. #include "lib3ds/matrix.h"
  21. #include "lib3ds/camera.h"
  22. #include "lib3ds/light.h"
  23. #include "lib3ds/material.h"
  24. #include "lib3ds/mesh.h"
  25. #include "lib3ds/node.h"
  26.  
  27. #include "matrixmath.h"
  28.  
  29. class L3dsLoader{
  30. public:
  31.     //! loads a 3ds file into a #Model object
  32.     static bool load3DS(const char* filename, Model* model, bool generateMatrices=true, bool setupLights=false);
  33.  
  34. protected:
  35.     static char* path;
  36.     static void setupLights(Lib3dsFile *f);
  37.     static Mesh* nodeToMesh(Lib3dsFile *f, Lib3dsNode *node/*, Model* m*/);
  38.     static void lib3dsFileToModel(Lib3dsFile *f, Model* m/*, int current*/);
  39.     static void generateNodeMatrix(Lib3dsFile* f, Model* m, Lib3dsNode* node, int frame, mat4x4_t matParent);
  40. };
  41.  
  42. #endif    /* __L3dsLoader_h__*/
  43.