1
0
Fork 0
flightgear/src
Julian Smith 1bafe15c4c Added highlighting system.
If /sim/highlighting/enabled is true, we highlight animated objects under the
pointer, and also highlight other objects that are animated by the same or
related properties.

The intent here is to be able to give a visual indication of what cockpit
controls do or what cockpit controls affect particular aircraft objects - for
example moving the pointer over the flaps will highlight the flaps and also
highlight any controls or rotary indicators in the cockpit that are associated
with the flaps.

To make this work, we have to discover associations between properties. This
is currently done for YASim (e.g. associations between /controls/flight/flaps
and /surface-positions/flap-pos-norm) and autopilot filters (e.g. with
the 777, digital filters associate /controls/flight/rudder-nul with
/fcs/fbw/yaw/rudder-ratio-out). We don't currently gather associations between
properties in JSBSim

We also detect associations between dialogs, menus and keypresses and
properties, which is used to populate /sim/highlighting/current with
information about dialogs, menus and keypresses that are associated with the
currently highlighted nodes' properties.

Details:

src/GUI/Highlight.cxx
src/GUI/Highlight.hxx
src/GUI/CMakeLists.txt
src/Main/fg_init.cxx
    New subsystem called 'highlight', with support for registering and
    recovering links between menus, dialogs, keypresses and OSG node
    animations.

    Provides a function Highlight::highlight_nodes() which highlights
    related nodes using internal NodeHighlighting class, and populates
    /sim/highlighting/current with information about related dialogs, menus and
    keypresses.

    The NodeHighlighting class works by making nodes use an alternative
    StateSet which shows up as a distinct material on screen. We remember each
    highlighted node's original StateSet so that we can un-highlight. We update
    the material parameters using a listener for /sim/highlighting/material,
    which allows some control over the appearence of highlighted nodes.

src/FDM/flight.cxx
src/FDM/flight.hxx
    Added virtual method FGInterface::property_associations() which returns
    property associations from the FDM. Default implementation returns empty
    set. Implemented in YASim, but not (yet) in JSBSim. Uses a simple function
    pointer at the moment to avoid requring FDMs to use recent C++ features.

src/FDM/YASim/FGFDM.cpp
src/FDM/YASim/FGFDM.hpp
src/FDM/YASim/YASim.cxx
src/FDM/YASim/YASim.hxx
    Gathers information about property associations on startup such as
    /controls/flight/flaps => /surface-positions/flap-pos-norm, then
    YASim::property_associations() overrides default implementation to return
    these associations.

src/Autopilot/analogcomponent.cxx
src/Autopilot/analogcomponent.hxx
src/Autopilot/digitalfilter.cxx
src/Autopilot/inputvalue.cxx
src/Autopilot/inputvalue.hxx
    Filters now gather information about their input/output properties and
    register with Highlight::add_property_property(). For example this makes
    highlighting work on the 777, where pilot controls affect control surfaces
    only via filters.

src/GUI/new_gui.cxx
    Scan menus, keypresses and dialogs and register associations with
    Highlight::add_*().

src/GUI/property_list.cxx
src/GUI/property_list.hxx
src/GUI/FGPUIDialog.cxx
    Added <readonly> flag to property-list. If set, we don't show .. or . items
    and don't respond to mouse/keyboard.

    Used by fgdata's new Highlighting dialogue.

src/Model/acmodel.cxx
src/Model/acmodel.hxx
    Visit the user aircraft's scene graph when it is loaded, gathering
    information about osg::Node's that are animated by properties, and register
    these associations with Highlight::add_property_node().

src/Viewer/renderer.cxx
    When scanning for pick highlights, use Highlight::highlight_nodes() to
    highlight animated objects under the pointer and related objects.
2021-10-08 06:13:04 +01:00
..
Add-ons Typo in "Addon-config: don’t overwrite autosaved props" (ticket 2059) 2021-08-20 16:53:37 +02:00
AIModel * Improved lead distance & handling of sharp turns 2021-09-30 11:20:11 +01:00
Aircraft src/Aircraft/replay.cxx: fix bug with end of replay end when recording multiplayer. 2021-07-31 10:29:11 +01:00
Airports * Improved lead distance & handling of sharp turns 2021-09-30 11:20:11 +01:00
ATC Guard against a possible crash in TowerController 2021-09-02 11:29:02 +01:00
Autopilot Added highlighting system. 2021-10-08 06:13:04 +01:00
Canvas Canvas: Do not hold a reference to the GUI camera 2021-08-31 18:15:28 +02:00
Cockpit Remove Sentry XML error suppression 2021-07-28 13:45:23 +01:00
EmbeddedResources CMake: make another object dependency explicit 2021-03-10 10:17:15 +00:00
Environment Fixed some snprintf buffer size warnings and added comments about possibly unused variables. 2021-08-06 19:20:18 +01:00
FDM Added highlighting system. 2021-10-08 06:13:04 +01:00
GUI Added highlighting system. 2021-10-08 06:13:04 +01:00
Include VR: Implement minimal VR support 2021-09-03 12:09:20 +01:00
Input Remove Sentry XML error suppression 2021-07-28 13:45:23 +01:00
Instrumentation src/Instrumentation/tcas.*: condensed checking of transponder. 2021-09-25 10:56:06 +01:00
Main Added highlighting system. 2021-10-08 06:13:04 +01:00
Model Added highlighting system. 2021-10-08 06:13:04 +01:00
MultiPlayer Allow AI carrier to be always tied exactly to MP carrier. 2021-06-25 11:08:12 +01:00
Navaids Add ability to override airport runway definitions by creating a rwy_override.xml file which allows procedures to be loaded for airports which have new runway numbering 2021-08-04 10:27:40 +01:00
Network swift: COM volume support 2021-09-06 14:12:42 +01:00
Radio Fix shadowing of static variable in ITM adiff() function 2019-08-07 16:02:45 +02:00
Scenery Reduce warning log spam in NaN position. 2021-06-24 15:24:20 +01:00
Scripting src/Scripting/NasalSys.cxx: simplified FGNasalSys::logNasalStack(). 2021-08-26 22:24:12 +01:00
Sound Remove Sentry XML error suppression 2021-07-28 13:45:23 +01:00
Systems Missed check for a readProperties file check 2020-11-12 09:35:19 +00:00
Time Avoid crash on tests with no TZ set 2021-07-21 10:58:27 +01:00
Traffic Remove Sentry XML error suppression 2021-07-28 13:45:23 +01:00
Viewer Added highlighting system. 2021-10-08 06:13:04 +01:00
CMakeLists.txt Switch to using OBJECT library for main build 2021-03-08 16:59:14 +00:00