> From: Josh Babcock <[EMAIL PROTECTED]>
> 
> I can adjust the view offsets in the cockpit view, then switch to
> another view and back and those adjustments are still there. My question
> is, where is that data stored when I am in another view? The only place
> I can seem to find it in in current-view, but it is only visible there
> when I am in view 0. Obviously it is being copied somewhere else. Where?
> 

Are you a C++ programmer?  My answer assumes that you might not be, or are just 
starting out  (otherwise you'll just see that you missed the obvious :-)).  The 
"property" subsystem is a feature of FlightGear/SimGear.  C++ objects can 
contain data as C++ variables, but in the case of the FGViewer objects, only 
the CURRENT view (the one you see on the screen) is published to FlightGear's 
property tree.  All the viewer objects are still there (not destroyed) for as 
long as FlightGear is running, so when you switch back and forth between views 
you are always switching between the same instances of FGViewer and their 
respective offset values.

It sounds like you are reading code,  so don't forget to look at the 
viewmgr.?xx files.  Reading that as well will give you a better idea of how 
views are managed.  In a nutshell, only the current active view is updated 
(i.e. SGSubsystem::update).

Best,

Jim



_______________________________________________
Flightgear-devel mailing list
Flightgear-devel@flightgear.org
http://mail.flightgear.org/mailman/listinfo/flightgear-devel
2f585eeea02e2c79d7b1d8c4963bae2d

Reply via email to