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

Move HeadAnimationTime to the implementation file

This commit is contained in:
scrawl 2015-06-22 21:12:15 +02:00
parent 24bfb44b13
commit d5b73f2a55
2 changed files with 36 additions and 33 deletions

View File

@ -75,6 +75,41 @@ std::string getVampireHead(const std::string& race, bool female)
namespace MWRender
{
class HeadAnimationTime : public SceneUtil::ControllerSource
{
private:
MWWorld::Ptr mReference;
float mTalkStart;
float mTalkStop;
float mBlinkStart;
float mBlinkStop;
float mBlinkTimer;
bool mEnabled;
float mValue;
private:
void resetBlinkTimer();
public:
HeadAnimationTime(MWWorld::Ptr reference);
void updatePtr(const MWWorld::Ptr& updated);
void update(float dt);
void setEnabled(bool enabled);
void setTalkStart(float value);
void setTalkStop(float value);
void setBlinkStart(float value);
void setBlinkStop(float value);
virtual float getValue(osg::NodeVisitor* nv);
};
// --------------------------------------------------------------------------------
/// Subclass RotateController to add a Z-offset for sneaking in first person mode.
/// @note We use inheritance instead of adding another controller, so that we do not have to compute the worldOrient twice.
/// @note Must be set on a MatrixTransform.

View File

@ -15,40 +15,8 @@ namespace ESM
namespace MWRender
{
class HeadAnimationTime : public SceneUtil::ControllerSource
{
private:
MWWorld::Ptr mReference;
float mTalkStart;
float mTalkStop;
float mBlinkStart;
float mBlinkStop;
float mBlinkTimer;
bool mEnabled;
float mValue;
private:
void resetBlinkTimer();
public:
HeadAnimationTime(MWWorld::Ptr reference);
void updatePtr(const MWWorld::Ptr& updated);
void update(float dt);
void setEnabled(bool enabled);
void setTalkStart(float value);
void setTalkStop(float value);
void setBlinkStart(float value);
void setBlinkStop(float value);
virtual float getValue(osg::NodeVisitor* nv);
};
class NeckController;
class HeadAnimationTime;
class NpcAnimation : public Animation, public WeaponAnimation, public MWWorld::InventoryStoreListener
{