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
|
|
|
|
2012-07-03 11:55:53 +00:00
|
|
|
namespace ESM
|
|
|
|
{
|
|
|
|
struct Pathgrid;
|
|
|
|
}
|
|
|
|
|
2013-02-07 05:47:09 +00:00
|
|
|
namespace OEngine
|
|
|
|
{
|
|
|
|
namespace Physic
|
|
|
|
{
|
|
|
|
class PhysicEngine;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2010-06-06 11:36:45 +00:00
|
|
|
namespace Ogre
|
|
|
|
{
|
|
|
|
class Camera;
|
|
|
|
class Viewport;
|
|
|
|
class SceneManager;
|
|
|
|
class SceneNode;
|
2010-08-03 18:17:31 +00:00
|
|
|
class RaySceneQuery;
|
2011-01-25 16:56:49 +00:00
|
|
|
class Quaternion;
|
|
|
|
class Vector3;
|
2015-04-21 21:35:35 +00:00
|
|
|
class ManualObject;
|
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
|
|
|
{
|
2012-03-08 06:46:34 +00:00
|
|
|
class Debugging
|
|
|
|
{
|
|
|
|
OEngine::Physic::PhysicEngine* mEngine;
|
2012-03-11 22:12:56 +00:00
|
|
|
Ogre::SceneManager *mSceneMgr;
|
2011-10-22 04:15:15 +00:00
|
|
|
|
2012-03-08 06:46:34 +00:00
|
|
|
// Path grid stuff
|
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();
|
|
|
|
|
2012-07-03 11:55:53 +00:00
|
|
|
typedef std::vector<MWWorld::CellStore *> CellList;
|
2012-03-08 06:46:34 +00:00
|
|
|
CellList mActiveCells;
|
|
|
|
|
2013-02-26 13:01:10 +00:00
|
|
|
Ogre::SceneNode *mRootNode;
|
2012-03-14 11:03:04 +00:00
|
|
|
|
2012-03-08 06:46:34 +00:00
|
|
|
Ogre::SceneNode *mPathGridRoot;
|
|
|
|
|
|
|
|
typedef std::map<std::pair<int,int>, Ogre::SceneNode *> ExteriorPathgridNodes;
|
|
|
|
ExteriorPathgridNodes mExteriorPathgridNodes;
|
2012-03-14 11:03:04 +00:00
|
|
|
Ogre::SceneNode *mInteriorPathgridNode;
|
2012-03-08 06:46:34 +00:00
|
|
|
|
2012-07-03 11:55:53 +00:00
|
|
|
void enableCellPathgrid(MWWorld::CellStore *store);
|
|
|
|
void disableCellPathgrid(MWWorld::CellStore *store);
|
2012-03-08 06:46:34 +00:00
|
|
|
|
2012-03-13 23:06:56 +00:00
|
|
|
// utility
|
2012-03-11 22:12:56 +00:00
|
|
|
void destroyCellPathgridNode(Ogre::SceneNode *node);
|
2012-03-13 23:06:56 +00:00
|
|
|
void destroyAttachedObjects(Ogre::SceneNode *node);
|
2012-03-11 22:12:56 +00:00
|
|
|
|
2012-03-14 11:03:04 +00:00
|
|
|
// materials
|
|
|
|
bool mGridMatsCreated;
|
|
|
|
void createGridMaterials();
|
|
|
|
void destroyGridMaterials();
|
|
|
|
|
|
|
|
// path grid meshes
|
2012-04-01 13:27:18 +00:00
|
|
|
Ogre::ManualObject *createPathgridLines(const ESM::Pathgrid *pathgrid);
|
|
|
|
Ogre::ManualObject *createPathgridPoints(const ESM::Pathgrid *pathgrid);
|
2012-03-08 06:46:34 +00:00
|
|
|
public:
|
2013-02-26 13:01:10 +00:00
|
|
|
Debugging(Ogre::SceneNode* root, OEngine::Physic::PhysicEngine *engine);
|
2012-03-13 23:06:56 +00:00
|
|
|
~Debugging();
|
2012-03-08 06:46:34 +00:00
|
|
|
bool toggleRenderMode (int mode);
|
|
|
|
|
2012-07-03 11:55:53 +00:00
|
|
|
void cellAdded(MWWorld::CellStore* store);
|
|
|
|
void cellRemoved(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
|