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
|
|
|
class Animation {
|
2012-07-24 21:42:01 +00:00
|
|
|
struct GroupTimes {
|
|
|
|
float mStart;
|
|
|
|
float mStop;
|
|
|
|
float mLoopStart;
|
|
|
|
float mLoopStop;
|
|
|
|
|
|
|
|
size_t mLoops;
|
|
|
|
|
|
|
|
GroupTimes()
|
|
|
|
: mStart(-1.0f), mStop(-1.0f), mLoopStart(-1.0f), mLoopStop(-1.0f),
|
|
|
|
mLoops(0)
|
|
|
|
{ }
|
|
|
|
};
|
|
|
|
|
2012-07-13 03:12:18 +00:00
|
|
|
protected:
|
2012-07-13 10:51:58 +00:00
|
|
|
Ogre::SceneNode* mInsert;
|
2012-04-23 13:27:03 +00:00
|
|
|
|
2012-07-13 10:51:58 +00:00
|
|
|
float mTime;
|
2012-07-24 21:42:01 +00:00
|
|
|
GroupTimes mCurGroup;
|
2012-07-24 21:54:12 +00:00
|
|
|
GroupTimes mNextGroup;
|
2012-07-24 20:51:48 +00:00
|
|
|
|
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-07-24 00:27:35 +00:00
|
|
|
NifOgre::TextKeyMap mTextKeys;
|
2012-04-23 13:27:03 +00:00
|
|
|
|
2012-07-24 21:42:01 +00:00
|
|
|
bool findGroupTimes(const std::string &groupname, GroupTimes *times);
|
2012-07-24 20:51:48 +00:00
|
|
|
|
2012-07-13 03:12:18 +00:00
|
|
|
public:
|
2012-09-14 22:57:29 +00:00
|
|
|
Animation();
|
2012-07-13 03:12:18 +00:00
|
|
|
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
|