Re: [osg-users] Traverse Scenegraph and dump textures

2014-02-05 Thread Conan
Worked like a champ... Thanks! CD On 2014-02-05 00:55, Sebastian Messerschmidt wrote: Hi Conan, You need to write a nodevisitor which inspects all nodes and geodes with statesets. Inside the stateset you can access the TextureAttributes and get the images there. the geodes apply then should

Re: [osg-users] Traverse Scenegraph and dump textures

2014-02-04 Thread Sebastian Messerschmidt
Hi Conan, You need to write a nodevisitor which inspects all nodes and geodes with statesets. Inside the stateset you can access the TextureAttributes and get the images there. the geodes apply then should like this: void MyVisitor::apply( osg::Geode& node ) { osg::StateSet* state_set =

[osg-users] Traverse Scenegraph and dump textures

2014-02-04 Thread Conan
I need to load a model and traverse the scene graph and dump all the textures to individual files. I assume I would do this with a NodeVisitor but it is unclear to me how to get the texture data/filename etc. I assume I would need to get the stateset, if it exists, from each node, then get th

Re: [osg-users] TRAVERSE features.

2011-06-20 Thread Robert Osfield
HI Nilton, I think you might be misunderstanding the use of the word traverse in the context of scene graph traversal. When the NodeVisitor traverse the scene graph they are consider the internal data structure links between parent nodes and their children. In the case of the cull traversal a su

[osg-users] TRAVERSE features.

2011-06-20 Thread Nilton Paulo
Hi everybody, I am not sure that the class "TRAVERSE" could control the transpass of the building walls. I would like not to pass by the walls while navigating with the camera. My source code is: nodePath[c]->setUpdateCallback( new SetTransverse() ); ... class SetTransverse : public osg::No

[osg-users] traverse the list of geometry created during the cull traversal

2008-11-25 Thread oren david
Sorry for the mass, I'm really new into OSG and I just can't find some basic info. We (www.jct.ac.il) are doing some 3D non-linear implicit function research and we draw them on screen, for some reason I need to know the distance of my camera to the closest polygon/vertex and then run some math iss

Re: [osg-users] traverse the list of geometry created during the cull traversal

2008-11-25 Thread Robert Osfield
Hi Oren, This is a topic that has been discussed in osg-users before so please check through the archives. You started the thread before, and got and answer that looked for clarification, but instead of engaging you just ask the same question again in another thread. This isn't a good use of th

[osg-users] traverse the list of geometry created during the cull traversal

2008-11-25 Thread oren david
Hello all, how do I traverse the list of geometry created during the cull traversal?? thank you ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org

Re: [osg-users] traverse

2008-05-19 Thread Robert Osfield
Hi Valery, Geode's are meant to be leaf nodes, so are no intended to have children other than drawables - which is why traverse() isn't appropriate in this case. If you do want to customize behaviour then could implement override the Geode::accept() method, this is called before the NodeVisitor::

Re: [osg-users] traverse

2008-05-19 Thread Валерий Быков
Thanks a lot for explanation to you and Артём, but my class is derived from Geode, therefore osgUtil::UpdateVisitor::apply(Geode&) calls handle_geode_callbacks(osg::Geode& geode), which doesn't call traverse anyway: // should we traverse just in case a subclass of Geode adds children?? Won't for no

Re: [osg-users] traverse

2008-05-19 Thread Robert Osfield
Opps... 2008/5/19 Robert Osfield <[EMAIL PROTECTED]>: > For an example of this have a look at the implementation of the Switch > node - src/osg/Switch.cpp. I'm meant to write osg::Sequence, rather than Switch, so you'll want to look at src/osg/Sequence.cpp. Robert. __

Re: [osg-users] traverse

2008-05-19 Thread Robert Osfield
HI Valary, The update and event traversals both have use a mechanism that stops traversal when no children of a node contain any nodes that requiring traversing. This feature is key to maintain good performance on very large databases, without it the update/event traversals would take dozens of

Re: [osg-users] traverse

2008-05-19 Thread Art Tevs
<[EMAIL PROTECTED]> schrieb am Mo, 19.5.2008: > Von: Валерий Быков <[EMAIL PROTECTED]> > Betreff: [osg-users] traverse > An: osg-users@lists.openscenegraph.org > Datum: Montag, 19. Mai 2008, 11:00 > Hi all. > > I have a question why Node::traverse(NodeVisitor&

[osg-users] traverse

2008-05-19 Thread Валерий Быков
Hi all. I have a question why Node::traverse(NodeVisitor&) doesn't called with NodeVisitor of type UPDATE_VISITOR? I have a class derived from Geode and I remoulded function traverse(NodeVisitor&) for some update operations: void MyClass::traverse(osg::NodeVisitor& nv) { if (nv.getVisitor