Best way to update icons over time from file?

classic Classic list List threaded Threaded
2 messages Options
Miles Miles
Reply | Threaded
Open this post in threaded view
|

Best way to update icons over time from file?

What we are trying to do is update everything we have displayed on the globe based on data we read from a file that is time based (i.e. we read all the data for one time step and then want to update the items on the globe all at once based on that new information). Currently what we have is using osgEarth::Viewer and calling Viewer.addUpdateOperation (new UpdatePicIcons()), which calls an update function for our models currently. In conjunction with that we use Viewer.setRunFrameScheme(Viewer.CONTINUOUS). Is this the most efficient way to do this or is there something more robust we can do? Knowing what triggers a redraw/refresh of what is on the globe would also be helpful. If we want to update a single item that is drawn on the globe, how do we trigger that update to happen immediately?

We also need to capture messages coming across asocket from another application that trigger things to happen in our osgEarth application. Is our above mechanism the best way to capture those messages?
Using osgEarth to create a full functioning 3D modelling apparatus for simulation with TBE.
gwaldron gwaldron
Reply | Threaded
Open this post in threaded view
|

Re: Best way to update icons over time from file?

Miles,
This is a fine way to go about it. Making changes during the Update traversal is the correct approach. And since you are using Frame Scheme "continuous" you don't need to worry about refresh triggers.
Glenn Waldron / Pelican Mapping