1
0
mirror of https://gitlab.com/OpenMW/openmw.git synced 2025-01-17 19:10:24 +00:00
OpenMW/apps/openmw/mwrender/navmesh.hpp
elsid 70a369f70e
Add command to enable NavMesh render
togglenavmesh or tnm
2018-10-13 22:16:28 +03:00

40 lines
737 B
C++

#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:
NavMesh(const osg::ref_ptr<osg::Group>& root);
~NavMesh();
bool toggle();
void update(const DetourNavigator::SharedNavMesh& sharedNavMesh, std::size_t revision,
const DetourNavigator::Settings& settings);
void enable();
void disable();
private:
osg::ref_ptr<osg::Group> mRootNode;
bool mEnabled;
std::size_t mRevision;
osg::ref_ptr<osg::Group> mGroup;
};
}
#endif