QGearsWalkmeshFile.h 1.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354
  1. /*
  2. -----------------------------------------------------------------------------
  3. Copyright (c) 2013-09-05 Tobias Peters <tobias.peters@kreativeffekt.at>
  4. This file is part of Q-Gears
  5. Q-Gears is free software: you can redistribute it and/or modify
  6. it under the terms of the GNU General Public License as published by
  7. the Free Software Foundation, version 2.0 (GPLv2) of the License.
  8. Q-Gears is distributed in the hope that it will be useful,
  9. but WITHOUT ANY WARRANTY; without even the implied warranty of
  10. MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  11. GNU General Public License for more details.
  12. -----------------------------------------------------------------------------
  13. */
  14. #ifndef __QGearsWalkmeshFile_H__
  15. #define __QGearsWalkmeshFile_H__
  16. #include "common/QGearsResource.h"
  17. #include "core/Walkmesh.h"
  18. namespace QGears
  19. {
  20. class WalkmeshFile : public Resource
  21. {
  22. public:
  23. WalkmeshFile( Ogre::ResourceManager *creator, const String &name
  24. ,Ogre::ResourceHandle handle, const String &group
  25. ,bool isManual = false, Ogre::ManualResourceLoader *loader = NULL );
  26. virtual ~WalkmeshFile();
  27. static const String RESOURCE_TYPE;
  28. typedef ::WalkmeshTriangle Triangle;
  29. typedef std::vector<Triangle> TriangleList;
  30. virtual TriangleList& getTriangles( void );
  31. protected:
  32. virtual void loadImpl( void );
  33. virtual void unloadImpl( void );
  34. virtual size_t calculateSize( void ) const;
  35. private:
  36. TriangleList m_triangles;
  37. };
  38. typedef Ogre::SharedPtr<WalkmeshFile> WalkmeshFilePtr;
  39. }
  40. #endif // __QGearsWalkmeshFile_H__