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