1
0
Fork 1
mirror of https://github.com/TES3MP/openmw-tes3mp.git synced 2025-01-28 07:15:33 +00:00
openmw-tes3mp/apps/openmw/mwworld/scene.hpp
emoose cadc753216 Fixed: engine: Bug Stop animations when paused better fix; scene: Bug Teleporting and using loading doors linking within the same cell reloads the cell
Bug  fix only pauses the RenderingManager, and still updates the mOcclusionQuery
Bug  fix is only tested in interiors (ToddTest)
2012-11-03 19:29:55 +00:00

103 lines
2.4 KiB
C++

#ifndef GAME_MWWORLD_SCENE_H
#define GAME_MWWORLD_SCENE_H
#include "../mwrender/renderingmanager.hpp"
#include "physicssystem.hpp"
#include "globals.hpp"
namespace Ogre
{
class Vector3;
}
namespace ESM
{
struct Position;
}
namespace Files
{
class Collections;
}
namespace Render
{
class OgreRenderer;
}
namespace MWRender
{
class SkyManager;
class CellRender;
}
namespace MWWorld
{
class Player;
class CellStore;
class Ptr;
class Scene
{
public:
typedef std::set<CellStore *> CellStoreCollection;
private:
//OEngine::Render::OgreRenderer& mRenderer;
CellStore* mCurrentCell; // the cell, the player is in
CellStoreCollection mActiveCells;
bool mCellChanged;
PhysicsSystem *mPhysics;
MWRender::RenderingManager& mRendering;
void playerCellChange (CellStore *cell, const ESM::Position& position,
bool adjustPlayerPos = true);
public:
Scene (MWRender::RenderingManager& rendering, PhysicsSystem *physics);
~Scene();
void unloadCell (CellStoreCollection::iterator iter);
void loadCell (CellStore *cell);
void changeCell (int X, int Y, const ESM::Position& position, bool adjustPlayerPos);
///< Move from exterior to interior or from interior cell to a different
/// interior cell.
CellStore* getCurrentCell ();
const CellStoreCollection& getActiveCells () const;
bool hasCellChanged() const;
///< Has the player moved to a different cell, since the last frame?
void changeToInteriorCell (const std::string& cellName, const ESM::Position& position);
///< Move to interior cell.
void changeToExteriorCell (const ESM::Position& position);
///< Move to exterior cell.
void markCellAsUnchanged();
void insertCell (Ptr::CellStore &cell);
void update (float duration, bool paused);
void addObjectToScene (const Ptr& ptr);
///< Add an object that already exists in the world model to the scene.
void removeObjectFromScene (const Ptr& ptr);
///< Remove an object from the scene, but not from the world model.
bool isCellActive(const CellStore &cell);
};
}
#endif