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

#include <projectilemanager.hpp>

Collaboration diagram for MWWorld::ProjectileManager:

Classes

struct  MagicBoltState
 
struct  ProjectileState
 
struct  State
 

Public Member Functions

 ProjectileManager (osg::Group *parent, Resource::ResourceSystem *resourceSystem, MWRender::RenderingManager *rendering, MWPhysics::PhysicsSystem *physics)
 
void launchMagicBolt (const std::string &spellId, bool stack, const ESM::EffectList &effects, const MWWorld::Ptr &caster, const std::string &sourceName, const osg::Vec3f &fallbackDirection)
 If caster is an actor, the actor's facing orientation is used. Otherwise fallbackDirection is used. More...
 
void launchProjectile (MWWorld::Ptr actor, MWWorld::ConstPtr projectile, const osg::Vec3f &pos, const osg::Quat &orient, MWWorld::Ptr bow, float speed, float attackStrength)
 
void update (float dt)
 
void clear ()
 Removes all current projectiles. Should be called when switching to a new worldspace. More...
 
void write (ESM::ESMWriter &writer, Loading::Listener &progress) const
 
bool readRecord (ESM::ESMReader &reader, uint32_t type)
 
int countSavedGameRecords () const
 

Private Member Functions

void moveProjectiles (float dt)
 
void moveMagicBolts (float dt)
 
void createModel (State &state, const std::string &model, const osg::Vec3f &pos, const osg::Quat &orient, bool rotate, bool createLight, osg::Vec4 lightDiffuseColor, std::string texture="")
 
void update (State &state, float duration)
 
void operator= (const ProjectileManager &)
 
 ProjectileManager (const ProjectileManager &)
 

Private Attributes

osg::ref_ptr< osg::Group > mParent
 
Resource::ResourceSystemmResourceSystem
 
MWRender::RenderingManagermRendering
 
MWPhysics::PhysicsSystemmPhysics
 
std::vector< MagicBoltStatemMagicBolts
 
std::vector< ProjectileStatemProjectiles
 

Constructor & Destructor Documentation

MWWorld::ProjectileManager::ProjectileManager ( osg::Group *  parent,
Resource::ResourceSystem resourceSystem,
MWRender::RenderingManager rendering,
MWPhysics::PhysicsSystem physics 
)
MWWorld::ProjectileManager::ProjectileManager ( const ProjectileManager )
private

Member Function Documentation

void MWWorld::ProjectileManager::clear ( )

Removes all current projectiles. Should be called when switching to a new worldspace.

Here is the call graph for this function:

int MWWorld::ProjectileManager::countSavedGameRecords ( ) const
void MWWorld::ProjectileManager::createModel ( State state,
const std::string &  model,
const osg::Vec3f &  pos,
const osg::Quat &  orient,
bool  rotate,
bool  createLight,
osg::Vec4  lightDiffuseColor,
std::string  texture = "" 
)
private

Here is the call graph for this function:

Here is the caller graph for this function:

void MWWorld::ProjectileManager::launchMagicBolt ( const std::string &  spellId,
bool  stack,
const ESM::EffectList effects,
const MWWorld::Ptr caster,
const std::string &  sourceName,
const osg::Vec3f &  fallbackDirection 
)

If caster is an actor, the actor's facing orientation is used. Otherwise fallbackDirection is used.

Here is the call graph for this function:

void MWWorld::ProjectileManager::launchProjectile ( MWWorld::Ptr  actor,
MWWorld::ConstPtr  projectile,
const osg::Vec3f &  pos,
const osg::Quat &  orient,
MWWorld::Ptr  bow,
float  speed,
float  attackStrength 
)

Here is the call graph for this function:

void MWWorld::ProjectileManager::moveMagicBolts ( float  dt)
private

Here is the call graph for this function:

Here is the caller graph for this function:

void MWWorld::ProjectileManager::moveProjectiles ( float  dt)
private

Here is the call graph for this function:

Here is the caller graph for this function:

void MWWorld::ProjectileManager::operator= ( const ProjectileManager )
private
bool MWWorld::ProjectileManager::readRecord ( ESM::ESMReader reader,
uint32_t  type 
)

Here is the call graph for this function:

void MWWorld::ProjectileManager::update ( float  dt)

Here is the call graph for this function:

Here is the caller graph for this function:

void MWWorld::ProjectileManager::update ( State state,
float  duration 
)
private
void MWWorld::ProjectileManager::write ( ESM::ESMWriter writer,
Loading::Listener progress 
) const

Here is the call graph for this function:

Member Data Documentation

std::vector<MagicBoltState> MWWorld::ProjectileManager::mMagicBolts
private
osg::ref_ptr<osg::Group> MWWorld::ProjectileManager::mParent
private
MWPhysics::PhysicsSystem* MWWorld::ProjectileManager::mPhysics
private
std::vector<ProjectileState> MWWorld::ProjectileManager::mProjectiles
private
MWRender::RenderingManager* MWWorld::ProjectileManager::mRendering
private
Resource::ResourceSystem* MWWorld::ProjectileManager::mResourceSystem
private

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