No description
5772325bc6
Currently this works for all the default views except for Tower Look From (for which it doesn't really make sense) and Fly-by View. We now search for and load a -set.xml that matches the model .xml, when new multiplayer aircraft is set up. This allows us to find view offsets etc, e.g. allowing cockpit and helicopter views to work with multiplayer aircraft. Properties from the -set.xml are placed into /ai/models/multiplayer[]/set, so for example viewing offsets are in /ai/models/multiplayer[]/set/sim/view[]/config/target-{x,y,z}-offset-m. We also copy the aircraft's chase-distance into the view config params, similar to how fgdata:defaults.xml does for the user's aircraft. And we also fill in views' missing offsets from the Helicopter View config; e.g. this enables the new Tower View AGL to show aircraft correctly centred, despite aircraft currently not having this view defined in their -set.xml. [We don't currently attempt to cache or reuse -set.xml data.] Have ensured that view position responds to mouse movement in the same way for viewing the user's aircraft as for multiplayer aircraft (previously, Model View reversed the affect of vertical mouse movements). Added new Tower AGL view. Behaves similarly to Tower view, but automatically scales and pans vertically in order to always show the vertical range extending from just above the aircraft down to the ground immediately below the aircraft. We use aircrafts chase-distance as an indication of size. We damp the ground level value to reduce the viewing jumping around too much e.g. if the aircraft flies over buildings. The amount of damping is set by fgdata:defaults.xml's lookat-agl-damping value. Fixed problem where Tower View eye position moves slightly as target aircraft heading changes. This was caused by us unnecessarily applying the aircraft-centre correction to the eye position. src/FDM/flight.cxx: also make /orientation/true-heading-deg. This allows local orientation to be used like multiplayer orientation, which only has /ai/models/multiplayer[]/orientation/true-heading-deg. [A better fix might be to replace all occurrencies of /orientation/true-heading-deg with /orientation/heading-deg, but this would be a rather large commit.] Details: src/Viewer/view.*: removed View::updateData() as is no longer required. src/MultiPlayer/multiplaymgr.cxx: use helicopter view target offsets as defaults. E.g. in tower view agl, aircraft won't currently be defining these offsets. More generally, this allows aircraft to define target offsets only in helicoter view. src/FDM/flight.cxx FGMultiplayMgr::FillMsgHdr(): Added tie of /orientation/true-heading-deg to get_Psi_deg, so it duplictes the existing /orientation/heading-deg. src/MultiPlayer/multiplaymgr.cxx src/MultiPlayer/multiplaymgr.hxx FGMultiplayMgr::addMultiplayer(): look for and load -set.xml that matches the model. Patch various view-related things up in similar way to what we do for the user's aircraft, so that multiplayer views work. Made FGMultiplayMgr::getMultiplayer() public, so it can be used by src/Viewer/view.cxx. src/Viewer/view.cxx src/Viewer/view.hxx View::View(): Added lookat_agl, lookat_agl_damping params for new Tower View AGL. Preserve user's field-of-view in separate variable so that Tower View AGL can modify the actual field of view independently. Added view_index param so that we can find multiplayer view[]/config/ properties. getViewOffsets(): new fn that finds view offsets for user aircraft or multiplayer aircraft. View::recalcLookFrom() View::recalcLookAt: Lots of changes to allow things to work with multiplayer aircraft. View::recalcLookAt() can now do Tower View AGL. View::Damping: support for damping, used by Tower View AGL. Might be good to use this for other damping. View::updateData(): removed, as calculations are now all done inside View::recalc*(). put properties {x,y,z}-offset-m into new View::_adjust_offset_m member instead of _offset_m. This avoids confusion between a view's offsets and the offsets added in by the user via the 'Adjust View Position' dialogue. src/Viewer/viewmgr.cxx FGViewMgr::init(): pass view number to flightgear::View::createFromProperties(). |
||
---|---|---|
3rdparty | ||
CMakeModules | ||
docs-mini | ||
examples/netfdm | ||
icons | ||
man | ||
package | ||
scripts | ||
src | ||
test_suite | ||
utils | ||
.clang-format | ||
.gitignore | ||
AUTHORS | ||
ChangeLog | ||
CMakeLists.txt | ||
COPYING | ||
INSTALL | ||
NEWS | ||
README | ||
README.cmake | ||
README.msvc | ||
README.OSG | ||
README.plib | ||
README.SimGear | ||
README.sound | ||
Thanks | ||
version |
Welcome to the FlightGear Flight Simulator project. =================================================== The primary web page for this project is: http://www.flightgear.org For basic installation instructions see the "INSTALL" file. Before you can run FlightGear you will also need to download and install the "base" package which is a collection of textures, sounds, sample scenery, and other data files needed by the sim. For additional install help for specific platforms please browse the "docs-mini/" subdirectory. More complete documentation is available from our web page as a separate distribution. Please take a look at the "Thanks" file for a list of people who have contributed to this project. If you have contributed something but don't find your name in this file. Please send a polite reminder to http://www.flightgear.org/~curt For a summary of changes/additions by version see the "NEWS" file. This project is GPL'd. For complete details on our licensing please see the "COPYING" file. For information on available mailing lists, mailing list archives, and other available source code and documenation, please visit our web site. FlightGear is a product of the collaboration of large international group of volunteers. FlightGear is a work in progress. FlightGear comes with no warrantee. We hope you enjoy FlightGear and/or find it of some value!