mirror of
https://github.com/TES3MP/openmw-tes3mp.git
synced 2025-01-28 19:15:32 +00:00
71 lines
1.5 KiB
C++
71 lines
1.5 KiB
C++
#ifndef OPENMW_COMPONENTS_DETOURNAVIGATOR_RECASTMESH_H
|
|
#define OPENMW_COMPONENTS_DETOURNAVIGATOR_RECASTMESH_H
|
|
|
|
#include "chunkytrimesh.hpp"
|
|
|
|
#include <memory>
|
|
#include <vector>
|
|
|
|
#include <osg/Vec3f>
|
|
|
|
namespace DetourNavigator
|
|
{
|
|
struct Settings;
|
|
|
|
class RecastMesh
|
|
{
|
|
public:
|
|
RecastMesh(std::vector<int> indices, std::vector<float> vertices,
|
|
std::vector<unsigned char> flags, const Settings& settings);
|
|
|
|
const std::vector<int>& getIndices() const
|
|
{
|
|
return mIndices;
|
|
}
|
|
|
|
const std::vector<float>& getVertices() const
|
|
{
|
|
return mVertices;
|
|
}
|
|
|
|
const std::vector<unsigned char>& getFlags() const
|
|
{
|
|
return mFlags;
|
|
}
|
|
|
|
std::size_t getVerticesCount() const
|
|
{
|
|
return mVertices.size() / 3;
|
|
}
|
|
|
|
std::size_t getTrianglesCount() const
|
|
{
|
|
return mIndices.size() / 3;
|
|
}
|
|
|
|
const ChunkyTriMesh& getChunkyTriMesh() const
|
|
{
|
|
return mChunkyTriMesh;
|
|
}
|
|
|
|
const osg::Vec3f& getBoundsMin() const
|
|
{
|
|
return mBoundsMin;
|
|
}
|
|
|
|
const osg::Vec3f& getBoundsMax() const
|
|
{
|
|
return mBoundsMax;
|
|
}
|
|
|
|
private:
|
|
std::vector<int> mIndices;
|
|
std::vector<float> mVertices;
|
|
std::vector<unsigned char> mFlags;
|
|
ChunkyTriMesh mChunkyTriMesh;
|
|
osg::Vec3f mBoundsMin;
|
|
osg::Vec3f mBoundsMax;
|
|
};
|
|
}
|
|
|
|
#endif
|