1
0
mirror of https://gitlab.com/OpenMW/openmw.git synced 2025-02-14 06:40:40 +00:00

16 lines
491 B
C++
Raw Normal View History

2018-03-14 01:49:08 +03:00
#include "recastmesh.hpp"
#include "settings.hpp"
2018-04-01 22:17:04 +03:00
#include <Recast.h>
2018-03-14 01:49:08 +03: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-01 22:17:04 +03:00
rcCalcBounds(mVertices.data(), static_cast<int>(getVerticesCount()), mBoundsMin.ptr(), mBoundsMax.ptr());
2018-03-14 01:49:08 +03:00
}
}