1
0
Fork 0
No description
Find a file
david 7e93fca8ee Virtual cockpit patches from Andy Ross:
What the attached patch does is map your panel definition onto a (non
z-buffered) quad in front of your face.  You can twist the view around
and see it move in the appropriate ways.

Apply the patch (let me know if folks need help with that step), and
then set the /sim/virtual-cockpit property to true.  You can do this
on the command line with --prop:/sim/virtual-cockpit=1, or via the
property picker.  Bind it to a key for fast toggling if you like.

The default bindings don't allow for "panning" the view, so you'll
have to modify yours.  These are the mappings to my joystick's hat
switch, for those who need hints:

   <axis n="6">
    <desc>View Direction</desc>
    <low>
     <repeatable>true</repeatable>
     <binding>
      <command>property-adjust</command>
      <property>/sim/view/goal-offset-deg</property>
      <step type="double">1.0</step>
     </binding>
    </low>
    <high>
     <repeatable>true</repeatable>
     <binding>
      <command>property-adjust</command>
      <property>/sim/view/goal-offset-deg</property>
      <step type="double">-1.0</step>
     </binding>
    </high>
   </axis>

   <axis n="7">
    <desc>View Elevation</desc>
    <low>
     <repeatable>true</repeatable>
     <binding>
      <command>property-adjust</command>
      <property>/sim/view/goal-tilt-deg</property>
      <step type="double">1.0</step>
     </binding>
    </low>
    <high>
     <repeatable>true</repeatable>
     <binding>
      <command>property-adjust</command>
      <property>/sim/view/goal-tilt-deg</property>
      <step type="double">-1.0</step>
     </binding>
    </high>
   </axis>

While the current implementation is happy with just plastering the
panel's notion of "screen" into the 3D world, this is actually more
general.  Each panel can, in principle, have it's own coordinate
system, and you could build a cockpit out of a bunch of them.  The
mapping is specified by providing a 3D coordinate for three corners of
the quad the panel should be mapped to; this should be pretty simple
to work with.

All that's needed for a perfectly general solution is a convention on
where to store the information (a cockpit xml file, or put it in the
aircraft -set file, or...), and some work on the panel's coordinate
system conventions (some of which don't coexist very nicely with a
generalized 3D environment).  Combine that with a plib model for the
non-panel interior of the cockpit, and we're golden.

I'm actually really pleased with this.  It worked better and more
quickly than I could have imagined, and impact on the surrounding code
is quite light -- a few property tests only.  But some stuff is still
missing:

+ No equivalent work was done to the HUD, so it still displays
   incorrect headings when the view changes.  The use of pixel
   coordinates deep in the HUD code is going to give me fits doing the
   port, I sure.  It's not nearly so well put together as the panel
   (where I just changed the setup code -- none of the rendering code
   changed at all).

+ I forgot that the panel was clickable. :)  Input events still have
   the screen coordinates, which essentially kills the interactivity
   when in virtual cockpit mode.  This won't be hard to fix; it's only
   broken because I forgot the feature existed.

And one note about the implementation choice: to get away from the
inevitable near clip plane issue, the virtual cockpit renderer simply
disables the z buffer.  This means that cockpits built using these
panels need to be z-sorted, which isn't too hard since they are static
geometry.  It also means that no two "virtual panels" can ever be
allowed to interpenetrate.  No biggie.
2002-03-03 00:06:24 +00:00
docs-mini Tweaks from Julian Foad: 2002-02-05 04:42:39 +00:00
man Fixed description of the --time-offset option. 2002-02-14 03:57:22 +00:00
package/mandrake Initial revision. 2001-09-17 21:12:24 +00:00
src Virtual cockpit patches from Andy Ross: 2002-03-03 00:06:24 +00:00
tests -Removed .cvsignore from itself, since .cvsignore is now in the CVS 2001-12-12 04:15:23 +00:00
.cvsignore Ignore gmon.out, in case people are doing profiling runs. 2002-02-27 14:59:04 +00:00
acconfig.h Initial take of new environment subsystem. Configure with 2002-02-19 15:16:08 +00:00
acsite.m4 Packaging fixes. 1999-06-04 20:35:47 +00:00
am2dsp.cfg MSVC updates. 2002-02-05 22:28:31 +00:00
AUTHORS Initial revision. 1998-05-23 18:09:09 +00:00
autogen.sh Same autogen.sh tweak as for simgear to better handle irix vs. 2002-01-19 14:58:49 +00:00
ChangeLog Updated ... 2001-06-18 22:25:59 +00:00
config.guess Initial revision 1999-06-17 20:07:19 +00:00
config.sub Initial revision 1999-06-17 20:07:19 +00:00
FlightGear.dsp 0.7.9pre2 changes. 2002-02-13 16:03:54 +00:00
FlightGear.dsw Initial revision. 2000-10-16 22:02:10 +00:00
irix-hack.sh Detect Irix/CC compiler and substitute AR="CC -ar". 2001-06-01 17:13:03 +00:00
Makefile.am Same autogen.sh tweak as for simgear to better handle irix vs. 2002-01-19 14:58:49 +00:00
NEWS Finally 0.7.9 tweaks. 2002-02-16 17:40:34 +00:00
README Updates. 2000-02-15 23:32:26 +00:00
Thanks Update Norman's entry. 2002-02-15 06:37:10 +00:00

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 need 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
curt@flightgear.org

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!