1
0
mirror of https://gitlab.com/OpenMW/openmw.git synced 2025-01-10 15:39:02 +00:00
OpenMW/game/render/cell.hpp
2010-06-07 00:33:45 +02:00

43 lines
916 B
C++

#ifndef _GAME_RENDER_CELL_H
#define _GAME_RENDER_CELL_H
#include "../cell_store.hpp"
#include "mwscene.hpp"
namespace Render
{
/**
This class is responsible for inserting meshes and other
rendering objects from the given cell into the given rendering
scene.
*/
class CellRender
{
const ESMS::CellStore &cell;
MWScene &scene;
/// The scene node that contains all objects belonging to this
/// cell.
Ogre::SceneNode *base;
public:
CellRender(const ESMS::CellStore &_cell,
MWScene &_scene)
: cell(_cell), scene(_scene), base(NULL) {}
~CellRender() { destroy(); }
/// Make the cell visible. Load the cell if necessary.
void show();
/// Remove the cell from rendering, but don't remove it from
/// memory.
void hide();
/// Destroy all rendering objects connected with this cell.
void destroy();
};
}
#endif