Re: [osg-users] play animation backwards?

2012-08-23 Thread Robert Osfield
Hi Thilo, On 18 August 2012 20:42, Thilo Weigel thilo.wei...@atrics.de wrote: I locally changed Animation::update() to be virtual and inherited my own animation class with special backwards animation code in the update() function. Would it be possible to make Animation::update() virtual in

Re: [osg-users] play animation backwards?

2012-08-18 Thread Thilo Weigel
Hi, I locally changed Animation::update() to be virtual and inherited my own animation class with special backwards animation code in the update() function. Would it be possible to make Animation::update() virtual in future osg releases? Or is my approach rather discouraged? Thank you!

Re: [osg-users] play animation backwards?

2012-07-03 Thread Thilo Weigel
Hi Paul, Thank your for your suggestion. Decrementing the simulation time in Viewer::frame() would probably allow to play one animation backwards. But I would be stuck if I wanted to play two different animations at the same time, one being played backwards and one in the normal direction?

[osg-users] play animation backwards?

2012-07-02 Thread Thilo Weigel
Hi, Unfortunately I couldnt figure out how to play a given animation backwards. The animation is part of a model read from an osgt file. Looking at osgAnimation/Animation.cpp it would be straightforward to add an additional switch case to Animation::update() case ONCE_BACKWARDS: t =

Re: [osg-users] play animation backwards?

2012-07-02 Thread Paul Martz
Did you try decrementing the simulation time in your call to Viewer::frame()? I'm not familiar with osgAnimation internals, but other animations in oSG, such as osg AnimationPath, osgSim animated light points, and osgParticle simulations, are all based on the simulation time. It would be very

Re: [osg-users] play animation backwards?

2012-07-02 Thread Sergey Polischuk
Hi, Thilo You can do this with://animationPathCallback is a osg::AnimationPathCallback*double animationTime = animationPathCallback-getAnimationTime();//use animation duration instead if you want to play from last

Re: [osg-users] play animation backwards?

2012-07-02 Thread Sergey Polischuk
Ouch, for some reason i thought you were using osg::AnimationPath animation. Cant say anything about osgAnimation. 02.07.2012, 19:56, "Sergey Polischuk" pol...@yandex.ru:Hi, Thilo You can do this with://animationPathCallback is a osg::AnimationPathCallback*double animationTime =