Yes you can add new objects to your application whiles its running all you
need is a pointer to your scene graphs and use addChild on that node 

The man caveat is that you cannot do this in the cull or draw so you have to
add your objects before the CULL and draw are dispatched.

Also make sure your loading your model in the same thread as the app/update
thread


__________________________________________________________
Gordon Tomlinson 

Email   : [EMAIL PROTECTED]
YIM/AIM : gordon3dBrit
MSN IM  : [EMAIL PROTECTED]
Website : www.vis-sim.com www.gordontomlinson.com 

__________________________________________________________
"Self defence is not a function of learning tricks 
but is a function of how quickly and intensely one 
can arouse one's instinct for survival" 
-Master Tambo Tetsura 


-----Original Message-----
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] On Behalf Of Guy
Sent: Saturday, February 16, 2008 11:52 PM
To: OpenSceneGraph Users
Subject: Re: [osg-users] Adding nodes to the scene while theviewer is
running

Robert,
If it is possible to add objects while running, what is the purpose of the
realize function? I thought it initialize not only the camera. Is it
possible to add ANY object while running or there are some limitations to
this?

Thanks,
 Guy.

-----Original Message-----
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] On Behalf Of Per
Rosengren
Sent: Saturday, February 16, 2008 11:32 PM
To: OpenSceneGraph Users
Subject: Re: [osg-users] Adding nodes to the scene while the viewer is
running

Thank you! A small typo in my code resulted in that my geodes didn't get

any children. No wonder they weren't visible...

Robert Osfield wrote:
> Hi Per,
> 
> Is it simply that the new objects aren't in the current camera's view?
>  Try moving the camera around the scene.  Try pressing space bar to 
> force the camera manipulator back to its home position.
> 
> Robert.
> 
> 2008/2/15 Per Rosengren <[EMAIL PROTECTED]>:
>> I try to add Geoms to the scene of my running osgViewer::Viewer. If I 
>> print all children of Viewer::getCamera(), the new nodes are there,
but
>> they are not visible in the viewer.
>> They are added to a Switch in the scene, and they are set to be
visible.
>>
>> _______________________________________________
>> osg-users mailing list
>> [email protected]
>>
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.or
g
>>
>>
> _______________________________________________
> osg-users mailing list
> [email protected]
>
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.or
g
_______________________________________________
osg-users mailing list
[email protected]
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org


_______________________________________________
osg-users mailing list
[email protected]
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org

Reply via email to