home *** CD-ROM | disk | FTP | other *** search
- #ifndef __L3dsLoader_h__
- #define __L3dsLoader_h__
-
- /*!
- \file l3dsloader.h
- \author Karsten Schwenk
- \version 1.0
-
- \brief This file contains the function #load3DS() that loads a 3ds file into a #Model object.
-
- This loader uses the lib3ds by XY (http://...).
-
- \todo coordinate system transformation is not correct
- */
-
- #include "Model.h"
-
- #include "lib3ds/file.h"
- #include "lib3ds/vector.h"
- #include "lib3ds/matrix.h"
- #include "lib3ds/camera.h"
- #include "lib3ds/light.h"
- #include "lib3ds/material.h"
- #include "lib3ds/mesh.h"
- #include "lib3ds/node.h"
-
- #include "matrixmath.h"
-
- class L3dsLoader{
- public:
- //! loads a 3ds file into a #Model object
- static bool load3DS(const char* filename, Model* model, bool generateMatrices=true, bool setupLights=false);
-
- protected:
- static char* path;
- static void setupLights(Lib3dsFile *f);
- static Mesh* nodeToMesh(Lib3dsFile *f, Lib3dsNode *node/*, Model* m*/);
- static void lib3dsFileToModel(Lib3dsFile *f, Model* m/*, int current*/);
- static void generateNodeMatrix(Lib3dsFile* f, Model* m, Lib3dsNode* node, int frame, mat4x4_t matParent);
- };
-
- #endif /* __L3dsLoader_h__*/
-