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

72 lines
1.5 KiB
C++
Raw Normal View History

2018-03-13 22:49:08 +00:00
#ifndef OPENMW_COMPONENTS_DETOURNAVIGATOR_RECASTMESH_H
#define OPENMW_COMPONENTS_DETOURNAVIGATOR_RECASTMESH_H
#include "chunkytrimesh.hpp"
#include <memory>
#include <vector>
2018-04-01 19:17:04 +00:00
#include <osg/Vec3f>
2018-03-13 22:49:08 +00:00
namespace DetourNavigator
{
struct Settings;
class RecastMesh
{
public:
2018-07-12 08:44:11 +00:00
RecastMesh(std::vector<int> indices, std::vector<float> vertices,
std::vector<unsigned char> flags, const Settings& settings);
2018-03-13 22:49:08 +00:00
const std::vector<int>& getIndices() const
{
return mIndices;
}
const std::vector<float>& getVertices() const
{
return mVertices;
}
2018-07-12 08:44:11 +00:00
const std::vector<unsigned char>& getFlags() const
{
return mFlags;
}
2018-03-13 22:49:08 +00:00
std::size_t getVerticesCount() const
{
return mVertices.size() / 3;
}
std::size_t getTrianglesCount() const
{
return mIndices.size() / 3;
}
const ChunkyTriMesh& getChunkyTriMesh() const
{
return mChunkyTriMesh;
}
2018-04-01 19:17:04 +00:00
const osg::Vec3f& getBoundsMin() const
{
return mBoundsMin;
}
const osg::Vec3f& getBoundsMax() const
{
return mBoundsMax;
}
2018-03-13 22:49:08 +00:00
private:
std::vector<int> mIndices;
std::vector<float> mVertices;
2018-07-12 08:44:11 +00:00
std::vector<unsigned char> mFlags;
2018-03-13 22:49:08 +00:00
ChunkyTriMesh mChunkyTriMesh;
2018-04-01 19:17:04 +00:00
osg::Vec3f mBoundsMin;
osg::Vec3f mBoundsMax;
2018-03-13 22:49:08 +00:00
};
}
#endif