Yanling Liu schrieb:
In my experience sceneView->setDefaults() is not intended to be called
multiple times. Even setSceneData() may have some problem. So I keep a
group node as scene root and call setSceneData() at the beginning. The
later changing/reloading will effect only children of the root node by
calling addChild and removeChildren. Also, after reloading I reset
view matrix by reset trackball. Seems there is nothing more left worth
to be reset.
Yanling, thanks for your answer! What I whish to reset is the lighting.
The user can enable several lights. When a new file is started, I would
like to switch off those lights and then use the default sceneView
lighting again.
I probably could do this with your approach if I switch on the lights
only in a subgroups stateset and later on remove this subgroup.
The other way would be to switch off the lights one by one.
Thanks,
Andreas
Yanling
On 5/20/06, *Andreas Goebel* <[EMAIL PROTECTED]
<mailto:[EMAIL PROTECTED]>> wrote:
Hi,
I would like to have the possibility to "reset" the lighting of my
sceneview to the defaults.
But if I use sceneView->setDefaults() when a scene is already
loadet, it
crashes. So I guess this is not the right way to use a sceneview...
How should I "reset" the sceneview?
Thanks,
Andreas
--
Andreas Goebel
Visit http://www.raumgeometrie.de to take a look at
Archimedes Geo3D, a program for dynamic geometry
in three dimensions!
_______________________________________________
osg-users mailing list
[email protected] <mailto:[email protected]>
http://openscenegraph.net/mailman/listinfo/osg-users
http://www.openscenegraph.org/
------------------------------------------------------------------------
_______________________________________________
osg-users mailing list
[email protected]
http://openscenegraph.net/mailman/listinfo/osg-users
http://www.openscenegraph.org/
--
Andreas Goebel
Visit http://www.raumgeometrie.de to take a look at
Archimedes Geo3D, a program for dynamic geometry
in three dimensions!
_______________________________________________
osg-users mailing list
[email protected]
http://openscenegraph.net/mailman/listinfo/osg-users
http://www.openscenegraph.org/