1
0
mirror of https://gitlab.com/OpenMW/openmw.git synced 2025-01-06 00:55:50 +00:00
OpenMW/apps/openmw/mwrender/navmeshmode.cpp
elsid 215b46503c
Support rendering for navmesh update frequency as a heatmap
Useful when need to find tiles with high number of updates.

Add debug Lua package with new functions to toggle render mode and set navmesh
render mode.
2022-05-17 01:54:20 +02:00

17 lines
427 B
C++

#include "navmeshmode.hpp"
#include <stdexcept>
#include <string>
namespace MWRender
{
NavMeshMode parseNavMeshMode(std::string_view value)
{
if (value == "area type")
return NavMeshMode::AreaType;
if (value == "update frequency")
return NavMeshMode::UpdateFrequency;
throw std::logic_error("Unsupported navigation mesh rendering mode: " + std::string(value));
}
}