2016-10-08 01:49:50 +00:00
|
|
|
#ifndef GAME_RENDER_ACTORANIMATION_H
|
|
|
|
#define GAME_RENDER_ACTORANIMATION_H
|
|
|
|
|
|
|
|
#include <map>
|
|
|
|
|
|
|
|
#include <osg/ref_ptr>
|
|
|
|
|
|
|
|
#include "../mwworld/containerstore.hpp"
|
2018-03-03 10:16:21 +00:00
|
|
|
#include "../mwworld/inventorystore.hpp"
|
2016-10-08 01:49:50 +00:00
|
|
|
|
|
|
|
#include "animation.hpp"
|
|
|
|
|
|
|
|
namespace osg
|
|
|
|
{
|
|
|
|
class Node;
|
|
|
|
}
|
|
|
|
|
|
|
|
namespace MWWorld
|
|
|
|
{
|
|
|
|
class ConstPtr;
|
|
|
|
}
|
|
|
|
|
|
|
|
namespace SceneUtil
|
|
|
|
{
|
|
|
|
class LightSource;
|
|
|
|
class LightListCallback;
|
|
|
|
}
|
|
|
|
|
|
|
|
namespace MWRender
|
|
|
|
{
|
|
|
|
|
|
|
|
class ActorAnimation : public Animation, public MWWorld::ContainerStoreListener
|
|
|
|
{
|
|
|
|
public:
|
2017-02-22 13:54:40 +00:00
|
|
|
ActorAnimation(const MWWorld::Ptr &ptr, osg::ref_ptr<osg::Group> parentNode, Resource::ResourceSystem* resourceSystem);
|
2016-10-08 01:49:50 +00:00
|
|
|
virtual ~ActorAnimation();
|
|
|
|
|
|
|
|
virtual void itemAdded(const MWWorld::ConstPtr& item, int count);
|
|
|
|
virtual void itemRemoved(const MWWorld::ConstPtr& item, int count);
|
2018-03-03 10:16:21 +00:00
|
|
|
virtual bool isArrowAttached() const { return false; }
|
|
|
|
|
|
|
|
protected:
|
|
|
|
bool mWeaponSheathing;
|
|
|
|
osg::Group* getBoneByName(std::string boneName);
|
|
|
|
virtual void updateHolsteredWeapon(bool showHolsteredWeapons);
|
|
|
|
virtual void injectWeaponBones();
|
|
|
|
virtual void updateQuiver();
|
|
|
|
virtual std::string getHolsteredWeaponBoneName(const MWWorld::ConstPtr& weapon);
|
|
|
|
virtual std::string getHolsteredWeaponBoneName(const unsigned int weaponType);
|
|
|
|
virtual PartHolderPtr getWeaponPart(const std::string& model, const std::string& bonename, bool enchantedGlow, osg::Vec4f* glowColor);
|
|
|
|
virtual PartHolderPtr getWeaponPart(const std::string& model, const std::string& bonename)
|
|
|
|
{
|
|
|
|
osg::Vec4f stubColor = osg::Vec4f(0,0,0,0);
|
|
|
|
return getWeaponPart(model, bonename, false, &stubColor);
|
|
|
|
};
|
|
|
|
|
|
|
|
PartHolderPtr mScabbard;
|
2016-10-08 01:49:50 +00:00
|
|
|
|
|
|
|
private:
|
|
|
|
void addHiddenItemLight(const MWWorld::ConstPtr& item, const ESM::Light* esmLight);
|
|
|
|
void removeHiddenItemLight(const MWWorld::ConstPtr& item);
|
|
|
|
|
|
|
|
typedef std::map<MWWorld::ConstPtr, osg::ref_ptr<SceneUtil::LightSource> > ItemLightMap;
|
|
|
|
ItemLightMap mItemLights;
|
|
|
|
};
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
#endif
|