#ifndef _GAME_RENDER_ANIMATION_H #define _GAME_RENDER_ANIMATION_H #include #include #include #include "../mwworld/actiontalk.hpp" #include #include namespace MWRender { struct PosAndRot { Ogre::Quaternion vecRot; Ogre::Vector3 vecPos; }; class Animation { protected: Ogre::SceneNode* mInsert; OEngine::Render::OgreRenderer &mRend; static std::map sUniqueIDs; float mTime; float mStartTime; float mStopTime; int mAnimate; //Represents a rotation index for each bone std::vectormRindexI; //Represents a translation index for each bone std::vectormTindexI; //Only shapes with morphing data will use a shape number int mShapeNumber; std::vector > mShapeIndexI; std::vector* mTransformations; std::map* mTextmappings; NifOgre::EntityList mEntityList; void handleAnimationTransforms(); bool timeIndex( float time, const std::vector & times, int & i, int & j, float & x ); public: Animation(OEngine::Render::OgreRenderer& _rend); virtual void runAnimation(float timepassed) = 0; void startScript(std::string groupname, int mode, int loops); void stopScript(); virtual ~Animation(); }; } #endif