1
0
Fork 0

Oops, fixing the ghosts of bugs past. :-) Good thing I remembered how I

fixed this when I made the mistake the first time.
The view code wasn't properly handling the transition across tile
boundaries so we'd get a 'flash' of the scene wrongly transformed for
one frame at every tile boundary crossing.  This is what
scenery.get_next_center() is for.
This commit is contained in:
curt 2002-03-17 00:36:39 +00:00
parent 2c4eb0c56b
commit 56d6ecbf83

View file

@ -107,7 +107,7 @@ FGViewPoint::recalc () const
Point3D p = Point3D(_lon_deg * SG_DEGREES_TO_RADIANS,
lat_geoc_rad,
sea_level_radius_m);
Point3D tmp = sgPolarToCart3d(p) - scenery.get_center();
Point3D tmp = sgPolarToCart3d(p) - scenery.get_next_center();
sgSetVec3(_zero_elev_view_pos, tmp[0], tmp[1], tmp[2]);
// Calculate the absolute view position
@ -120,9 +120,9 @@ FGViewPoint::recalc () const
// from the scenery center.
sgdVec3 scenery_center;
sgdSetVec3(scenery_center,
scenery.get_center().x(),
scenery.get_center().y(),
scenery.get_center().z());
scenery.get_next_center().x(),
scenery.get_next_center().y(),
scenery.get_next_center().z());
sgdVec3 view_pos;
sgdSubVec3(view_pos, _absolute_view_pos, scenery_center);
sgSetVec3(_relative_view_pos, view_pos);