15 #ifndef OSGANIMATION_ANIMATION_UPDATE_CALLBACK
16 #define OSGANIMATION_ANIMATION_UPDATE_CALLBACK 1
19 #include <osgAnimation/Channel>
20 #include <osgAnimation/Animation>
44 const std::string&
getName()
const {
return T::getName(); }
48 if (T::getName().empty())
50 osg::notify(
osg::WARN) <<
"An update callback has no name, it means it could link only with \"\" named Target, often an error, discard" << std::endl;
54 for (ChannelList::iterator it = animation->
getChannels().begin();
58 std::string targetName = (*it)->getTargetName();
59 if (targetName == T::getName())
int link(Animation *animation)
const std::string & getName() const
ChannelList & getChannels()
AnimationUpdateCallback()
META_Object(osgAnimation, AnimationUpdateCallback< T >)
OSG_EXPORT std::ostream & notify(const NotifySeverity severity)
virtual bool link(Channel *channel)=0
AnimationUpdateCallback(const std::string &name)
AnimationUpdateCallback(const AnimationUpdateCallback &apc, const osg::CopyOp ©op)