1
0
Fork 1
mirror of https://github.com/TES3MP/openmw-tes3mp.git synced 2025-01-16 09:49:55 +00:00
openmw-tes3mp/apps/openmw/mwrender/animation.hpp

57 lines
1.1 KiB
C++
Raw Normal View History

#ifndef _GAME_RENDER_ANIMATION_H
#define _GAME_RENDER_ANIMATION_H
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>
#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>
2012-01-06 07:27:10 +00:00
namespace MWRender {
class Animation {
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)
{ }
};
protected:
Ogre::SceneNode* mInsert;
float mTime;
GroupTimes mCurGroup;
2012-07-24 21:54:12 +00:00
GroupTimes mNextGroup;
bool mSkipFrame;
2011-12-27 05:20:14 +00:00
2012-07-17 23:00:03 +00:00
NifOgre::EntityList mEntityList;
NifOgre::TextKeyMap mTextKeys;
bool findGroupTimes(const std::string &groupname, GroupTimes *times);
public:
Animation();
virtual ~Animation();
void playGroup(std::string groupname, int mode, int loops);
void skipAnim();
virtual void runAnimation(float timepassed);
};
}
#endif