You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
openmw-tes3mp/apps/openmw/mwworld/scene.hpp

102 lines
2.3 KiB
C++

#ifndef GAME_MWWORLD_SCENE_H
#define GAME_MWWORLD_SCENE_H
#include "../mwrender/renderingmanager.hpp"
#include "physicssystem.hpp"
14 years ago
#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
{
14 years ago
class Player;
class CellStore;
class Ptr;
14 years ago
class Scene
{
public:
14 years ago
typedef std::set<CellStore *> CellStoreCollection;
14 years ago
private:
//OEngine::Render::OgreRenderer& mRenderer;
CellStore* mCurrentCell; // the cell, the player is in
CellStoreCollection mActiveCells;
14 years ago
bool mCellChanged;
14 years ago
PhysicsSystem *mPhysics;
MWRender::RenderingManager& mRendering;
14 years ago
void playerCellChange (CellStore *cell, const ESM::Position& position,
14 years ago
bool adjustPlayerPos = true);
14 years ago
public:
Scene (MWRender::RenderingManager& rendering, PhysicsSystem *physics);
14 years ago
~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.
14 years ago
CellStore* getCurrentCell ();
14 years ago
const CellStoreCollection& getActiveCells () const;
14 years ago
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);
14 years ago
///< Move to interior cell.
14 years ago
void changeToExteriorCell (const ESM::Position& position);
14 years ago
///< Move to exterior cell.
14 years ago
void markCellAsUnchanged();
14 years ago
void insertCell (Ptr::CellStore &cell);
void update (float duration);
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.
14 years ago
};
}
#endif