1
0
mirror of https://gitlab.com/OpenMW/openmw.git synced 2025-01-25 15:35:23 +00:00
OpenMW/apps/openmw/mwrender/animation.hpp

58 lines
1.1 KiB
C++
Raw Normal View History

#ifndef _GAME_RENDER_ANIMATION_H
#define _GAME_RENDER_ANIMATION_H
2012-07-17 11:23:34 -07:00
#include <vector>
2012-07-17 16:00:03 -07:00
#include <components/nifogre/ogre_nif_loader.hpp>
#include <openengine/ogre/renderer.hpp>
#include "../mwworld/actiontalk.hpp"
2011-12-15 00:33:10 -05:00
#include <components/nif/node.hpp>
2012-01-04 19:47:06 -05:00
#include <openengine/bullet/physic.hpp>
2012-01-06 02:27:10 -05: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;
OEngine::Render::OgreRenderer &mRend;
float mTime;
GroupTimes mCurGroup;
2012-07-24 14:54:12 -07:00
GroupTimes mNextGroup;
bool mSkipFrame;
2011-12-27 00:20:14 -05:00
2012-07-17 16:00:03 -07:00
NifOgre::EntityList mEntityList;
NifOgre::TextKeyMap mTextKeys;
bool findGroupTimes(const std::string &groupname, GroupTimes *times);
public:
Animation(OEngine::Render::OgreRenderer& _rend);
virtual ~Animation();
void playGroup(std::string groupname, int mode, int loops);
void skipAnim();
virtual void runAnimation(float timepassed);
};
}
#endif