Hi All,
I solved the problem through the osgWidget::UIObjectParent interface
osgWidget::Window inherits from. I realized that before
window->addWidget(label) the getNumObjects() returned 0, while after I got 1.
So that's the correct API to use (I guess). So window->getByName("osgLabel")
returned the pointer to the cloned Label.
Now, I'm just curious to know if there is a way to clone a node without cloning
all its children or, in case of window, all its related widgets. Is it possible?
Moreover, since the Label widget I add to the window is indeed a subclass of
osgWidget::Label (say MyLabel class), what should I implement in MyLabel class
to make the clone() call on the osgWidget::Window to create an instance of
MyLabel instead of an osgWidget::Label?
Regards
Gianni
------------------
Read this topic online here:
http://forum.openscenegraph.org/viewtopic.php?p=43767#43767
_______________________________________________
osg-users mailing list
[email protected]
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org