Hi Allen,

I am trying to figure out how to use the osg::cloneTree() and osg::deepCloneTree() methods. Unfortunately, there is no doxygen documentation about how the methods work or what the parameters are for.

I think I have determined that osg::cloneTree(node) will clone the node passed and all subnodes while setting the new cloned nodes to shared the cores from the originals. Is this correct?

yep.

I am not having as much luck deciphering the functionality of deepClone() from source though. Namely, what are the share* parameters used for and what do they correspond to? Are they a list of core types and if so what is the format to pass in?

There is a example in Turtorials/17deepClone.cpp. The deepClone really clones everything. To get a bit more control you can give it a list of pointer types to share.

This clones all nodes but the cores of type Material and Transform are shared.

NodePtr sceneClone = deepCloneTree(scene, "Material, Transform");

Andreas


--
Andreas Zieringer       [EMAIL PROTECTED]
Fraunhofer IGD - A4     phone +49 (0)6151 155 289
Fraunhoferstr. 5        fax   +49 (0)6151 155 196
D-64283 Darmstadt       www.igd.fhg.de/www/igd-a4


-------------------------------------------------------
SF email is sponsored by - The IT Product Guide
Read honest & candid reviews on hundreds of IT Products from real users.
Discover which products truly live up to the hype. Start reading now.
http://ads.osdn.com/?ad_id=6595&alloc_id=14396&op=click
_______________________________________________
Opensg-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/opensg-users

Reply via email to