Re: [osg-users] OSGAnimationPath.
Hi, rPath-insert(16.0f , c0 ); The code waits for 16 seconds nd it was the problem. Thank you! Cheers, Danny -- Read this topic online here: http://forum.openscenegraph.org/viewtopic.php?p=16918#16918 ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] OSGAnimationPath.
Hi, When I change rPath-setLoopMode(osg::AnimationPath::NO_LOOPING); with rPath-setLoopMode(osg::AnimationPath::LOOP) or SWING. This code works perfect. I just wonder what might be the problem. Thank you! Cheers, Danny -- Read this topic online here: http://forum.openscenegraph.org/viewtopic.php?p=16856#16856 ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] OSGAnimationPath.
Hi, I think you record key in global space and replaying in a a sub tree node that is not in the same space. I can't help more without a sample code ready to build and data that produce the problem. Just some remarks. I am not sure you need skinning, then use only an UpdateTransform callback you will not need skeleton and bone, so it will be easier to setup (there are example in osg) Cheers, Cedric - +33 659 598 614 Cedric Pinson mailto:cedric.pin...@plopbyte.net http://www.plopbyte.net On Mon, 2009-08-31 at 08:06 +, Danny Lesnik wrote: Hi, When I change rPath-setLoopMode(osg::AnimationPath::NO_LOOPING); with rPath-setLoopMode(osg::AnimationPath::LOOP) or SWING. This code works perfect. I just wonder what might be the problem. Thank you! Cheers, Danny -- Read this topic online here: http://forum.openscenegraph.org/viewtopic.php?p=16856#16856 ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org signature.asc Description: This is a digitally signed message part ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] OSGAnimationPath.
Hi Cedric, This is sample code that reproduces this problem: #include osgViewer/Viewer #include osg/animationpath #include osg/matrixtransform #include osg/ShapeDrawable #include osg/PositionAttitudeTransform #include osg/Node #include osgDB/ReadFile #include osgGA/TrackballManipulator #include osg/AnimationPath class MoveObjectForward : public osg::AnimationPathCallback { public: MoveObjectForward::MoveObjectForward() { osg::ref_ptrosg::AnimationPath rPath = new osg::AnimationPath; rPath-setLoopMode(osg::AnimationPath::NO_LOOPING); osg::AnimationPath::ControlPoint c0(osg::Vec3(-10,0,0)); osg::AnimationPath::ControlPoint c1(osg::Vec3(10,0,0)); rPath-insert(16.0f , c0 ); rPath-insert( 20.0f, c1 ); this-setAnimationPath(rPath.get()); } }; osg::Node* tankNode = NULL; int main() { tankNode = osgDB::readNodeFile(c:\\R_Road_Street_G_Sidewalk.3DS); osg::Group* root = new osg::Group(); osg::PositionAttitudeTransform* tankXform = new osg::PositionAttitudeTransform(); tankXform-setName(ddd); root-addChild(tankXform); tankXform-addChild(tankNode); osg::Vec3 tankPosit(-10,0,0); tankXform-setPosition( tankPosit ); tankXform-setUpdateCallback(new MoveObjectForward()); osgViewer::Viewer viewer; viewer.setSceneData( root ); viewer.setCameraManipulator(new osgGA::TrackballManipulator); viewer.realize(); while( !viewer.done() ) { viewer.frame(); } return 0; } Thank you! Cheers, Danny -- Read this topic online here: http://forum.openscenegraph.org/viewtopic.php?p=16863#16863 ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] OSGAnimationPath.
Sorry i answer to another thread discard this post - +33 659 598 614 Cedric Pinson mailto:cedric.pin...@plopbyte.net http://www.plopbyte.net On Mon, 2009-08-31 at 08:06 +, Danny Lesnik wrote: Hi, When I change rPath-setLoopMode(osg::AnimationPath::NO_LOOPING); with rPath-setLoopMode(osg::AnimationPath::LOOP) or SWING. This code works perfect. I just wonder what might be the problem. Thank you! Cheers, Danny -- Read this topic online here: http://forum.openscenegraph.org/viewtopic.php?p=16856#16856 ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org signature.asc Description: This is a digitally signed message part ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] OsgAnimationPath
And should i write a small file like ADDITION.txt to explain what i have added or corrected . Sorry for late reply was hibernating :( On Nov 14, 2007 2:40 PM, Robert Osfield [EMAIL PROTECTED] wrote: On Nov 13, 2007 8:33 PM, Jeremy L. Moles [EMAIL PROTECTED] wrote: If this is a bug (I'm imaging it is) then you should probably submit it to osg-submissions. I remember working on this a few months back, but Robert is real busy right now and I'm not sure he'll be able to check it out any time soon... Yep, this is the thing to do, any bug fixes do it directly on the source and then submit the whole modified file(s) to osg-submissions. I'm taking a bit of breather from doing merges right now while I make progress with other work (you'll all hear about it soon:-), once I've got a major milestone on this work done I'll get back and review all the submissions. Cheers, Robert. ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] OsgAnimationPath
On Nov 26, 2007 11:25 AM, maruti borker [EMAIL PROTECTED] wrote: And should i write a small file like ADDITION.txt to explain what i have added or corrected . Sorry for late reply was hibernating :( No need for a separate .txt file, the changed source files zipped up, and an explanation of the motivation and the implementation of the changes in the body of the email would be fine. Robert. ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] OsgAnimationPath
On Nov 13, 2007 8:33 PM, Jeremy L. Moles [EMAIL PROTECTED] wrote: If this is a bug (I'm imaging it is) then you should probably submit it to osg-submissions. I remember working on this a few months back, but Robert is real busy right now and I'm not sure he'll be able to check it out any time soon... Yep, this is the thing to do, any bug fixes do it directly on the source and then submit the whole modified file(s) to osg-submissions. I'm taking a bit of breather from doing merges right now while I make progress with other work (you'll all hear about it soon:-), once I've got a major milestone on this work done I'll get back and review all the submissions. Cheers, Robert. ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] OsgAnimationPath
If this is a bug (I'm imaging it is) then you should probably submit it to osg-submissions. I remember working on this a few months back, but Robert is real busy right now and I'm not sure he'll be able to check it out any time soon... On Wed, 2007-11-14 at 01:50 +0530, maruti borker wrote: I found the problem in the first part , actually when the saved animation path is platyed , the animationPathManipulator uses ea.getTIme() rather than ea.getTime()-firstTIme. firstTIme is the time when it actually started playing the .path file :). I overloaded the function and worked like charm :) . If anyone needs the source code please mail me On Nov 13, 2007 12:28 AM, maruti borker [EMAIL PROTECTED] wrote: I have developed an application which needs an auto-tour option . So what i thought was to use osgviewer to record the path and then play it using the saved_animation.path. So first i created that saved_animation.path and then i added a keyboard event , so that whenever i press 'a' the animation path is played by switching the loop option off . I thought this would solve the problem . But i am facing the following problems :- 1. It doesnt start from the beginning , it starts somewhere in between 2. I am not able to manipulate the scene after i play the path file . I used the implementation of -p in osgviwer to play the path file . To solve problem #1 i tried setting some options of osgGA::AnimationPathManipulator . Like settng the manipulator to home(0.0) and i also tried init . But still it starts and in the middle of the path :( . Any hack to change this ? ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org