OpenMW
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
Public Member Functions | Private Attributes | List of all members
MWRender::CreatureWeaponAnimation Class Reference

#include <creatureanimation.hpp>

Inheritance diagram for MWRender::CreatureWeaponAnimation:
Collaboration diagram for MWRender::CreatureWeaponAnimation:

Public Member Functions

 CreatureWeaponAnimation (const MWWorld::Ptr &ptr, const std::string &model, Resource::ResourceSystem *resourceSystem)
 
virtual ~CreatureWeaponAnimation ()
 
virtual void equipmentChanged ()
 
virtual void showWeapons (bool showWeapon)
 
virtual void showCarriedLeft (bool show)
 
void updateParts ()
 
void updatePart (PartHolderPtr &scene, int slot)
 
virtual void attachArrow ()
 
virtual void releaseArrow (float attackStrength)
 
virtual osg::Group * getArrowBone ()
 
virtual osg::Node * getWeaponNode ()
 
virtual Resource::ResourceSystemgetResourceSystem ()
 
virtual void showWeapon (bool show)
 
virtual void setWeaponGroup (const std::string &group)
 
virtual void addControllers ()
 
virtual osg::Vec3f runAnimation (float duration)
 
virtual void setPitchFactor (float factor)
 
- Public Member Functions inherited from MWRender::ActorAnimation
 ActorAnimation (const MWWorld::Ptr &ptr, osg::ref_ptr< osg::Group > parentNode, Resource::ResourceSystem *resourceSystem, bool disableListener=false)
 
virtual ~ActorAnimation ()
 
virtual void itemAdded (const MWWorld::ConstPtr &item, int count)
 
virtual void itemRemoved (const MWWorld::ConstPtr &item, int count)
 
- Public Member Functions inherited from MWRender::Animation
void setTextKeyListener (TextKeyListener *listener)
 
 Animation (const MWWorld::Ptr &ptr, osg::ref_ptr< osg::Group > parentNode, Resource::ResourceSystem *resourceSystem)
 
virtual ~Animation ()
 
MWWorld::ConstPtr getPtr () const
 
void setActive (bool active)
 
osg::Group * getOrCreateObjectRoot ()
 
osg::Group * getObjectRoot ()
 
void addEffect (const std::string &model, int effectId, bool loop=false, const std::string &bonename="", std::string texture="")
 Add an effect mesh attached to a bone or the insert scene node. More...
 
void removeEffect (int effectId)
 
void getLoopingEffects (std::vector< int > &out) const
 
void addSpellCastGlow (const ESM::MagicEffect *effect, float glowDuration=1.5)
 
virtual void updatePtr (const MWWorld::Ptr &ptr)
 
bool hasAnimation (const std::string &anim) const
 
void setAccumulation (const osg::Vec3f &accum)
 
void play (const std::string &groupname, const AnimPriority &priority, int blendMask, bool autodisable, float speedmult, const std::string &start, const std::string &stop, float startpoint, size_t loops, bool loopfallback=false)
 
void adjustSpeedMult (const std::string &groupname, float speedmult)
 
bool isPlaying (const std::string &groupname) const
 
bool upperBodyReady () const
 Returns true if no important animations are currently playing on the upper body. More...
 
bool getInfo (const std::string &groupname, float *complete=NULL, float *speedmult=NULL) const
 
float getStartTime (const std::string &groupname) const
 Get the absolute position in the animation track of the first text key with the given group. More...
 
float getTextKeyTime (const std::string &textKey) const
 Get the absolute position in the animation track of the text key. More...
 
float getCurrentTime (const std::string &groupname) const
 Get the current absolute position in the animation track for the animation that is currently playing from the given group. More...
 
size_t getCurrentLoopCount (const std::string &groupname) const
 
void disable (const std::string &groupname)
 
float getVelocity (const std::string &groupname) const
 
void setLoopingEnabled (const std::string &groupname, bool enabled)
 
void updateEffects (float duration)
 This is typically called as part of runAnimation, but may be called manually if needed. More...
 
const osg::Node * getNode (const std::string &name) const
 
virtual void setVampire (bool vampire)
 
void setAlpha (float alpha)
 A value < 1 makes the animation translucent, 1.f = fully opaque. More...
 
virtual void enableHeadAnimation (bool enable)
 
virtual void setLightEffect (float effect)
 
virtual void setHeadPitch (float pitchRadians)
 
virtual void setHeadYaw (float yawRadians)
 
virtual float getHeadPitch () const
 
virtual float getHeadYaw () const
 
virtual void setAccurateAiming (bool enabled)
 
