#ifndef OPENMW_COMPONENTS_DETOURNAVIGATOR_RECASTMESHMANAGER_H #define OPENMW_COMPONENTS_DETOURNAVIGATOR_RECASTMESHMANAGER_H #include "recastmeshbuilder.hpp" #include #include #include class btCollisionShape; namespace DetourNavigator { class RecastMeshManager { public: struct Object { const btCollisionShape* mShape; btTransform mTransform; }; RecastMeshManager(const Settings& settings, const TileBounds& bounds); bool addObject(std::size_t id, const btCollisionShape& shape, const btTransform& transform); boost::optional removeObject(std::size_t id); std::shared_ptr getMesh(); bool isEmpty() const; private: bool mShouldRebuild; RecastMeshBuilder mMeshBuilder; std::unordered_map mObjects; void rebuild(); }; } #endif