[osg-users] Two questions about pagelod nodes

Robert Osfield robert.osfield at gmail.com
Wed Sep 26 06:56:07 PDT 2007


Hi David,

On 9/26/07, David _ <solid_davidian at hotmail.com> wrote:
> we´re workig with an osgdem generated island which is composed by a lot of
> pagelod nodes. We´re also letting the databasepageloader to load and offload
> nodes from memory. We need to know which nodes are visible and which nodes
> are being deleted from memory
>
> question 1 : Is there any way to know which nodes are visible just before
> the rendering traversals??

Its the cull traversal (the first half of renderingTraversals) which
determines what is visible, you can't determine what's visible before
this without doing your own mock cull traversal.

> question 2 : Is there any way to know which nodes are being deleted and
> execute a little piece of code before this happens??

The Viewer calls the database pager on each update traversal to merge
new and remove unused subgraphs.  You could override the
Viewer::updateTraversals() to customize this, doing an querry of the
DatabasePager yourself.

Robert.



More information about the osg-users mailing list