Today I have reorganized the <view> handling and added a new view mode. It's still work in progress, but looks quite nice already: "Fly-By View" This picks a view position somewhere ahead and lets the aircraft fly by, then searches a new position etc. Nice for replay, or for experiencing how fast the aircraft actually flies. (From cockpit view it looks always slow. ;-) I still need to tweak the parameters and to prevent updates when the aircraft has barely moved.
The reorganization part was desirable, because until today the different <view>s had to have continuous indices. When FlightGear predefined <view n="0"> to <view n="5">, then aircraft had to continue with <view n="6">. A lot of aircraft did that, but whenever one removed or added a generic view, all aircraft <view> definitions had to be moved, which was a huge PITA. Now indices of <view> definitions can be freely assigned. To avoid further, unnecessary collisions, I "suggest" (well, *demand* :-) that aircraft use indices starting with 100, leaving 0..99 for the "system". (Remember that you don't have to specify the index in every definition. Setting n="100" in one will automatically set the next to 101 etc., unless otherwise specified. I've also made a minor change to the way numbers are interpreted when written to /sim/current-view/view-number: 0 and positive numbers are treated like they used to, so everything works like before: they select the (n-1)th <view>. But now that holes are allowed, this does no longer necessarily match the node index. To select a view with particular node index (e.g. the aircraft's <view n="100">, one can write that as negative number: setprop("/sim/current-view/view-number", -100); This will, of course, immediately be turned into the normal index (let's say 6), I expect that everyone forgets this feature quickly, and that nobody uses it, except maybe a few notorious C++ code readers. ;-) m. ------------------------------------------------------------------------- This SF.net email is sponsored by DB2 Express Download DB2 Express C - the FREE version of DB2 express and take control of your XML. No limits. Just data. Click to get it now. http://sourceforge.net/powerbar/db2/ _______________________________________________ Flightgear-devel mailing list Flightgear-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/flightgear-devel