1
0
mirror of https://gitlab.com/OpenMW/openmw.git synced 2025-01-11 09:36:37 +00:00
OpenMW/apps/openmw/mwrender/weaponanimation.hpp

59 lines
1.7 KiB
C++
Raw Normal View History

2014-03-12 10:30:44 +00:00
#ifndef OPENMW_MWRENDER_WEAPONANIMATION_H
#define OPENMW_MWRENDER_WEAPONANIMATION_H
#include "../mwworld/ptr.hpp"
namespace MWRender
{
class Animation;
2015-04-15 20:11:38 +00:00
/*
2014-03-12 10:30:44 +00:00
class WeaponAnimationTime : public Ogre::ControllerValue<Ogre::Real>
{
private:
Animation* mAnimation;
std::string mWeaponGroup;
float mStartTime;
public:
WeaponAnimationTime(Animation* animation) : mAnimation(animation), mStartTime(0) {}
void setGroup(const std::string& group);
void updateStartTime();
virtual Ogre::Real getValue() const;
virtual void setValue(Ogre::Real value)
{ }
};
2015-04-15 20:11:38 +00:00
*/
2014-03-12 10:30:44 +00:00
/// Handles attach & release of projectiles for ranged weapons
class WeaponAnimation
{
public:
WeaponAnimation() : mPitchFactor(0) {}
virtual ~WeaponAnimation() {}
2014-03-12 10:30:44 +00:00
/// @note If no weapon (or an invalid weapon) is equipped, this function is a no-op.
2015-04-15 20:11:38 +00:00
void attachArrow(MWWorld::Ptr actor) {}
/// @note If no weapon (or an invalid weapon) is equipped, this function is a no-op.
2015-04-15 20:11:38 +00:00
void releaseArrow(MWWorld::Ptr actor) {}
2014-03-12 10:30:44 +00:00
protected:
2015-04-15 20:11:38 +00:00
//NifOgre::ObjectScenePtr mAmmunition;
2014-03-12 10:30:44 +00:00
2015-04-15 20:11:38 +00:00
//virtual NifOgre::ObjectScenePtr getWeapon() = 0;
2014-03-12 10:30:44 +00:00
virtual void showWeapon(bool show) = 0;
2015-04-15 20:11:38 +00:00
//virtual void configureAddedObject(NifOgre::ObjectScenePtr object, MWWorld::Ptr ptr, int slot) = 0;
2014-03-12 10:30:44 +00:00
/// A relative factor (0-1) that decides if and how much the skeleton should be pitched
/// to indicate the facing orientation of the character, for ranged weapon aiming.
float mPitchFactor;
2015-04-15 20:11:38 +00:00
//void pitchSkeleton(float xrot, Ogre::SkeletonInstance* skel);
2014-03-12 10:30:44 +00:00
};
}
#endif