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? 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? 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/