- Public Member Functions inherited from MWRender::WeaponAnimation
 WeaponAnimation ()
 
virtual ~WeaponAnimation ()
 
void attachArrow (MWWorld::Ptr actor)
 
void releaseArrow (MWWorld::Ptr actor, float attackStrength)
 
void addControllers (const std::map< std::string, osg::ref_ptr< osg::MatrixTransform > > &nodes, std::multimap< osg::ref_ptr< osg::Node >, osg::ref_ptr< osg::NodeCallback > > &map, osg::Node *objectRoot)
 Add WeaponAnimation-related controllers to nodes and store the added controllers in map. More...
 
void deleteControllers ()
 
void configureControllers (float characterPitchRadians)
 Configure controllers, should be called every animation frame. More...
 
- Public Member Functions inherited from MWWorld::InventoryStoreListener
virtual void permanentEffectAdded (const ESM::MagicEffect *magicEffect, bool isNew)
 

Private Attributes

PartHolderPtr mWeapon
 
PartHolderPtr mShield
 
bool mShowWeapons
 
bool mShowCarriedLeft
 
boost::shared_ptr
< WeaponAnimationTime
mWeaponAnimationTime
 

Additional Inherited Members

- Public Types inherited from MWRender::Animation
enum  BoneGroup { BoneGroup_LowerBody = 0, BoneGroup_Torso, BoneGroup_LeftArm, BoneGroup_RightArm }
 
enum  BlendMask {
  BlendMask_LowerBody = 1<<0, BlendMask_Torso = 1<<1, BlendMask_LeftArm = 1<<2, BlendMask_RightArm = 1<<3,
  BlendMask_UpperBody = BlendMask_Torso | BlendMask_LeftArm | BlendMask_RightArm, BlendMask_All = BlendMask_LowerBody | BlendMask_UpperBody
}
 
- Static Public Attributes inherited from MWRender::Animation
static const size_t sNumBlendMasks = 4
 
- Protected Types inherited from MWRender::Animation
typedef std::map< std::string,
AnimState
AnimStateMap
 
typedef std::vector
< boost::shared_ptr
< AnimSource > > 
AnimSourceList
 
typedef std::multimap
< osg::ref_ptr< osg::Node >
, osg::ref_ptr
< osg::NodeCallback > > 
ControllerMap
 
typedef std::map< std::string,
osg::ref_ptr
< osg::MatrixTransform > > 
NodeMap
 
- Protected Member Functions inherited from MWRender::Animation
const NodeMapgetNodeMap () const
 
void resetActiveGroups ()
 
size_t detectBlendMask (const osg::Node *node) const
 
void updatePosition (float oldtime, float newtime, osg::Vec3f &position)
 
bool reset (AnimState &state, const std::multimap< float, std::string > &keys, const std::string &groupname, const std::string &start, const std::string &stop, float startpoint, bool loopfallback)
 
void handleTextKey (AnimState &state, const std::string &groupname, const std::multimap< float, std::string >::const_iterator &key, const std::multimap< float, std::string > &map)
 
void setObjectRoot (const std::string &model, bool forceskeleton, bool baseonly, bool isCreature)
 
void addAnimSource (const std::string &model)
 
void addExtraLight (osg::ref_ptr< osg::Group > parent, const ESM::Light *light)
 
void clearAnimSources ()
 
osg::Vec4f getEnchantmentColor (const MWWorld::ConstPtr &item) const
 
void addGlow (osg::ref_ptr< osg::Node > node, osg::Vec4f glowColor, float glowDuration=-1)
 
virtual void setRenderBin ()
 Set the render bin for this animation's object root. May be customized by subclasses. More...
 
- Protected Member Functions inherited from MWRender::WeaponAnimation
void setControllerRotate (const osg::Quat &rotate)
 
void setControllerEnabled (bool enabled)
 
- Protected Attributes inherited from MWRender::Animation
AnimStateMap mStates
 
AnimSourceList mAnimSources
 
osg::ref_ptr< osg::Group > mInsert
 
osg::ref_ptr< osg::Group > mObjectRoot
 
SceneUtil::SkeletonmSkeleton
 
osg::ref_ptr< osg::Node > mAccumRoot
 
osg::ref_ptr
< NifOsg::KeyframeController
mAccumCtrl
 
osg::ref_ptr
< ResetAccumRootCallback
mResetAccumRootCallback
 
ControllerMap mActiveControllers
 
boost::shared_ptr< AnimationTimemAnimationTimePtr [sNumBlendMasks]
 
NodeMap mNodeMap
 
