Hi Yura,

On 6 April 2017 at 06:16, Yura Ivanov <de...@protonmail.com> wrote:
> When I put my nodes into subgroups, removeChild becoming fast and cull is 
> faster. Thank you.
> Is there any functions to make tree like structure of my group, or i must do 
> it by hand?

For optimal performance a balanced quad tree is typically best for
scene graph applications, while groups containing a large number of
children breaks this efficiency forcing the traversals to visit all
children all the time.

The osgUtil::Optimizer::SpatializeGroupsVisitor can be used to
reorganize large flat groups of children into a quad tree.  You can
call this visitor on it's own or as part of the wider
Optimizer::optimizer(Node*,int options) operation if you include the
osgUtil::OptimizeSPATIALIZE_GROUPS bit mask to the options parameter.
The class can be found in include/osgUtil/Optimizer.

Robert.
_______________________________________________
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org

Reply via email to