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

55 lines
1.3 KiB
C++
Raw Normal View History

#ifndef _GAME_RENDER_ANIMATION_H
#define _GAME_RENDER_ANIMATION_H
#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 {
struct PosAndRot {
Ogre::Quaternion vecRot;
Ogre::Vector3 vecPos;
};
class Animation {
protected:
Ogre::SceneNode* mInsert;
OEngine::Render::OgreRenderer &mRend;
static std::map<std::string, int> sUniqueIDs;
float mTime;
float mStartTime;
float mStopTime;
int mAnimate;
//Represents a rotation index for each bone
std::vector<int>mRindexI;
2011-12-14 04:49:03 +00:00
//Represents a translation index for each bone
std::vector<int>mTindexI;
2011-12-27 05:20:14 +00:00
//Only shapes with morphing data will use a shape number
int mShapeNumber;
std::vector<std::vector<int> > mShapeIndexI;
std::vector<Nif::NiKeyframeData>* mTransformations;
std::map<std::string,float>* mTextmappings;
Ogre::Entity* mBase;
2011-12-28 03:35:22 +00:00
void handleAnimationTransforms();
2012-03-06 23:28:41 +00:00
bool timeIndex( float time, const std::vector<float> & 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