mirror of
https://github.com/TES3MP/openmw-tes3mp.git
synced 2025-01-15 15:49:56 +00:00
25 lines
607 B
C++
25 lines
607 B
C++
#include "cachedrecastmeshmanager.hpp"
|
|
#include "debug.hpp"
|
|
|
|
namespace DetourNavigator
|
|
{
|
|
CachedRecastMeshManager::CachedRecastMeshManager(const Settings& settings)
|
|
: mImpl(settings)
|
|
{
|
|
}
|
|
|
|
boost::optional<RecastMeshManager::Object> CachedRecastMeshManager::removeObject(std::size_t id)
|
|
{
|
|
const auto object = mImpl.removeObject(id);
|
|
if (object)
|
|
mCached.reset();
|
|
return object;
|
|
}
|
|
|
|
std::shared_ptr<RecastMesh> CachedRecastMeshManager::getMesh()
|
|
{
|
|
if (!mCached)
|
|
mCached = mImpl.getMesh();
|
|
return mCached;
|
|
}
|
|
}
|