2018-04-07 13:11:23 +00:00
|
|
|
#ifndef OPENMW_MWRENDER_NAVMESH_H
|
|
|
|
#define OPENMW_MWRENDER_NAVMESH_H
|
|
|
|
|
|
|
|
#include <components/detournavigator/navigator.hpp>
|
|
|
|
|
|
|
|
#include <osg/ref_ptr>
|
|
|
|
|
|
|
|
namespace osg
|
|
|
|
{
|
|
|
|
class Group;
|
|
|
|
class Geometry;
|
|
|
|
}
|
|
|
|
|
|
|
|
namespace MWRender
|
|
|
|
{
|
|
|
|
class NavMesh
|
|
|
|
{
|
|
|
|
public:
|
2018-04-21 10:59:53 +00:00
|
|
|
NavMesh(const osg::ref_ptr<osg::Group>& root, bool enabled);
|
2018-04-07 13:11:23 +00:00
|
|
|
~NavMesh();
|
|
|
|
|
|
|
|
bool toggle();
|
|
|
|
|
2018-04-21 13:09:49 +00:00
|
|
|
void update(const DetourNavigator::SharedNavMesh& sharedNavMesh, std::size_t generation, std::size_t revision,
|
2018-04-07 13:11:23 +00:00
|
|
|
const DetourNavigator::Settings& settings);
|
|
|
|
|
|
|
|
void enable();
|
|
|
|
|
|
|
|
void disable();
|
|
|
|
|
|
|
|
private:
|
|
|
|
osg::ref_ptr<osg::Group> mRootNode;
|
|
|
|
bool mEnabled;
|
2018-04-21 13:09:49 +00:00
|
|
|
std::size_t mGeneration;
|
2018-04-07 13:11:23 +00:00
|
|
|
std::size_t mRevision;
|
|
|
|
osg::ref_ptr<osg::Group> mGroup;
|
|
|
|
};
|
|
|
|
}
|
|
|
|
|
|
|
|
#endif
|