2006/5/21, [EMAIL PROTECTED] <[EMAIL PROTECTED]>:
have a look at the apply methods. how it works. then you can easy walk through
the scene by applying your nodevisitor.
Yes, I have read most of them. But I just confused the differences between
the group and geode nodes. Now I think I got more clear about this. Thank
you. So my question is how to achieve all the geode nodes? Is it still
using NodeVisitor? Or there is another methods?
have a look at the apply methods. how it works. then you can easy walk through
the scene by applying your nodevisitor.
Lei
Quoting Adrian Egli <[EMAIL PROTECTED]>:
> 2006/5/21, [EMAIL PROTECTED] <[EMAIL PROTECTED]>:
> >
> > Thank you for the reply.
> > In my case, I created a scene in which there are a few models in 3D
> studio
> > Max and save it as .osg file. Of course these models are not merged as
> one
> > model. Each model has its own name. And then I do an osg application to
> > load this file. So my program is not to merge the .osg file, but it is
> > just
> > to load the file. Next what I want to do is to find every model(or as
> what
> > you said: objects, geode, groups) and achieve their names one by one.
> >
> > I do want to "walk through" the scenegraph and collect the node
> reference.
> > But that is my question. How to "walk through" the scenegraph and
> collect
> > the node reference?
>
>
> you might have to use a NodeVisitor. (#include <osg/NodeVisitor>)
>
>
>
> So far there is another problem always confusing me. In osg, what a group
> > includes? For instance, in a scenegraph, there is only a box with green
> > color. Does the box group include only the box geode, its colour and
> its
> > position? If there are two boxes, does that means there are two groups,
> > and
> > each group contains a box geode and its related properties?
>
>
>
> no of course not two boxes == two groups. a grouping node is a node which
> can have
> a child (node). the child can my an other grouping node (group) or a
> geode ,
> or ...
> a geode is just a node which can contain some geometry data. geometry or
> shapedrawable ( drawable) the box is a shape. which can be included into
> a
> shapedrawable.
>
> may you have to look at some simple examples. an openescenegraph have a
> lot
> of them.
>
> adegli
>
>
> Thank you very much.
> >
> >
> >
> > Quoting Adrian Egli <[EMAIL PROTECTED]>:
> >
> > > ok, it's a quite hard question. because if you load a lot different
> > files
> > > into
> > > a whole scenegraph and merge the loaded group with the global
> > scenegraph,
> > > you can no longer say, that's a model. because the global becomes
> your
> > > model.
> > > :-) also i guess you ask how you can find some objects, geode, groups
> in
> > > the
> > > scenegraph.
> > > if you load a external file, you can add each time a field called
> name.
> > > node->getName().
> > > so you have just walk trough the scenegraph and collect the node
> > > referance
> > > and the node name. if you find a node with the name you are currently
> > > looking for, this would be the place where you can start working on
> the
> > > loaded model in the global scene (model)
> > >
> > > adegli
> > >
> > > 2006/5/21, [EMAIL PROTECTED] <[EMAIL PROTECTED]>:
> > > >
> > > > Hi:
> > > >
> > > > I loaded a file in which contains quite a few models. How can I
> know
> > > the
> > > > number of the models and get their names? Thanks a lot.
> > > >
> > > > Cheers
> > > >
> > > >
> > > >
> > > > _______________________________________________
> > > > osg-users mailing list
> > > > [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/
> >
>
_______________________________________________
osg-users mailing list
[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/
