1
0
mirror of https://gitlab.com/OpenMW/openmw.git synced 2025-01-30 12:32:36 +00:00

56 lines
2.0 KiB
C++
Raw Normal View History

2018-03-14 01:49:08 +03:00
#ifndef OPENMW_COMPONENTS_DETOURNAVIGATOR_DEBUG_H
#define OPENMW_COMPONENTS_DETOURNAVIGATOR_DEBUG_H
#include "tilebounds.hpp"
#include "status.hpp"
2018-03-14 01:49:08 +03:00
2018-10-31 15:15:01 +00:00
#include <osg/io_utils>
2018-03-14 01:49:08 +03:00
#include <components/bullethelpers/operators.hpp>
2018-09-29 22:57:41 +03:00
#include <components/misc/guarded.hpp>
2018-03-14 01:49:08 +03:00
2018-05-26 17:44:25 +03:00
#include <chrono>
2018-04-04 01:10:43 +03:00
#include <fstream>
2018-03-14 01:49:08 +03:00
#include <iomanip>
#include <iostream>
2018-07-07 16:19:24 +03:00
#include <memory>
2018-03-14 01:49:08 +03:00
#include <sstream>
#include <string>
2018-07-14 12:06:15 +03:00
#include <thread>
2018-03-14 01:49:08 +03:00
class dtNavMesh;
namespace DetourNavigator
{
inline std::ostream& operator <<(std::ostream& stream, const TileBounds& value)
{
return stream << "TileBounds {" << value.mMin << ", " << value.mMax << "}";
}
inline std::ostream& operator <<(std::ostream& stream, Status value)
{
#define OPENMW_COMPONENTS_DETOURNAVIGATOR_DEBUG_STATUS_MESSAGE(name) \
case Status::name: return stream << "DetourNavigator::Status::"#name;
switch (value)
{
OPENMW_COMPONENTS_DETOURNAVIGATOR_DEBUG_STATUS_MESSAGE(Success)
OPENMW_COMPONENTS_DETOURNAVIGATOR_DEBUG_STATUS_MESSAGE(NavMeshNotFound)
OPENMW_COMPONENTS_DETOURNAVIGATOR_DEBUG_STATUS_MESSAGE(StartPolygonNotFound)
OPENMW_COMPONENTS_DETOURNAVIGATOR_DEBUG_STATUS_MESSAGE(EndPolygonNotFound)
OPENMW_COMPONENTS_DETOURNAVIGATOR_DEBUG_STATUS_MESSAGE(MoveAlongSurfaceFailed)
OPENMW_COMPONENTS_DETOURNAVIGATOR_DEBUG_STATUS_MESSAGE(FindPathOverPolygonsFailed)
OPENMW_COMPONENTS_DETOURNAVIGATOR_DEBUG_STATUS_MESSAGE(GetPolyHeightFailed)
OPENMW_COMPONENTS_DETOURNAVIGATOR_DEBUG_STATUS_MESSAGE(InitNavMeshQueryFailed)
}
#undef OPENMW_COMPONENTS_DETOURNAVIGATOR_DEBUG_STATUS_MESSAGE
return stream << "DetourNavigator::Error::" << static_cast<int>(value);
}
2018-03-14 01:49:08 +03:00
class RecastMesh;
void writeToFile(const RecastMesh& recastMesh, const std::string& pathPrefix, const std::string& revision);
void writeToFile(const dtNavMesh& navMesh, const std::string& pathPrefix, const std::string& revision);
2018-03-14 01:49:08 +03:00
}
#endif