2018-03-13 22:49:08 +00:00
|
|
|
#ifndef OPENMW_COMPONENTS_DETOURNAVIGATOR_SETTINGS_H
|
|
|
|
#define OPENMW_COMPONENTS_DETOURNAVIGATOR_SETTINGS_H
|
|
|
|
|
2020-02-20 23:05:50 +00:00
|
|
|
#include <chrono>
|
2020-10-24 22:58:44 +00:00
|
|
|
#include <string>
|
2018-03-13 22:49:08 +00:00
|
|
|
|
|
|
|
namespace DetourNavigator
|
|
|
|
{
|
2021-11-06 12:46:43 +00:00
|
|
|
struct RecastSettings
|
2018-03-13 22:49:08 +00:00
|
|
|
{
|
2019-02-16 12:39:06 +00:00
|
|
|
float mCellHeight = 0;
|
|
|
|
float mCellSize = 0;
|
|
|
|
float mDetailSampleDist = 0;
|
|
|
|
float mDetailSampleMaxError = 0;
|
|
|
|
float mMaxClimb = 0;
|
|
|
|
float mMaxSimplificationError = 0;
|
|
|
|
float mMaxSlope = 0;
|
|
|
|
float mRecastScaleFactor = 0;
|
|
|
|
float mSwimHeightScale = 0;
|
|
|
|
int mBorderSize = 0;
|
|
|
|
int mMaxEdgeLen = 0;
|
|
|
|
int mMaxVertsPerPoly = 0;
|
2021-11-06 12:46:43 +00:00
|
|
|
int mRegionMergeArea = 0;
|
|
|
|
int mRegionMinArea = 0;
|
2019-02-16 12:39:06 +00:00
|
|
|
int mTileSize = 0;
|
2021-11-06 12:46:43 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
struct DetourSettings
|
|
|
|
{
|
|
|
|
int mMaxPolys = 0;
|
|
|
|
int mMaxNavMeshQueryNodes = 0;
|
|
|
|
std::size_t mMaxPolygonPathSize = 0;
|
|
|
|
std::size_t mMaxSmoothPathSize = 0;
|
|
|
|
};
|
|
|
|
|
|
|
|
struct Settings
|
|
|
|
{
|
|
|
|
bool mEnableWriteRecastMeshToFile = false;
|
|
|
|
bool mEnableWriteNavMeshToFile = false;
|
|
|
|
bool mEnableRecastMeshFileNameRevision = false;
|
|
|
|
bool mEnableNavMeshFileNameRevision = false;
|
2021-07-09 20:51:42 +00:00
|
|
|
bool mEnableNavMeshDiskCache = false;
|
2021-08-05 22:05:09 +00:00
|
|
|
bool mWriteToNavMeshDb = false;
|
2021-11-06 12:46:43 +00:00
|
|
|
RecastSettings mRecast;
|
|
|
|
DetourSettings mDetour;
|
2021-05-05 17:23:07 +00:00
|
|
|
int mWaitUntilMinDistanceToPlayer = 0;
|
2021-11-06 12:46:43 +00:00
|
|
|
int mMaxTilesNumber = 0;
|
2019-02-16 12:39:06 +00:00
|
|
|
std::size_t mAsyncNavMeshUpdaterThreads = 0;
|
|
|
|
std::size_t mMaxNavMeshTilesCacheSize = 0;
|
2018-04-01 15:09:43 +00:00
|
|
|
std::string mRecastMeshPathPrefix;
|
|
|
|
std::string mNavMeshPathPrefix;
|
2020-02-20 23:05:50 +00:00
|
|
|
std::chrono::milliseconds mMinUpdateInterval;
|
2022-03-10 17:34:35 +00:00
|
|
|
std::uint64_t mMaxDbFileSize = 0;
|
2018-03-13 22:49:08 +00:00
|
|
|
};
|
2019-02-16 11:41:11 +00:00
|
|
|
|
2022-07-01 12:25:23 +00:00
|
|
|
inline constexpr std::int64_t navMeshFormatVersion = 2;
|
2022-06-16 22:28:44 +00:00
|
|
|
|
2021-11-06 12:46:43 +00:00
|
|
|
RecastSettings makeRecastSettingsFromSettingsManager();
|
|
|
|
|
|
|
|
DetourSettings makeDetourSettingsFromSettingsManager();
|
|
|
|
|
2021-07-03 02:09:55 +00:00
|
|
|
Settings makeSettingsFromSettingsManager();
|
2018-03-13 22:49:08 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
#endif
|