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 <[email protected]> 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
> [email protected]
> http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
>
_______________________________________________
osg-users mailing list
[email protected]
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org

Reply via email to