Hi Dat,
Finding specific children in a loaded scene graph is very common thing
to do, and one usually just write a custom NodeVisitor to do it. Have
a look at the osgplanets and osgsimiulation examples for an example of
FindNamedNodeVisitor - use this as a template and modify to
specialize it to your needs.
Robert.
On Thu, Oct 29, 2009 at 7:53 PM, Nguyen Tien Dat tienda...@gmail.com wrote:
Dear all,
I have an obj model of a supermarket that contains thousand of
objects. I load the model into the scene graph as:
osg::Node* loadedModel = osgDB::readNodeFile(supermarket_new.obj);
Now I would like to take an object from the whole scene (a coke
bottle, for example) and manipulate it. I would imagine that if I can
scan though all the children of the node, and find one (by name for
example), then I can take the node and change the transform matrix to
manipulate it. But I don't know how.
So my question is:
- Is this possible to do what I want in OSG?
- If the answer is yes, could you tell me how?
Thanks,
Dat
___
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
___
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org