[osg-users] PagedLOD: Notification or callback when an LOD is changed.

2008-02-01 Thread Brad Colbert
Hi folks, I guess this question is applicable for an LOD database as well. Here is the background of my question, and please forgive me if this has already been asked and answered. I have a terrain database for which I load buildings and lights separately. I clamp the buildings and lights to

Re: [osg-users] PagedLOD: Notification or callback when an LOD is changed.

2008-02-01 Thread Brian
Hi Brad, I would recommend you read through the PagedLOD.cpp file especially the traverse() function. There isn't a callback for when the LOD changes happen. You could create an UpdateCallback() that would calculate the current LOD, but it sounds awful complex and error prone. osgdem

Re: [osg-users] PagedLOD: Notification or callback when an LOD is changed.

2008-02-01 Thread Brian R Hill
- Add a user data variable to the LOD that identifies the last LOD child that the attach was done for. - Add a cullcallback to all LOD children that checks if the parent LOD's user data variable is different than the current child. If it's different then you need to reattach, then reset the parent