[osg-users] Splitting a scene in osg

Robert Osfield robert.osfield at gmail.com
Wed Jun 10 09:37:34 PDT 2015


Hi Joe,

There are utilities in osgUtil for building a quad tree from an
existing scene graph.  Have a look at include/osgUtil/Optimizer it has
a whole set of different scene graph optimization visitors, one of
them is the osgUtil::Optimizer::SpatializeGroupsVisitor which is
written to traverse through the scene graph and find flat groups and
automatically subdivides the children into a balanced quad tree.

It might not be exactly what you are looking for, but even if it isn't
sufficient as is it will still serve as a good example of how to
search for, split and create new group and to move children around.
The implementation is found in src/osgUtil/Optimizer.cpp.

Robert.

On 10 June 2015 at 13:03, Joe Kindle <seganom at gmail.com> wrote:
> Hey guys.
> Im kind of new to osg, so sorry for the newbie question
> So im trying to write a program which will split a scene for 4 equal parts (and then simplify and build kind of lod quadtree)
> Im struggling in the split part.. How can i tell osg to take only part of the scene and put it in other node ? (When i say part of the scene i mean by location)
>
> Thank you :)
>
> ------------------
> Read this topic online here:
> http://forum.openscenegraph.org/viewtopic.php?p=64033#64033
>
>
>
>
>
> _______________________________________________
> osg-users mailing list
> osg-users at lists.openscenegraph.org
> http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org



More information about the osg-users mailing list