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

58 lines
1.9 KiB
C++
Raw Normal View History

#ifndef _GAME_RENDER_ACTORS_H
#define _GAME_RENDER_ACTORS_H
#include "components/esm_store/cell_store.hpp"
2011-11-24 23:13:34 -05:00
#include <map>
2011-12-11 23:42:39 -05:00
#include <list>
2011-12-09 03:02:09 -05:00
#include <openengine/ogre/renderer.hpp>
2011-12-09 00:08:30 -05:00
#include "components/nifogre/ogre_nif_loader.hpp"
2011-12-09 03:02:09 -05:00
#include "../mwworld/refdata.hpp"
#include "../mwworld/ptr.hpp"
#include "../mwworld/actiontalk.hpp"
2011-12-09 00:08:30 -05:00
#include "../mwworld/environment.hpp"
#include "npcanimation.hpp"
#include "creatureanimation.hpp"
2011-12-09 03:02:09 -05:00
namespace MWRender{
class Actors{
OEngine::Render::OgreRenderer &mRend;
std::map<MWWorld::Ptr::CellStore *, Ogre::SceneNode *> mCellSceneNodes;
Ogre::SceneNode* mMwRoot;
2011-12-09 00:08:30 -05:00
MWWorld::Environment& mEnvironment;
2011-12-24 21:53:12 -05:00
std::map<MWWorld::Ptr, Animation*> mAllActors;
2011-11-24 23:13:34 -05:00
public:
2011-12-09 00:08:30 -05:00
Actors(OEngine::Render::OgreRenderer& _rend, MWWorld::Environment& _env): mRend(_rend), mEnvironment(_env){}
2011-11-24 23:13:34 -05:00
~Actors(){}
void setMwRoot(Ogre::SceneNode* root);
void insertBegin (const MWWorld::Ptr& ptr, bool enabled, bool static_);
void insertCreature (const MWWorld::Ptr& ptr);
2011-12-09 00:08:30 -05:00
void insertNPC(const MWWorld::Ptr& ptr);
2011-11-24 23:13:34 -05:00
bool deleteObject (const MWWorld::Ptr& ptr);
///< \return found?
void removeCell(MWWorld::Ptr::CellStore* store);
2011-12-26 19:23:46 -05:00
void playAnimationGroup (const MWWorld::Ptr& ptr, const std::string& groupName, int mode,
int number = 1);
///< Run animation for a MW-reference. Calls to this function for references that are currently not
/// in the rendered scene should be ignored.
///
/// \param mode: 0 normal, 1 immediate start, 2 immediate loop
/// \param number How offen the animation should be run
void skipAnimation (const MWWorld::Ptr& ptr);
///< Skip the animation for the given MW-reference for one frame. Calls to this function for
/// references that are currently not in the rendered scene should be ignored.
void addTime();
2011-11-24 23:13:34 -05:00
};
}
#endif