Re: [osg-users] Dynamic Modification..

2009-05-04 Thread Ignazio
I resolve my problem in this way: while(!(viewer.done)) { //code that modify structure viewer.(frame); } Thanks a lot. Ignazio -- Read this topic online here: http://forum.openscenegraph.org/viewtopic.php?p=11271#11271

Re: [osg-users] Dynamic Modification..

2009-04-22 Thread Ignazio
OK Paul..thanks a lot -- Read this topic online here: http://forum.openscenegraph.org/viewtopic.php?p=10592#10592 ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-op

Re: [osg-users] Dynamic Modification..

2009-04-21 Thread Paul Martz
: osg-users-boun...@lists.openscenegraph.org [mailto:osg-users-boun...@lists.openscenegraph.org] On Behalf Of Paul Martz Sent: Tuesday, April 21, 2009 1:16 PM To: osg-users@lists.openscenegraph.org Subject: Re: [osg-users] Dynamic Modification.. Please take a look at the osgcallback example, it will be

Re: [osg-users] Dynamic Modification..

2009-04-21 Thread Paul Martz
@lists.openscenegraph.org Subject: Re: [osg-users] Dynamic Modification.. Thanks..Accoding you I must extend the UpdatCallBack,in this way class lux : public osg::Drawable::UpdateCallback { virtual void operator()( osg::ShapeDrawable* drawable) { drawable ->setCo

Re: [osg-users] Dynamic Modification..

2009-04-21 Thread Ignazio
Thanks a lot.I try to do what you suggested..Thanks -- Read this topic online here: http://forum.openscenegraph.org/viewtopic.php?p=10548#10548 ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph

Re: [osg-users] Dynamic Modification..

2009-04-21 Thread Jean-Sébastien Guay
Hello Ignazio, So a last question..I change color for example for 3 seconds,after this time I must set the default solid color.. And during this time others sphere must brighten..Thanks a lot.. It's up to you to define your application's behavior any way you like... We can't really go around

Re: [osg-users] Dynamic Modification..

2009-04-21 Thread Ignazio
Thanks, I change the methods like you..So a last question..I change color for example for 3 seconds,after this time I must set the default solid color.. And during this time others sphere must brighten..Thanks a lot.. -- Read this topic online here: http://forum.openscenegraph.org

Re: [osg-users] Dynamic Modification..

2009-04-21 Thread Jean-Sébastien Guay
Hello Ignazio, Thanks..Accoding you I must extend the UpdatCallBack,in this way class lux : public osg::Drawable::UpdateCallback { virtual void operator()( osg::ShapeDrawable* drawable) { drawable ->setColor(osg::Vec4(1,1,1,1)); } }; Is what I speak ri

Re: [osg-users] Dynamic Modification..

2009-04-21 Thread Ignazio
Thanks..Accoding you I must extend the UpdatCallBack,in this way class lux : public osg::Drawable::UpdateCallback { virtual void operator()( osg::ShapeDrawable* drawable) { drawable ->setColor(osg::Vec4(1,1,1,1)); } }; Is what I speak right? Thank advance

Re: [osg-users] Dynamic Modification..

2009-04-21 Thread Jean-Sébastien Guay
Hello Ignazio, I must apply a changing to an osg::ShapeDrawable element,not a osg:Node.Is possible apply an update call back to a Drawable? Please see the OSG reference docs. http://www.openscenegraph.org/documentation/OpenSceneGraphReferenceDocs/a00185.html#08ef7a88aa216afff5b072bf03ae6969

Re: [osg-users] Dynamic Modification..

2009-04-21 Thread Ignazio
Hi Jean-Sébastien, I must apply a changing to an osg::ShapeDrawable element,not a osg:Node.Is possible apply an update call back to a Drawable? I remenber you my datastructure: I have a osg::Group root, an array of osg::ShapeDrawable drawable[] an a osg::Geode geode. then: geode -> addDrawable(d

Re: [osg-users] Dynamic Modification..

2009-04-21 Thread Allen Saucier
I'm not too good at callbacks as yet. But I'll certainly look @ the examples. :) Allen -- Read this topic online here: http://forum.openscenegraph.org/viewtopic.php?p=10535#10535 ___ osg-users mailing li

Re: [osg-users] Dynamic Modification..

2009-04-21 Thread Ignazio
Thanks Allen..Now I try to do what you suggested me. -- Read this topic online here: http://forum.openscenegraph.org/viewtopic.php?p=10533#10533 ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegrap

Re: [osg-users] Dynamic Modification..

2009-04-21 Thread Jean-Sébastien Guay
Hi Allen, welcome. And I believe the only way to change anything in osg dynamically is to do so with function calls that make those changes within the viewer frame loop like so: As Robert said earlier today, that's one way, the other is to create an update callback that you will attach to

Re: [osg-users] Dynamic Modification..

2009-04-21 Thread Allen Saucier
welcome. And I believe the only way to change anything in osg dynamically is to do so with function calls that make those changes within the viewer frame loop like so: while(!viewer.done()) { // YOUR CODE GOES HERE TO CHANGE A // NODE IN THE OSG SCENE TREE // BEFORE osg Updates the sc

Re: [osg-users] Dynamic Modification..

2009-04-21 Thread Ignazio
Thanks a lot Allen and Robert. I'll try to modify my source code with our directions.. I explane you my true problem.I must change the solid color dinamically, during the execution. -- Read this topic online here: http://forum.openscenegraph.org/viewtopic.php?p=10529#10529 _

Re: [osg-users] Dynamic Modification..

2009-04-21 Thread Allen Saucier
kool robert, thx for the correction. I just pulled that code from an example I found. It works but I never understood the details - I'm a newbie too. So all the help I can get, I'll take it! :) Thx again. Allen -- Read this topic online here: http://

Re: [osg-users] Dynamic Modification..

2009-04-20 Thread Robert Osfield
HI Allen, viewer.frame() calls viewer.updateTraversal(), and viewer.run() calls viewer.frame() so your suggest frame loop would only call updateTraversal() twice. Instead to expand viewer.run() -> a frame loop with it's component parts you do (please look at the implementation itself to confirm t

Re: [osg-users] Dynamic Modification..

2009-04-20 Thread Allen Saucier
Hey, here's the article Paul is speaking about: http://forum.openscenegraph.org/viewtopic.php?t=2190 I'm one of the guys in that discussion. I asked how to modify a line dynamically. Since you're using viewer.run(), that makes life difficult. I believe you'll need to use the viewer frame loop

Re: [osg-users] Dynamic Modification..

2009-04-20 Thread Paul Martz
users@lists.openscenegraph.org Subject: [osg-users] Dynamic Modification.. Hi, I'm a new member of this forum..So if I make mistakes please apologize me.. I have a problem... :) I create a 3d application(a simple application, I have a set of cones and Cylinders). The structure of application is : osg::ref_ptr

[osg-users] Dynamic Modification..

2009-04-20 Thread Ignazio
Hi, I'm a new member of this forum..So if I make mistakes please apologize me.. I have a problem... :) I create a 3d application(a simple application, I have a set of cones and Cylinders). The structure of application is : osg::ref_ptr root; Cosg::Cone* unitCone; osg::Cylinder* unitCylinder; I