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