MD5Loader.h 1.4 KB

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