osgAnimation::Timeline Class Reference

`#include <Timeline>`

Inheritance diagram for osgAnimation::Timeline:

## Classes

struct | Command

## Public Types

enum | TimelineStatus { Play , Stop }
typedef std::vector< FrameAction > | ActionList
typedef std::map< int, ActionList > | ActionLayers
Public Types inherited from osgAnimation::Action
typedef std::map< unsigned int, osg::ref_ptr< Callback > > | FrameCallback
Public Types inherited from osg::Object
enum | DataVariance { DYNAMIC , STATIC , UNSPECIFIED }

## Public Member Functions

| Timeline ()
| Timeline (const Timeline &nc, const osg::CopyOp &op=osg::CopyOp::SHALLOW_COPY)
| META_Action (osgAnimation, Timeline)
TimelineStatus | getStatus () const
const ActionList & | getActionLayer (int i)
unsigned int | getCurrentFrame () const
double | getCurrentTime () const
void | play ()
void | gotoFrame (unsigned int frame)
void | stop ()
bool | getEvaluating () const
bool | isActive (Action *activeAction)
void | removeAction (Action *action)
virtual void | addActionAt (unsigned int frame, Action *action, int priority=0)
virtual void | addActionAt (double t, Action *action, int priority=0)
void | addActionNow (Action *action, int priority=0)
void | clearActions ()
virtual void | update (double simulationTime)
void | setLastFrameEvaluated (unsigned int frame)
void | setEvaluating (bool state)
void | traverse (ActionVisitor &visitor)
void | setStats (osg::Stats *stats)
osg::Stats * | getStats ()
void | collectStats (bool state)
osgAnimation::StatsActionVisitor * | getStatsVisitor ()
const ActionLayers & | getActionLayers () const
void | processPendingOperation ()
void | setAnimationManager (AnimationManagerBase *)
Public Member Functions inherited from osgAnimation::Action
| META_Action (osgAnimation, Action)
| Action ()
| Action (const Action &, const osg::CopyOp &)
void | setCallback (double when, Callback *callback)
void | setCallback (unsigned int frame, Callback *callback)
Callback * | getCallback (unsigned int frame)
void | removeCallback (Callback *)
Callback * | getFrameCallback (unsigned int frame)
Callback * | getFrameCallback (double time)
unsigned int | getFramesPerSecond () const
void | setNumFrames (unsigned int numFrames)
void | setDuration (double duration)
unsigned int | getNumFrames () const
double | getDuration () const
virtual void | setLoop (unsigned int nb)
virtual unsigned int | getLoop () const
bool | evaluateFrame (unsigned int frame, unsigned int &resultframe, unsigned int &nbloop)
Public Member Functions inherited from osg::Object
| Object ()
| Object (bool threadSafeRefUnref)
| Object (const Object &, const CopyOp &copyop=CopyOp::SHALLOW_COPY)
virtual Object * | cloneType () const =0
virtual Object * | clone (const CopyOp &) const =0
virtual bool | isSameKindAs (const Object *) const
virtual const char * | libraryName () const =0
virtual const char * | className () const =0
std::string | getCompoundClassName () const
virtual Node * | asNode ()
virtual const Node * | asNode () const
virtual NodeVisitor * | asNodeVisitor ()
virtual const NodeVisitor * | asNodeVisitor () const
virtual StateSet * | asStateSet ()
virtual const StateSet * | asStateSet () const
virtual StateAttribute * | asStateAttribute ()
virtual const StateAttribute * | asStateAttribute () const
virtual Uniform * | asUniform ()
virtual const Uniform * | asUniform () const
virtual Camera * | asCamera ()
virtual const Camera * | asCamera () const
virtual Drawable * | asDrawable ()
virtual const Drawable * | asDrawable () const
virtual Callback * | asCallback ()
virtual const Callback * | asCallback () const
virtual CallbackObject * | asCallbackObject ()
virtual const CallbackObject * | asCallbackObject () const
virtual UserDataContainer * | asUserDataContainer ()
virtual const UserDataContainer * | asUserDataContainer () const
virtual ValueObject * | asValueObject ()
virtual const ValueObject * | asValueObject () const
virtual Image * | asImage ()
virtual const Image * | asImage () const
virtual void | setThreadSafeRefUnref (bool threadSafe)
virtual void | setName (const std::string &name)
void | setName (const char *name)
const std::string & | getName () const
void | setDataVariance (DataVariance dv)
DataVariance | getDataVariance () const
virtual void | computeDataVariance ()
void | setUserDataContainer (osg::UserDataContainer *udc)
template<class T>
void | setUserDataContainer (const ref_ptr< T > &udc)
osg::UserDataContainer * | getUserDataContainer ()
const osg::UserDataContainer * | getUserDataContainer () const
osg::UserDataContainer * | getOrCreateUserDataContainer ()
virtual void | setUserData (Referenced *obj)
template<class T>
void | setUserData (const ref_ptr< T > &ud)
virtual Referenced * | getUserData ()
virtual const Referenced * | getUserData () const
template<typename T>
bool | getUserValue (const std::string &name, T &value) const
template<typename T>
void | setUserValue (const std::string &name, const T &value)
virtual void | resizeGLObjectBuffers (unsigned int)
virtual void | releaseGLObjects (osg::State *=0) const
template<typename T>
BoolValueObject UCharValueObject UShortValueObject UIntValueObject DoubleValueObject Vec3fValueObject Vec2dValueObject Vec4dValueObject PlaneValueObject MatrixdValueObject BoundingBoxdValueObject BoundingSpheredValueObject bool | getUserValue (const std::string &name, T &value) const
Public Member Functions inherited from osg::Referenced
| Referenced ()
| Referenced (bool threadSafeRefUnref)
| Referenced (const Referenced &)
Referenced & | operator= (const Referenced &)
bool | getThreadSafeRefUnref () const
OpenThreads::Mutex * | getRefMutex () const
int | ref () const
int | unref () const
int | unref_nodelete () const
int | referenceCount () const
ObserverSet * | getObserverSet () const
ObserverSet * | getOrCreateObserverSet () const
void | addObserver (Observer *observer) const
void | removeObserver (Observer *observer) const

