Often you want to make a copy of a subtree, without actually duplicating all the data (e.g. to put it under a different transform). Given that OpenSG doesn't support multiple parents, you need to make a shallow copy, which contains separate Nodes, but shares all the NodeCores.

The helper function cloneTree takes care of that.


#include <OpenSG/OSGNode.h>

NodePtr copy = OSG::cloneTree(old_node);

Submitted by Dirk Reiners, 2006/08/22.

Last modified 7 years ago Last modified on 01/17/10 01:11:44