OpenMW
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
pathgrid.hpp
Go to the documentation of this file.
1 #ifndef GAME_RENDER_MWSCENE_H
2 #define GAME_RENDER_MWSCENE_H
3 
4 #include <utility>
5 
6 #include <vector>
7 #include <string>
8 #include <map>
9 
10 #include <osg/ref_ptr>
11 
12 namespace ESM
13 {
14  struct Pathgrid;
15 }
16 
17 namespace osg
18 {
19  class Group;
20  class Geometry;
21 }
22 
23 namespace MWWorld
24 {
25  class Ptr;
26  class CellStore;
27 }
28 
29 namespace MWRender
30 {
31  class Pathgrid
32  {
34 
35  void togglePathgrid();
36 
37  typedef std::vector<const MWWorld::CellStore *> CellList;
39 
40  osg::ref_ptr<osg::Group> mRootNode;
41 
42  osg::ref_ptr<osg::Group> mPathGridRoot;
43 
44  typedef std::map<std::pair<int,int>, osg::ref_ptr<osg::Group> > ExteriorPathgridNodes;
46  osg::ref_ptr<osg::Group> mInteriorPathgridNode;
47 
48  void enableCellPathgrid(const MWWorld::CellStore *store);
49  void disableCellPathgrid(const MWWorld::CellStore *store);
50 
51  public:
52  Pathgrid(osg::ref_ptr<osg::Group> root);
53  ~Pathgrid();
54  bool toggleRenderMode (int mode);
55 
56  void addCell(const MWWorld::CellStore* store);
57  void removeCell(const MWWorld::CellStore* store);
58  };
59 
60 
61 }
62 
63 #endif
osg::ref_ptr< osg::Group > mRootNode
Definition: pathgrid.hpp:40
void enableCellPathgrid(const MWWorld::CellStore *store)
Definition: pathgrid.cpp:102
void addCell(const MWWorld::CellStore *store)
Definition: pathgrid.cpp:57
ExteriorPathgridNodes mExteriorPathgridNodes
Definition: pathgrid.hpp:45
osg::ref_ptr< osg::Group > mPathGridRoot
Definition: pathgrid.hpp:42
bool mPathgridEnabled
Definition: pathgrid.hpp:33
void togglePathgrid()
Definition: pathgrid.cpp:71
~Pathgrid()
Definition: pathgrid.cpp:35
Mutable state of a cell.
Definition: cellstore.hpp:53
Definition: pathgrid.hpp:31
CellList mActiveCells
Definition: pathgrid.hpp:38
bool toggleRenderMode(int mode)
Definition: pathgrid.cpp:44
std::map< std::pair< int, int >, osg::ref_ptr< osg::Group > > ExteriorPathgridNodes
Definition: pathgrid.hpp:44
void disableCellPathgrid(const MWWorld::CellStore *store)
Definition: pathgrid.cpp:132
std::vector< const MWWorld::CellStore * > CellList
Definition: pathgrid.hpp:37
osg::ref_ptr< osg::Group > mInteriorPathgridNode
Definition: pathgrid.hpp:46
void removeCell(const MWWorld::CellStore *store)
Definition: pathgrid.cpp:64
Pathgrid(osg::ref_ptr< osg::Group > root)
Definition: pathgrid.cpp:27