2011-11-24 06:48:54 +00:00
|
|
|
#ifndef _GAME_RENDER_ANIMATION_H
|
|
|
|
#define _GAME_RENDER_ANIMATION_H
|
2012-07-17 07:27:12 +00:00
|
|
|
|
2012-07-17 18:23:34 +00:00
|
|
|
#include <vector>
|
|
|
|
|
2012-07-17 23:00:03 +00:00
|
|
|
#include <components/nifogre/ogre_nif_loader.hpp>
|
2011-12-12 03:40:00 +00:00
|
|
|
#include <openengine/ogre/renderer.hpp>
|
|
|
|
#include "../mwworld/actiontalk.hpp"
|
2011-12-15 05:33:10 +00:00
|
|
|
#include <components/nif/node.hpp>
|
2012-01-05 00:47:06 +00:00
|
|
|
#include <openengine/bullet/physic.hpp>
|
2011-12-12 03:40:00 +00:00
|
|
|
|
2012-01-06 07:27:10 +00:00
|
|
|
|
|
|
|
|
|
|
|
|
2012-07-13 03:12:18 +00:00
|
|
|
namespace MWRender {
|
2011-12-12 03:40:00 +00:00
|
|
|
|
2012-07-13 03:12:18 +00:00
|
|
|
struct PosAndRot {
|
2012-01-12 21:03:07 +00:00
|
|
|
Ogre::Quaternion vecRot;
|
|
|
|
Ogre::Vector3 vecPos;
|
|
|
|
};
|
|
|
|
|
2012-07-13 03:12:18 +00:00
|
|
|
class Animation {
|
|
|
|
protected:
|
2012-07-13 10:51:58 +00:00
|
|
|
Ogre::SceneNode* mInsert;
|
2011-12-12 03:40:00 +00:00
|
|
|
OEngine::Render::OgreRenderer &mRend;
|
2012-07-13 10:51:58 +00:00
|
|
|
static std::map<std::string, int> sUniqueIDs;
|
2012-04-23 13:27:03 +00:00
|
|
|
|
2012-07-13 10:51:58 +00:00
|
|
|
float mTime;
|
|
|
|
int mAnimate;
|
2012-07-22 00:39:57 +00:00
|
|
|
bool mSkipFrame;
|
2011-12-27 05:20:14 +00:00
|
|
|
|
2012-07-17 23:00:03 +00:00
|
|
|
NifOgre::EntityList mEntityList;
|
2012-04-23 13:27:03 +00:00
|
|
|
|
2012-07-13 03:12:18 +00:00
|
|
|
public:
|
|
|
|
Animation(OEngine::Render::OgreRenderer& _rend);
|
|
|
|
virtual ~Animation();
|
2012-07-20 07:53:12 +00:00
|
|
|
|
|
|
|
void playGroup(std::string groupname, int mode, int loops);
|
|
|
|
void skipAnim();
|
2012-07-21 21:41:26 +00:00
|
|
|
virtual void runAnimation(float timepassed);
|
2011-11-24 06:48:54 +00:00
|
|
|
};
|
2012-07-13 03:12:18 +00:00
|
|
|
|
2011-11-24 06:48:54 +00:00
|
|
|
}
|
2012-03-25 19:56:22 +00:00
|
|
|
#endif
|