2014-01-05 17:22:29 +00:00
|
|
|
#ifndef GAME_RENDER_MWSCENE_H
|
|
|
|
#define GAME_RENDER_MWSCENE_H
|
2010-06-05 18:37:01 +00:00
|
|
|
|
2010-08-03 18:40:45 +00:00
|
|
|
#include <utility>
|
2010-06-05 18:37:01 +00:00
|
|
|
|
2011-01-25 16:56:49 +00:00
|
|
|
#include <vector>
|
2011-02-10 12:32:34 +00:00
|
|
|
#include <string>
|
2015-04-21 21:35:35 +00:00
|
|
|
#include <map>
|
2011-01-25 16:56:49 +00:00
|
|
|
|
2015-05-02 20:45:27 +00:00
|
|
|
#include <osg/ref_ptr>
|
|
|
|
|
2012-07-03 11:55:53 +00:00
|
|
|
namespace ESM
|
|
|
|
{
|
|
|
|
struct Pathgrid;
|
|
|
|
}
|
|
|
|
|
2015-05-02 20:45:27 +00:00
|
|
|
namespace osg
|
2010-06-06 11:36:45 +00:00
|
|
|
{
|
2015-05-02 20:45:27 +00:00
|
|
|
class Group;
|
|
|
|
class Geometry;
|
2010-06-06 11:36:45 +00:00
|
|
|
}
|
|
|
|
|
2010-08-25 07:19:15 +00:00
|
|
|
namespace MWWorld
|
|
|
|
{
|
2012-07-03 11:55:53 +00:00
|
|
|
class Ptr;
|
|
|
|
class CellStore;
|
2010-08-25 07:19:15 +00:00
|
|
|
}
|
|
|
|
|
2010-06-08 11:53:34 +00:00
|
|
|
namespace MWRender
|
2010-06-05 18:37:01 +00:00
|
|
|
{
|
2015-05-04 15:41:30 +00:00
|
|
|
class Pathgrid
|
2012-03-08 06:46:34 +00:00
|
|
|
{
|
2012-03-14 11:03:04 +00:00
|
|
|
bool mPathgridEnabled;
|
2011-10-22 04:15:15 +00:00
|
|
|
|
2012-03-08 06:46:34 +00:00
|
|
|
void togglePathgrid();
|
|
|
|
|
2015-05-02 20:45:27 +00:00
|
|
|
typedef std::vector<const MWWorld::CellStore *> CellList;
|
2012-03-08 06:46:34 +00:00
|
|
|
CellList mActiveCells;
|
|
|
|
|
2015-05-02 20:45:27 +00:00
|
|
|
osg::ref_ptr<osg::Group> mRootNode;
|
2012-03-14 11:03:04 +00:00
|
|
|
|
2015-05-02 20:45:27 +00:00
|
|
|
osg::ref_ptr<osg::Group> mPathGridRoot;
|
2012-03-08 06:46:34 +00:00
|
|
|
|
2015-05-02 20:45:27 +00:00
|
|
|
typedef std::map<std::pair<int,int>, osg::ref_ptr<osg::Group> > ExteriorPathgridNodes;
|
2012-03-08 06:46:34 +00:00
|
|
|
ExteriorPathgridNodes mExteriorPathgridNodes;
|
2015-05-02 20:45:27 +00:00
|
|
|
osg::ref_ptr<osg::Group> mInteriorPathgridNode;
|
2012-03-11 22:12:56 +00:00
|
|
|
|
2015-05-02 20:45:27 +00:00
|
|
|
void enableCellPathgrid(const MWWorld::CellStore *store);
|
|
|
|
void disableCellPathgrid(const MWWorld::CellStore *store);
|
2012-03-14 11:03:04 +00:00
|
|
|
|
2012-03-08 06:46:34 +00:00
|
|
|
public:
|
2015-05-04 15:41:30 +00:00
|
|
|
Pathgrid(osg::ref_ptr<osg::Group> root);
|
|
|
|
~Pathgrid();
|
2012-03-08 06:46:34 +00:00
|
|
|
bool toggleRenderMode (int mode);
|
|
|
|
|
2015-05-02 20:45:27 +00:00
|
|
|
void addCell(const MWWorld::CellStore* store);
|
|
|
|
void removeCell(const MWWorld::CellStore* store);
|
2012-03-08 06:46:34 +00:00
|
|
|
};
|
2011-10-22 04:15:15 +00:00
|
|
|
|
2011-01-08 14:11:37 +00:00
|
|
|
|
2010-06-05 18:37:01 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
#endif
|