## Protected Types

typedef std::vector< Command > | CommandList
Protected Types inherited from osgAnimation::Action
enum | Status { Play , Stop }

## Protected Member Functions

void | internalRemoveAction (Action *action)
void | internalAddAction (int priority, const FrameAction &ftl)
Protected Member Functions inherited from osg::Object
virtual | ~Object ()
Protected Member Functions inherited from osg::Referenced
virtual | ~Referenced ()
void | signalObserversAndDelete (bool signalDelete, bool doDelete) const
void | deleteUsingDeleteHandler () const

## Protected Attributes

osg::observer_ptr< AnimationManagerBase > | _animationManager
ActionLayers | _actions
double | _lastUpdate
double | _speed
unsigned int | _currentFrame
unsigned int | _previousFrameEvaluated
bool | _initFirstFrame
TimelineStatus | _state
bool | _collectStats
osg::ref_ptr< osg::Stats > | _stats
osg::ref_ptr< osgAnimation::StatsActionVisitor > | _statsVisitor
bool | _evaluating
CommandList | _addActionOperations
ActionList | _removeActionOperations
Protected Attributes inherited from osgAnimation::Action
FrameCallback | _framesCallback
double | _speed
unsigned int | _fps
unsigned int | _numberFrame
unsigned int | _loop
Status | _state
Protected Attributes inherited from osg::Object
std::string | _name
DataVariance | _dataVariance
osg::UserDataContainer * | _userDataContainer
Protected Attributes inherited from osg::Referenced
OpenThreads::AtomicPtr | _observerSet
OpenThreads::Atomic | _refCount

## Additional Inherited Members

Static Public Member Functions inherited from osg::Referenced
static OpenThreads::Mutex * | getGlobalReferencedMutex ()
static void | setDeleteHandler (DeleteHandler *handler)
static DeleteHandler * | getDeleteHandler ()

## Member Typedef Documentation

## ActionLayers

typedef std::map<int, ActionList> osgAnimation::Timeline::ActionLayers

## ActionList

typedef std::vector<FrameAction> osgAnimation::Timeline::ActionList

## CommandList

typedef std::vector<Command> osgAnimation::Timeline::CommandList

protected

## Member Enumeration Documentation

## TimelineStatus

enum osgAnimation::Timeline::TimelineStatus

Enumerator
Play |
Stop |

## Constructor & Destructor Documentation

## Timeline() [1/2]

osgAnimation::Timeline::Timeline | ( |  | ) |

Referenced by META_Action(), and Timeline().

## Timeline() [2/2]

osgAnimation::Timeline::Timeline | ( | const Timeline & | nc,
|  | const osg::CopyOp & | op = osg::CopyOp::SHALLOW_COPY )

References osg::CopyOp::SHALLOW_COPY, and Timeline().

## Member Function Documentation

## addActionAt() [1/2]

virtual void osgAnimation::Timeline::addActionAt | ( | double | t,
|  | Action * | action,
|  | int | priority = 0 )

virtual

References osgAnimation::Action::Action().

## addActionAt() [2/2]

virtual void osgAnimation::Timeline::addActionAt | ( | unsigned int | frame,
|  | Action * | action,
|  | int | priority = 0 )

virtual

References osgAnimation::Action::Action().

## addActionNow()

void osgAnimation::Timeline::addActionNow | ( | Action * | action,
|  | int | priority = 0 )

References osgAnimation::Action::Action().

## clearActions()

