[osg-users] Building KdTrees
Robert Osfield
robert.osfield at gmail.com
Tue Dec 6 12:10:45 PST 2016
Hi Ale,
You will need to set the hint prior to loading any data, as the
DatabasePager sets up an internal KdTreeBuilder to the the building
during the post processing of the loaded subgraph.
KdTree's are assigned to Drawable's as a Shape, so you can check to
see if it's been built by doing drawable->getShape() and casting to a
KdTree.
Robert.
On 6 December 2016 at 16:54, Ale Maro <sasha71 at teletu.it> wrote:
> Hi,
>
> may be this is a trivial question but I am not sure how to enable KdTrees and DatabasePager on a scene.
> I have my own file reader (not derived from OSG ReaderWriter class) and I create directly the geometries.
> May be I misunderstood but it seems the KdTree it is not built automatically even if I call
>
> osgDB::Registry::instance()>setBuildKdTreesHint(osgDB::Options::BUILD_KDTREES )
>
> Do I need to use KdTreeBuilder explicitly or there is a way to build KdTree automatically? Is it built automatically using OSG I/O plugins?
> What about DatabasePager?
>
> Thank you in advance.
>
> Best regards
> Ale
>
> ------------------
> Read this topic online here:
> http://forum.openscenegraph.org/viewtopic.php?p=69619#69619
>
>
>
>
>
> _______________________________________________
> 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