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

46 lines
869 B
C++
Raw Normal View History

2011-12-12 04:42:39 +00:00
#include "animation.hpp"
#include <OgreHardwarePixelBuffer.h>
#include <OgreSkeletonInstance.h>
#include <OgreEntity.h>
#include <OgreBone.h>
#include <OgreSubMesh.h>
#include <OgreSceneManager.h>
namespace MWRender
{
std::map<std::string, int> Animation::sUniqueIDs;
Animation::Animation(OEngine::Render::OgreRenderer& _rend)
: mInsert(NULL)
, mRend(_rend)
, mTime(0.0f)
, mAnimate(0)
{
}
2012-02-20 13:02:24 +00:00
Animation::~Animation()
{
Ogre::SceneManager *sceneMgr = mInsert->getCreator();
for(size_t i = 0;i < mEntityList.mEntities.size();i++)
sceneMgr->destroyEntity(mEntityList.mEntities[i]);
mEntityList.mEntities.clear();
}
2012-01-07 03:52:15 +00:00
void Animation::startScript(std::string groupname, int mode, int loops)
{
if(groupname == "all")
{
mAnimate = loops;
mTime = 0.0f;
}
}
2012-02-20 13:02:24 +00:00
2011-12-15 05:33:10 +00:00
void Animation::stopScript()
{
mAnimate = 0;
}
2012-02-20 13:02:24 +00:00
}