Hi Yura,
Hi,
I need to move a lot of nodes from Group to MatrixTransform to translate them
into new position by user input, and then move them back into Group with new
position. Call addChild and removeChild for each node is slow because of
removeChild. Also I cant use removeChildren to remove all nodes at once because
my node list is not continuous.
You could use the replaceChild like this: (assuming node is the Node to
move and group its current parent)
transform = new MatrixTransform
transform->addChild(node);
group->replaceChild(node, transform);
This way the child list (implemented as a vector) is not changed in size
for every operation.
Cheers
Sebastian
>
Thank you!
Cheers,
Yura
------------------
Read this topic online here:
http://forum.openscenegraph.org/viewtopic.php?p=70624#70624
_______________________________________________
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