Is there a callback which fires up when osgEarth is done loading LODs?

classic Classic list List threaded Threaded
5 messages Options
omaralvarez omaralvarez
Reply | Threaded
Open this post in threaded view
|

Is there a callback which fires up when osgEarth is done loading LODs?

Just wanted to know if there is a way to know when osgEarth has finished loading stuff, like terrain and imagery. It would be even nicer if one could specify the desired LOD.

I have been looking at the first_lod map option, which I could use to calculate an intersection which should not intersect with anything if nothing has been loaded, but I don't feel like this is the proper way of doing this.

If anybody more experienced than me with osgEarth has any idea of how to do this please let me know. I have tried to look for pagedLOD callbacks, but I am not sure how stuff is loaded.
gwaldron gwaldron
Reply | Threaded
Open this post in threaded view
|

Re: Is there a callback which fires up when osgEarth is done loading LODs?

No, there's no callback for completion of an LOD. The closest thing is the TerrainCallback (on the Terrain interface) that will fire onTileAdded for individual tiles.
Glenn Waldron / Pelican Mapping
omaralvarez omaralvarez
Reply | Threaded
Open this post in threaded view
|

Re: Is there a callback which fires up when osgEarth is done loading LODs?

Thanks for the quick response.

I have seen that TerrainCallback has an _updateQueue. Is this a common queue for all the terrain? Could I check that queue to check if things have been loaded?

Are you guys interested in having this implemented? I could try to implement it myself with a little guidance and then create a pull request.

Cheers!
gwaldron gwaldron
Reply | Threaded
Open this post in threaded view
|

Re: Is there a callback which fires up when osgEarth is done loading LODs?

Not sure what you mean. That queue hold the onTileAdded notifications so they will execute during the update traversal.
Glenn Waldron / Pelican Mapping
omaralvarez omaralvarez
Reply | Threaded
Open this post in threaded view
|

Re: Is there a callback which fires up when osgEarth is done loading LODs?

Sorry for not explaining myself well. I was thinking of using that queue to check if everything has been loaded. I assume that when there are no more notifications, everything will be done loading. Would this be correct?