MD3Loader.h 1.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960
  1. /** @file Definition of the .MD3 importer class. */
  2. #ifndef AI_MD3LOADER_H_INCLUDED
  3. #define AI_MD3LOADER_H_INCLUDED
  4. #include <map>
  5. #include "BaseImporter.h"
  6. #include "../include/aiTypes.h"
  7. struct aiNode;
  8. #include "MD3FileData.h"
  9. namespace Assimp
  10. {
  11. class MaterialHelper;
  12. using namespace MD3;
  13. // ---------------------------------------------------------------------------
  14. /** Used to load MD3 files
  15. */
  16. class MD3Importer : public BaseImporter
  17. {
  18. friend class Importer;
  19. protected:
  20. /** Constructor to be privately used by Importer */
  21. MD3Importer();
  22. /** Destructor, private as well */
  23. ~MD3Importer();
  24. public:
  25. // -------------------------------------------------------------------
  26. /** Returns whether the class can handle the format of the given file.
  27. * See BaseImporter::CanRead() for details. */
  28. bool CanRead( const std::string& pFile, IOSystem* pIOHandler) const;
  29. protected:
  30. // -------------------------------------------------------------------
  31. /** Imports the given file into the given scene structure.
  32. * See BaseImporter::InternReadFile() for details
  33. */
  34. void InternReadFile( const std::string& pFile, aiScene* pScene, IOSystem* pIOHandler);
  35. protected:
  36. /** Header of the MD3 file */
  37. const MD3::Header* m_pcHeader;
  38. /** Buffer to hold the loaded file */
  39. const unsigned char* mBuffer;
  40. };
  41. } // end of namespace Assimp
  42. #endif // AI_3DSIMPORTER_H_INC