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

Handles attach & release of projectiles for ranged weapons. More...

#include <weaponanimation.hpp>

Inheritance diagram for MWRender::WeaponAnimation:
Collaboration diagram for MWRender::WeaponAnimation:

Public Member Functions

 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...
 

Protected Member Functions

void setControllerRotate (const osg::Quat &rotate)
 
void setControllerEnabled (bool enabled)
 
virtual osg::Group * getArrowBone ()=0
 
virtual osg::Node * getWeaponNode ()=0
 
virtual Resource::ResourceSystemgetResourceSystem ()=0
 
virtual void showWeapon (bool show)=0
 

Protected Attributes

PartHolderPtr mAmmunition
 
osg::ref_ptr< RotateControllermSpineControllers [2]
 
float mPitchFactor
 

Detailed Description

Handles attach & release of projectiles for ranged weapons.

Constructor & Destructor Documentation

MWRender::WeaponAnimation::WeaponAnimation ( )
MWRender::WeaponAnimation::~WeaponAnimation ( )
virtual

Member Function Documentation

void MWRender::WeaponAnimation::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.

Here is the caller graph for this function:

void MWRender::WeaponAnimation::attachArrow ( MWWorld::Ptr  actor)
Note
If no weapon (or an invalid weapon) is equipped, this function is a no-op.

Here is the call graph for this function:

Here is the caller graph for this function:

void MWRender::WeaponAnimation::configureControllers ( float  characterPitchRadians)

Configure controllers, should be called every animation frame.

Here is the call graph for this function:

Here is the caller graph for this function:

void MWRender::WeaponAnimation::deleteControllers ( )

Here is the caller graph for this function:

virtual osg::Group* MWRender::WeaponAnimation::getArrowBone ( )
protectedpure virtual

Implemented in MWRender::NpcAnimation, and MWRender::CreatureWeaponAnimation.

Here is the caller graph for this function:

virtual Resource::ResourceSystem* MWRender::WeaponAnimation::getResourceSystem ( )
protectedpure virtual

Implemented in MWRender::NpcAnimation, and MWRender::CreatureWeaponAnimation.

Here is the caller graph for this function:

virtual osg::Node* MWRender::WeaponAnimation::getWeaponNode ( )
protectedpure virtual

Implemented in MWRender::NpcAnimation, and MWRender::CreatureWeaponAnimation.

Here is the caller graph for this function:

void MWRender::WeaponAnimation::releaseArrow ( MWWorld::Ptr  actor,
float  attackStrength 
)
Note
If no weapon (or an invalid weapon) is equipped, this function is a no-op.

Here is the call graph for this function:

Here is the caller graph for this function:

void MWRender::WeaponAnimation::setControllerEnabled ( bool  enabled)
protected

Here is the caller graph for this function:

void MWRender::WeaponAnimation::setControllerRotate ( const osg::Quat &  rotate)
protected

Here is the caller graph for this function:

virtual void MWRender::WeaponAnimation::showWeapon ( bool  show)
protectedpure virtual

Implemented in MWRender::NpcAnimation, and MWRender::CreatureWeaponAnimation.

Here is the caller graph for this function:

Member Data Documentation

PartHolderPtr MWRender::WeaponAnimation::mAmmunition
protected
float MWRender::WeaponAnimation::mPitchFactor
protected

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.

osg::ref_ptr<RotateController> MWRender::WeaponAnimation::mSpineControllers[2]
protected

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