bool mNodeMapCreated
 
MWWorld::Ptr mPtr
 
Resource::ResourceSystemmResourceSystem
 
osg::Vec3f mAccumulate
 
std::vector< EffectParamsmEffects
 
TextKeyListenermTextKeyListener
 
osg::ref_ptr< RotateControllermHeadController
 
float mHeadYawRadians
 
float mHeadPitchRadians
 
osg::ref_ptr
< SceneUtil::LightSource
mGlowLight
 
osg::ref_ptr< GlowUpdatermGlowUpdater
 
float mAlpha
 
osg::ref_ptr
< SceneUtil::LightListCallback
mLightListCallback
 
- Protected Attributes inherited from MWRender::WeaponAnimation
PartHolderPtr mAmmunition
 
osg::ref_ptr< RotateControllermSpineControllers [2]
 
float mPitchFactor
 

Constructor & Destructor Documentation

MWRender::CreatureWeaponAnimation::CreatureWeaponAnimation ( const MWWorld::Ptr ptr,
const std::string &  model,
Resource::ResourceSystem resourceSystem 
)

Here is the call graph for this function:

virtual MWRender::CreatureWeaponAnimation::~CreatureWeaponAnimation ( )
inlinevirtual

Member Function Documentation

void MWRender::CreatureWeaponAnimation::addControllers ( )
virtual

Provided to allow derived classes adding their own controllers. Note, the controllers must be added to mActiveControllers so they get cleaned up properly on the next controller rebuild. A controller rebuild may be necessary to ensure correct ordering.

Reimplemented from MWRender::Animation.

Here is the call graph for this function:

void MWRender::CreatureWeaponAnimation::attachArrow ( )
virtual

Reimplemented from MWRender::Animation.

Here is the call graph for this function:

Here is the caller graph for this function:

virtual void MWRender::CreatureWeaponAnimation::equipmentChanged ( )
inlinevirtual

Fired when items are equipped or unequipped

Reimplemented from MWWorld::InventoryStoreListener.

Here is the call graph for this function:

osg::Group * MWRender::CreatureWeaponAnimation::getArrowBone ( )
virtual
Resource::ResourceSystem * MWRender::CreatureWeaponAnimation::getResourceSystem ( )
virtual
osg::Node * MWRender::CreatureWeaponAnimation::getWeaponNode ( )
virtual
void MWRender::CreatureWeaponAnimation::releaseArrow ( float  attackStrength)
virtual

Reimplemented from MWRender::Animation.

Here is the call graph for this function:

osg::Vec3f MWRender::CreatureWeaponAnimation::runAnimation ( float  duration)
virtual

Reimplemented from MWRender::Animation.

Here is the call graph for this function:

virtual void MWRender::CreatureWeaponAnimation::setPitchFactor ( float  factor)
inlinevirtual

A relative factor (0-1) that decides if and how much the skeleton should be pitched to indicate the facing orientation of the character.

Reimplemented from MWRender::Animation.

virtual void MWRender::CreatureWeaponAnimation::setWeaponGroup ( const std::string &  group)
inlinevirtual

Reimplemented from MWRender::Animation.

void MWRender::CreatureWeaponAnimation::showCarriedLeft ( bool  show)
virtual

Reimplemented from MWRender::Animation.

Here is the call graph for this function:

virtual void MWRender::CreatureWeaponAnimation::showWeapon ( bool  show)
inlinevirtual

Implements MWRender::WeaponAnimation.

Here is the call graph for this function:

Here is the caller graph for this function:

void MWRender::CreatureWeaponAnimation::showWeapons ( bool  showWeapon)
virtual

Reimplemented from MWRender::Animation.

Here is the call graph for this function:

Here is the caller graph for this function:

void MWRender::CreatureWeaponAnimation::updatePart ( PartHolderPtr scene,
int  slot 
)

Here is the call graph for this function:

Here is the caller graph for this function:

void MWRender::CreatureWeaponAnimation::updateParts ( )

Here is the call graph for this function:

Here is the caller graph for this function:

Member Data Documentation

PartHolderPtr MWRender::CreatureWeaponAnimation::mShield
private
bool MWRender::CreatureWeaponAnimation::mShowCarriedLeft
private
bool MWRender::CreatureWeaponAnimation::mShowWeapons
private
PartHolderPtr MWRender::CreatureWeaponAnimation::mWeapon
private
boost::shared_ptr<WeaponAnimationTime> MWRender::CreatureWeaponAnimation::mWeaponAnimationTime
private

The documentation for this class was generated from the following files: