#ifndef OPENMW_MWRENDER_RECASTMESH_H #define OPENMW_MWRENDER_RECASTMESH_H #include #include #include namespace osg { class Group; class Geometry; class StateSet; } namespace DetourNavigator { struct Settings; } namespace MWRender { class RecastMesh { public: RecastMesh(const osg::ref_ptr& root, bool enabled); ~RecastMesh(); bool toggle(); void update(const DetourNavigator::RecastMeshTiles& recastMeshTiles, const DetourNavigator::Settings& settings); void reset(); void enable(); void disable(); bool isEnabled() const { return mEnabled; } private: struct Group { DetourNavigator::Version mVersion; osg::ref_ptr mValue; }; osg::ref_ptr mRootNode; bool mEnabled; std::map mGroups; osg::ref_ptr mGroupStateSet; osg::ref_ptr mDebugDrawStateSet; }; } #endif