Hi, I want to read in nodes from a .obj or .3ds file.
For doing this I use osg::ref_ptr<osg::Node> osgNode = osgDB::readNodeFile(snode.filename); Now I want to get the objects from this file. This shall be a Square, a Sphere and a Pyramid. I tried to do this by using: osg::ref_ptr<osg::Group> myOsgGroup; myOsgGroup = osgNode->asGroup(); // returns NULL if not a group. for (unsigned int i = 0 ; i < myOsgGroup->getNumChildren(); i ++) { osg::ref_ptr<osg::Node> myTempNode = myOsgGroup->getChild(i); cout << "nodename = " << myTempNode->getName() << endl; } But the result of this operation is that I get 12 Objects instead of the 3. 6 for the square, 5 for the pyramid and 1 for the sphere. What have I to do to get just the 3 Objects so I can play around with them ? Thanks Robert _______________________________________________ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org