00001 00017 #define ANIMATIONPATHTIMEDCALLBACK_H 1 00018 #include <osg/AnimationPath> 00019 00020 //forward declaration: 00021 class Dispatcher; 00022 00028 class AnimationPathTimedCallback: public osg::AnimationPathCallback{ 00029 //inherits most functionality of the original, only one thing is changed: Time multiplication and offset are constantly 00030 //refreshed using the time information in MessageController. 00031 00032 //But that only happens in the virtual void osg::AnimationPathCallback::operator()(Node * node,NodeVisitor * nv) that we overload in AnimationPathTimedCallback.cpp 00033 public: 00034 AnimationPathTimedCallback(); 00039 double getAnimationTime () const; 00043 void update(osg::Node& node); 00044 00050 virtual void operator()(osg::Node* node, osg::NodeVisitor* nv); 00056 void setTimeReference(Dispatcher* dp); 00057 protected: 00058 Dispatcher* timeKeeper; 00059 double elapsed; 00060 }; 00061