openscenegraph
osgAnimation::Timeline Class Reference

#include <Timeline>

Inheritance diagram for osgAnimation::Timeline:
osgAnimation::Action osg::Object osg::Referenced

Classes

struct  Command

Public Types

enum  TimelineStatus { Play , Stop }
typedef std::vector< FrameActionActionList
typedef std::map< int, ActionListActionLayers
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 ActionListgetActionLayer (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::StatsgetStats ()
void collectStats (bool state)
osgAnimation::StatsActionVisitorgetStatsVisitor ()
const ActionLayersgetActionLayers () 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)
CallbackgetCallback (unsigned int frame)
void removeCallback (Callback *)
CallbackgetFrameCallback (unsigned int frame)
CallbackgetFrameCallback (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 ObjectcloneType () const =0
virtual Objectclone (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 NodeasNode ()
virtual const NodeasNode () const
virtual NodeVisitorasNodeVisitor ()
virtual const NodeVisitorasNodeVisitor () const
virtual StateSetasStateSet ()
virtual const StateSetasStateSet () const
virtual StateAttributeasStateAttribute ()
virtual const StateAttributeasStateAttribute () const
virtual UniformasUniform ()
virtual const UniformasUniform () const
virtual CameraasCamera ()
virtual const CameraasCamera () const
virtual DrawableasDrawable ()
virtual const DrawableasDrawable () const
virtual CallbackasCallback ()
virtual const CallbackasCallback () const
virtual CallbackObjectasCallbackObject ()
virtual const CallbackObjectasCallbackObject () const
virtual UserDataContainerasUserDataContainer ()
virtual const UserDataContainerasUserDataContainer () const
virtual ValueObjectasValueObject ()
virtual const ValueObjectasValueObject () const
virtual ImageasImage ()
virtual const ImageasImage () 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::UserDataContainergetUserDataContainer ()
const osg::UserDataContainergetUserDataContainer () const
osg::UserDataContainergetOrCreateUserDataContainer ()
virtual void setUserData (Referenced *obj)
template<class T>
void setUserData (const ref_ptr< T > &ud)
virtual ReferencedgetUserData ()
virtual const ReferencedgetUserData () 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 &)
Referencedoperator= (const Referenced &)
bool getThreadSafeRefUnref () const
OpenThreads::MutexgetRefMutex () const
int ref () const
int unref () const
int unref_nodelete () const
int referenceCount () const
ObserverSetgetObserverSet () const
ObserverSetgetOrCreateObserverSet () const
void addObserver (Observer *observer) const
void removeObserver (Observer *observer) const

Protected Types

typedef std::vector< CommandCommandList
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::MutexgetGlobalReferencedMutex ()
static void setDeleteHandler (DeleteHandler *handler)
static DeleteHandlergetDeleteHandler ()

Member Typedef Documentation

◆ ActionLayers

◆ ActionList

◆ CommandList

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

Member Enumeration Documentation

◆ 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 )

Member Function Documentation

◆ addActionAt() [1/2]

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

◆ addActionAt() [2/2]

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

◆ addActionNow()

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

◆ 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

◆ 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

◆ isActive()

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

◆ 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)

◆ 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

◆ 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

◆ _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: