mirror of
https://github.com/OpenMW/openmw.git
synced 2025-01-16 17:29:55 +00:00
Remove redundant RecastMeshManager::Water
This commit is contained in:
parent
a1549321d7
commit
da4ec31cd8
6 changed files with 7 additions and 12 deletions
|
@ -42,7 +42,7 @@ namespace DetourNavigator
|
|||
return true;
|
||||
}
|
||||
|
||||
std::optional<RecastMeshManager::Water> CachedRecastMeshManager::removeWater(const osg::Vec2i& cellPosition)
|
||||
std::optional<Water> CachedRecastMeshManager::removeWater(const osg::Vec2i& cellPosition)
|
||||
{
|
||||
const auto water = mImpl.removeWater(cellPosition);
|
||||
if (water)
|
||||
|
|
|
@ -18,7 +18,7 @@ namespace DetourNavigator
|
|||
|
||||
bool addWater(const osg::Vec2i& cellPosition, const int cellSize, const btTransform& transform);
|
||||
|
||||
std::optional<RecastMeshManager::Water> removeWater(const osg::Vec2i& cellPosition);
|
||||
std::optional<Water> removeWater(const osg::Vec2i& cellPosition);
|
||||
|
||||
std::optional<RemovedRecastMeshObject> removeObject(const ObjectId id);
|
||||
|
||||
|
|
|
@ -56,7 +56,7 @@ namespace DetourNavigator
|
|||
return true;
|
||||
}
|
||||
|
||||
std::optional<RecastMeshManager::Water> RecastMeshManager::removeWater(const osg::Vec2i& cellPosition)
|
||||
std::optional<Water> RecastMeshManager::removeWater(const osg::Vec2i& cellPosition)
|
||||
{
|
||||
const auto water = mWater.find(cellPosition);
|
||||
if (water == mWater.end())
|
||||
|
|
|
@ -4,6 +4,7 @@
|
|||
#include "oscillatingrecastmeshobject.hpp"
|
||||
#include "objectid.hpp"
|
||||
#include "version.hpp"
|
||||
#include "recastmesh.hpp"
|
||||
|
||||
#include <LinearMath/btTransform.h>
|
||||
|
||||
|
@ -29,12 +30,6 @@ namespace DetourNavigator
|
|||
class RecastMeshManager
|
||||
{
|
||||
public:
|
||||
struct Water
|
||||
{
|
||||
int mCellSize = 0;
|
||||
btTransform mTransform;
|
||||
};
|
||||
|
||||
RecastMeshManager(const Settings& settings, const TileBounds& bounds, std::size_t generation);
|
||||
|
||||
bool addObject(const ObjectId id, const btCollisionShape& shape, const btTransform& transform,
|
||||
|
|
|
@ -102,12 +102,12 @@ namespace DetourNavigator
|
|||
return result;
|
||||
}
|
||||
|
||||
std::optional<RecastMeshManager::Water> TileCachedRecastMeshManager::removeWater(const osg::Vec2i& cellPosition)
|
||||
std::optional<Water> TileCachedRecastMeshManager::removeWater(const osg::Vec2i& cellPosition)
|
||||
{
|
||||
const auto object = mWaterTilesPositions.find(cellPosition);
|
||||
if (object == mWaterTilesPositions.end())
|
||||
return std::nullopt;
|
||||
std::optional<RecastMeshManager::Water> result;
|
||||
std::optional<Water> result;
|
||||
for (const auto& tilePosition : object->second)
|
||||
{
|
||||
const auto tiles = mTiles.lock();
|
||||
|
|
|
@ -78,7 +78,7 @@ namespace DetourNavigator
|
|||
|
||||
bool addWater(const osg::Vec2i& cellPosition, const int cellSize, const btTransform& transform);
|
||||
|
||||
std::optional<RecastMeshManager::Water> removeWater(const osg::Vec2i& cellPosition);
|
||||
std::optional<Water> removeWater(const osg::Vec2i& cellPosition);
|
||||
|
||||
std::shared_ptr<RecastMesh> getMesh(const TilePosition& tilePosition);
|
||||
|
||||
|
|
Loading…
Reference in a new issue