void osgAnimation::Timeline::clearActions | ( |  | ) |

## collectStats()

void osgAnimation::Timeline::collectStats | ( | bool | state | ) |

## getActionLayer()

const ActionList & osgAnimation::Timeline::getActionLayer | ( | int | i | ) |

inline

References _actions.

## getActionLayers()

const ActionLayers & osgAnimation::Timeline::getActionLayers | ( |  | ) | const

inline

References _actions.

## getCurrentFrame()

unsigned int osgAnimation::Timeline::getCurrentFrame | ( |  | ) | const

inline

References _currentFrame.

## getCurrentTime()

double osgAnimation::Timeline::getCurrentTime | ( |  | ) | const

inline

References _currentFrame, and osgAnimation::Action::_fps.

## getEvaluating()

bool osgAnimation::Timeline::getEvaluating | ( |  | ) | const

inline

References _evaluating.

## getStats()

osg::Stats * osgAnimation::Timeline::getStats | ( |  | ) |

## getStatsVisitor()

osgAnimation::StatsActionVisitor * osgAnimation::Timeline::getStatsVisitor | ( |  | ) |

## getStatus()

TimelineStatus osgAnimation::Timeline::getStatus | ( |  | ) | const

inline

References _state.

## gotoFrame()

void osgAnimation::Timeline::gotoFrame | ( | unsigned int | frame | ) |

inline

References _currentFrame.

## internalAddAction()

void osgAnimation::Timeline::internalAddAction | ( | int | priority,
|  | const FrameAction & | ftl )

protected

## internalRemoveAction()

void osgAnimation::Timeline::internalRemoveAction | ( | Action * | action | ) |

protected

References osgAnimation::Action::Action().

## isActive()

bool osgAnimation::Timeline::isActive | ( | Action * | activeAction | ) |

References osgAnimation::Action::Action().

## META_Action()

osgAnimation::Timeline::META_Action | ( | osgAnimation | ,
|  | Timeline | )

References Timeline().

## play()

void osgAnimation::Timeline::play | ( |  | ) |

inline

References _state, and Play.

## processPendingOperation()

void osgAnimation::Timeline::processPendingOperation | ( |  | ) |

## removeAction()

void osgAnimation::Timeline::removeAction | ( | Action * | action | ) |

References osgAnimation::Action::Action().

## setAnimationManager()

void osgAnimation::Timeline::setAnimationManager | ( | AnimationManagerBase * |  | ) |

## setEvaluating()

void osgAnimation::Timeline::setEvaluating | ( | bool | state | ) |

inline

References _evaluating.

## setLastFrameEvaluated()

void osgAnimation::Timeline::setLastFrameEvaluated | ( | unsigned int | frame | ) |

inline

References _previousFrameEvaluated.

## setStats()

void osgAnimation::Timeline::setStats | ( | osg::Stats * | stats | ) |

## stop()

void osgAnimation::Timeline::stop | ( |  | ) |

inline

References _state, and Stop.

## traverse()

void osgAnimation::Timeline::traverse | ( | ActionVisitor & | visitor | ) |

virtual

Reimplemented from osgAnimation::Action.

## update()

virtual void osgAnimation::Timeline::update | ( | double | simulationTime | ) |

virtual

## Member Data Documentation

## _actions

ActionLayers osgAnimation::Timeline::_actions

protected

Referenced by getActionLayer(), and getActionLayers().

## _addActionOperations

CommandList osgAnimation::Timeline::_addActionOperations

protected

## _animationManager

osg::observer_ptr<AnimationManagerBase> osgAnimation::Timeline::_animationManager

protected

## _collectStats

bool osgAnimation::Timeline::_collectStats

protected

## _currentFrame

unsigned int osgAnimation::Timeline::_currentFrame

protected

Referenced by getCurrentFrame(), getCurrentTime(), and gotoFrame().

## _evaluating

bool osgAnimation::Timeline::_evaluating

protected

Referenced by getEvaluating(), and setEvaluating().

## _initFirstFrame

bool osgAnimation::Timeline::_initFirstFrame

protected

## _lastUpdate

double osgAnimation::Timeline::_lastUpdate

protected

## _previousFrameEvaluated

unsigned int osgAnimation::Timeline::_previousFrameEvaluated

protected

Referenced by setLastFrameEvaluated().

## _removeActionOperations

ActionList osgAnimation::Timeline::_removeActionOperations

protected

## _speed

double osgAnimation::Timeline::_speed

protected

## _state

TimelineStatus osgAnimation::Timeline::_state

protected

Referenced by getStatus(), play(), and stop().

## _stats

osg::ref_ptr<osg::Stats> osgAnimation::Timeline::_stats

protected

## _statsVisitor

osg::ref_ptr<osgAnimation::StatsActionVisitor> osgAnimation::Timeline::_statsVisitor

protected

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

- Timeline