[prev in list] [next in list] [prev in thread] [next in thread] 

List:       flightgear-cvs
Subject:    [Flightgear-cvslogs] CVS: FlightGear/src/Scenery tileentry.cxx,1.9,1.10
From:       "Curtis L. Olson" <curt () seneca ! me ! umn ! edu>
Date:       2002-10-29 19:44:08
[Download RAW message or body]

Update of /var/cvs/FlightGear-0.9/FlightGear/src/Scenery
In directory seneca:/tmp/cvs-serv6632/Scenery

Modified Files:
	tileentry.cxx 
Log Message:
Andy Ross:

The biggest and coolest patch adds mouse sensitivity to the 3D
cockpits, so we can finally work the radios.  This ended up requiring
significant modifications outside of the 3D cockpit code.  Stuff folks
will want to look at:

+ The list of all "3D" cockpits is stored statically in the
   panelnode.cxx file.  This is clumsy, and won't migrate well to a
   multiple-aircraft feature.  Really, there should be a per-model list
   of 3D panels, but I couldn't find a clean place to put this.  The
   only handle you get back after parsing a model is a generic ssg
   node, to which I obviously can't add panel-specific methods.

+ The aircraft model is parsed *very* early in the initialization
   order.  Earlier, in fact, than the static list of allowable command
   bindings is built in fgInitCommands().  This is bad, as it means
   that mouse bindings on the instruments can't work yet.  I moved the
   call to fgInitCommands, but someone should look carefully to see
   that I picked the right place.  There's a lot of initialization
   code, and I got a little lost in there... :)

+ I added yet another "update" hook to the fgRenderFrame routine to
   hook the updates for the 3D panels.  This is only required for
   "mouse press delay", and it's a fairly clumsy mechanism based on
   frame rate instead of real time.  There appears to be delay handling
   already in place in the Input stuff, and there's a discussion going
   on about different mouse behavior right now.  Maybe this is a good
   time to unify these two (now three) approaches?



Index: tileentry.cxx
===================================================================
RCS file: /var/cvs/FlightGear-0.9/FlightGear/src/Scenery/tileentry.cxx,v
retrieving revision 1.9
retrieving revision 1.10
diff -C2 -r1.9 -r1.10
*** tileentry.cxx	24 Oct 2002 12:12:14 -0000	1.9
--- tileentry.cxx	29 Oct 2002 19:44:04 -0000	1.10
***************
*** 887,894 ****
          sgCopyVec3( lift_vec, up );
  
          double agl;
          agl = globals->get_current_view()->getAltitudeASL_ft()
!             * SG_FEET_TO_METER - globals->get_scenery()->get_cur_elev();
! 
          // sgTrans just happens to be the
          // vector from scenery center to the center of this tile which
--- 887,900 ----
          sgCopyVec3( lift_vec, up );
  
+         // we fudge agl by 30 meters so that the lifting function
+         // doesn't phase in until we are > 30m agl.
          double agl;
          agl = globals->get_current_view()->getAltitudeASL_ft()
!             * SG_FEET_TO_METER - globals->get_scenery()->get_cur_elev()
!             - 30.0;
!         if ( agl < 30.0 ) {
!             agl = 0.0;
!         }
!         
          // sgTrans just happens to be the
          // vector from scenery center to the center of this tile which


_______________________________________________
Flightgear-cvslogs mailing list
Flightgear-cvslogs@flightgear.org
http://mail.flightgear.org/mailman/listinfo/flightgear-cvslogs
[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic