1
0
mirror of https://gitlab.com/OpenMW/openmw.git synced 2025-01-25 06:35:30 +00:00
OpenMW/apps/openmw/mwrender/actors.hpp

56 lines
1.5 KiB
C++
Raw Normal View History

#ifndef _GAME_RENDER_ACTORS_H
#define _GAME_RENDER_ACTORS_H
#include <openengine/ogre/renderer.hpp>
2011-12-09 03:02:09 -05:00
namespace MWWorld
{
class Ptr;
class CellStore;
class InventoryStore;
}
namespace MWRender
{
class Animation;
2013-02-27 09:20:42 +01:00
class RenderingManager;
class Actors
{
typedef std::map<MWWorld::CellStore*,Ogre::SceneNode*> CellSceneNodeMap;
typedef std::map<MWWorld::Ptr,Animation*> PtrAnimationMap;
OEngine::Render::OgreRenderer &mRend;
2013-02-27 09:20:42 +01:00
MWRender::RenderingManager* mRendering;
2013-02-26 14:01:10 +01:00
Ogre::SceneNode* mRootNode;
CellSceneNodeMap mCellSceneNodes;
PtrAnimationMap mAllActors;
2011-11-24 23:13:34 -05:00
public:
2013-02-27 09:20:42 +01:00
Actors(OEngine::Render::OgreRenderer& _rend, MWRender::RenderingManager* rendering)
: mRend(_rend)
, mRendering(rendering)
{}
~Actors();
2013-02-26 14:01:10 +01:00
void setRootNode(Ogre::SceneNode* root);
void insertBegin (const MWWorld::Ptr& ptr);
2012-04-07 22:02:20 -04:00
void insertNPC(const MWWorld::Ptr& ptr, MWWorld::InventoryStore& inv);
void insertCreature (const MWWorld::Ptr& ptr);
void insertActivator (const MWWorld::Ptr& ptr);
2011-11-24 23:13:34 -05:00
bool deleteObject (const MWWorld::Ptr& ptr);
///< \return found?
void removeCell(MWWorld::CellStore* store);
2011-12-26 19:23:46 -05:00
void update (float duration);
2012-07-31 16:52:21 +04:00
/// Updates containing cell for object rendering data
void updateObjectCell(const MWWorld::Ptr &old, const MWWorld::Ptr &cur);
Animation* getAnimation(const MWWorld::Ptr &ptr);
};
}
#endif