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