1
0
mirror of https://gitlab.com/OpenMW/openmw.git synced 2025-01-07 12:54:00 +00:00
OpenMW/components/detournavigator/recastmesh.cpp

17 lines
527 B
C++
Raw Normal View History

2018-03-13 22:49:08 +00:00
#include "recastmesh.hpp"
#include "settings.hpp"
2018-04-01 19:17:04 +00:00
#include <Recast.h>
2018-03-13 22:49:08 +00:00
namespace DetourNavigator
{
RecastMesh::RecastMesh(std::vector<int> indices, std::vector<float> vertices, const Settings& settings)
: mIndices(std::move(indices))
, mVertices(std::move(vertices))
, mChunkyTriMesh(mVertices, mIndices, settings.mTrianglesPerChunk)
{
2018-04-15 22:39:51 +00:00
if (getVerticesCount())
rcCalcBounds(mVertices.data(), static_cast<int>(getVerticesCount()), mBoundsMin.ptr(), mBoundsMax.ptr());
2018-03-13 22:49:08 +00:00
}
}