1
0
Fork 0
flightgear/src/FDM
ehofman 4c10ef139c Mathias:
I have done a patch to eliminate the jitter of 3D-objects near the viewpoint
(for example 3D cockpit objects).
The problem is the roundoff accuracy of the float values used in the
scenegraph together with the transforms of the eyepoint relative to the
scenery center.

The solution will be to move the scenery center near the view point.
This way floats relative accuracy is enough to show a stable picture.

To get that right I have introduced a transform node for the scenegraph which
is responsible for that shift and uses double values as long as possible.
The scenery subsystem now has a list of all those transforms required to place
objects in the world and will tell all those transforms that the scenery
center has changed when the set_scenery_center() of the scenery subsystem is
called.
The problem was not solvable by SGModelPlacement and SGLocation, since not all
objects, especially the scenery, are placed using these classes.

The first approach was to have the scenery center exactly at the eyepoint.
This works well for the cockpit.
But then the ground jitters a bit below the aircraft. With our default views
you can't see that, but that F-18 has a camera view below the left engine
intake with the nose gear and the ground in its field of view, here I could
see that.
Having the scenery center constant will still have this roundoff problems, but
like it is now too, the roundoff error here is exactly the same in each
frame, so you will not notice any jitter.

The real solution is now to keep the scenery center constant as long as it is
in a ball of 30m radius around the view point. If the scenery center is
outside this ball, just put it at the view point.

As a sideeffect of now beeing able to switch the scenery center in the whole
scenegraph with one function call, I was able to remove a one half of a
problem when switching views, where the scenery center was far off for one or
two frames past switching from one view to the next. Also included is a fix
to the other half of this problem, where the view position was not yet copied
into a view when it is switched (at least under glut). This was responsible
for the 'Error: ...' messages of the cloud subsystem when views were
switched.
2005-04-29 14:38:24 +00:00
..
Balloon A hack to prevent a devide by zero sotuation. Should we still leave the balloon in CVS without WeatherCM? 2004-03-22 10:59:08 +00:00
ExternalNet Fix my mailing address by replacing it with my web page. 2004-11-19 22:10:41 +00:00
ExternalPipe This is a work in progress. I am extending the "ExternalPipe" protocol to 2005-04-19 01:44:56 +00:00
JSBSim Make sure snprintf can be found 2005-02-02 08:47:33 +00:00
LaRCsim Fix my mailing address by replacing it with my web page. 2004-11-19 22:10:41 +00:00
SP Mathias Fröhlich: 2004-11-22 10:10:33 +00:00
UIUCModel Add extern "C" wrappers. 2004-03-16 20:44:00 +00:00
YASim Fix units bug with fuel flow 2005-04-13 19:42:29 +00:00
.cvsignore -Removed .cvsignore from itself, since .cvsignore is now in the CVS 2001-12-12 04:15:23 +00:00
Balloon.cxx #include <config.h> where needed for cygwin/gcc-3.2. 2002-12-03 14:59:24 +00:00
Balloon.h Major overhaul: 2002-05-11 16:28:50 +00:00
flight.cxx Mathias Fröhlich: 2004-11-22 10:10:33 +00:00
flight.hxx Mathias Fröhlich: 2004-11-22 10:10:33 +00:00
groundcache.cxx Mathias: 2005-04-29 14:38:24 +00:00
groundcache.hxx Mathias Fröhlich: 2004-12-08 14:48:06 +00:00
MagicCarpet.cxx Fix my mailing address by replacing it with my web page. 2004-11-19 22:10:41 +00:00
MagicCarpet.hxx Fix my mailing address by replacing it with my web page. 2004-11-19 22:10:41 +00:00
Makefile.am Mathias Fröhlich: 2004-11-22 10:10:33 +00:00
NullFDM.cxx Fix my mailing address by replacing it with my web page. 2004-11-19 22:10:41 +00:00
NullFDM.hxx Fix my mailing address by replacing it with my web page. 2004-11-19 22:10:41 +00:00
UFO.cxx Fix my mailing address by replacing it with my web page. 2004-11-19 22:10:41 +00:00
UFO.hxx Fix my mailing address by replacing it with my web page. 2004-11-19 22:10:41 +00:00