OpenIG  2.0.4
cross-platform open-source OpenSceneGraph Image Generator
Classes | Public Member Functions | Static Public Member Functions | Protected Types | Protected Member Functions | Protected Attributes | List of all members
OpenIG::Base::Animations Class Reference

The Animations class. More...

#include <Animation.h>

Classes

struct  Animation
 The Animation struct. More...
 
struct  AnimationContainer
 Referenced pointer of std::vector of Animation. More...
 
struct  RuntimeAnimation
 The RuntimeAnimation struct. More...
 

Public Member Functions

void playAnimation (OpenIG::Base::ImageGenerator *ig, unsigned int entityId, const std::string &name, RefAnimationSequenceCallbacks *cbs=0)
 Plays simple animations. See OpenIG::Base::ImageGenerator::playAnimation. More...
 
void stopAnimation (OpenIG::Base::ImageGenerator *ig, unsigned int entityId, const std::string &name)
 Stops simple animations. See OpenIG::Base::ImageGenerator::stopAnimation. More...
 
void resetAnimation (OpenIG::Base::ImageGenerator *ig, unsigned int entityId, const std::string &name)
 Plays simple animations. See OpenIG::Base::ImageGenerator::resetAnimation. More...
 
void pauseResumeAnimation (OpenIG::Base::ImageGenerator *ig, unsigned int entityId, const std::string &name, bool pauseResume=true)
 Pause/Resume anmation. More...
 
void updateAnimations (OpenIG::Base::ImageGenerator *ig)
 Updates the animation, should be called in a loop. More...
 

Static Public Member Functions

static Animationsinstance ()
 The singleton. More...
 

Protected Types

typedef std::vector< osg::ref_ptr< RuntimeAnimation > > RuntimeAnimations
 
typedef std::vector< osg::ref_ptr< RuntimeAnimation > >::iterator RuntimeAnimationsIterator
 
typedef std::vector< osg::ref_ptr< RuntimeAnimation > >::const_iterator RuntimeAnimationsConstIterator
 

Protected Member Functions

 Animations ()
 Animations constructor. More...
 
 ~Animations ()
 Animations destructor. More...
 

Protected Attributes

RuntimeAnimations _animations
 std::vector of RuntimeAnimation
 

Detailed Description

The Animations class.

This is the singleton class that is managing the core simple animations

Author
Trajce Nikolov Nick openi.nosp@m.g@co.nosp@m.mpro..nosp@m.net
Date
Sun Jan 11 2015

Constructor & Destructor Documentation

OpenIG::Base::Animations::Animations ( )
protected

Animations constructor.

Animations constructor

Author
Trajce Nikolov Nick openi.nosp@m.g@co.nosp@m.mpro..nosp@m.net
Date
Sun Jan 11 2015
OpenIG::Base::Animations::~Animations ( )
protected

Animations destructor.

Animations destructor

Author
Trajce Nikolov Nick openi.nosp@m.g@co.nosp@m.mpro..nosp@m.net
Date
Sun Jan 11 2015

Member Function Documentation

static Animations* OpenIG::Base::Animations::instance ( )
static

The singleton.

The singleton

Returns
The singleton
Author
Trajce Nikolov Nick openi.nosp@m.g@co.nosp@m.mpro..nosp@m.net
Date
Sun Jan 11 2015
void OpenIG::Base::Animations::pauseResumeAnimation ( OpenIG::Base::ImageGenerator ig,
unsigned int  entityId,
const std::string &  name,
bool  pauseResume = true 
)

Pause/Resume anmation.

Pause/Resume animation

Parameters
igThe OpenIG::Base::ImageGenerator instance to call
entityIdThe OpenIG::Base::ImageGenerator::Entity to reset the animation on. See OpenIG::Base::ImageGenerator::resetAnimation
nameThe name of the animation
pauseResumetrue to pause, false to resume
Author
Trajce Nikolov Nick openi.nosp@m.g@co.nosp@m.mpro..nosp@m.net
Date
Tue May 16 2016
void OpenIG::Base::Animations::playAnimation ( OpenIG::Base::ImageGenerator ig,
unsigned int  entityId,
const std::string &  name,
RefAnimationSequenceCallbacks cbs = 0 
)

Plays simple animations. See OpenIG::Base::ImageGenerator::playAnimation.

Plays simple animations. See OpenIG::Base::ImageGenerator::playAnimation .It calls this method on the OpenIG::Base::ImageGenerator .

Parameters
igThe OpenIG::Base::ImageGenerator instance to call it for playback
entityIdThe OpenIG::Base::ImageGenerator::Entity to play the animation on. See OpenIG::Base::ImageGenerator::playAnimation
nameThe name of the animation
cbsOptional animation callbacks. See OpenIG::Base::AnimationSequencePlaybackCallback
Author
Trajce Nikolov Nick openi.nosp@m.g@co.nosp@m.mpro..nosp@m.net
Date
Sun Jan 11 2015
void OpenIG::Base::Animations::resetAnimation ( OpenIG::Base::ImageGenerator ig,
unsigned int  entityId,
const std::string &  name 
)

Plays simple animations. See OpenIG::Base::ImageGenerator::resetAnimation.

Reset a simple animations. See OpenIG::Base::ImageGenerator::resetAnimation .It calls this method on the OpenIG::Base::ImageGenerator .

Parameters
igThe OpenIG::Base::ImageGenerator instance to call
entityIdThe OpenIG::Base::ImageGenerator::Entity to reset the animation on. See OpenIG::Base::ImageGenerator::resetAnimation
nameThe name of the animation
Author
Trajce Nikolov Nick openi.nosp@m.g@co.nosp@m.mpro..nosp@m.net
Date
Mon May 18 2015
void OpenIG::Base::Animations::stopAnimation ( OpenIG::Base::ImageGenerator ig,
unsigned int  entityId,
const std::string &  name 
)

Stops simple animations. See OpenIG::Base::ImageGenerator::stopAnimation.

Stops the playback of simple animations. See OpenIG::Base::ImageGenerator::stopAnimation .It calls this method on the OpenIG::Base::ImageGenerator .

Parameters
igThe OpenIG::Base::ImageGenerator instance to call
entityIdThe OpenIG::Base::ImageGenerator::Entity to stop the animation on. See OpenIG::Base::ImageGenerator::stopAnimation
nameThe name of the animation
Author
Trajce Nikolov Nick openi.nosp@m.g@co.nosp@m.mpro..nosp@m.net
Date
Mon May 18 2015
void OpenIG::Base::Animations::updateAnimations ( OpenIG::Base::ImageGenerator ig)

Updates the animation, should be called in a loop.

Updates the animation, should be called in a loop. There is a plugin available that calls this method in the igplugincore::Plugin::update call.

Parameters
igThe image generator instance
Author
Trajce Nikolov Nick openi.nosp@m.g@co.nosp@m.mpro..nosp@m.net
Date
Sun Jan 11 2015

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