Curtis L. Olson writes: >Jon S Berndt writes: >> Curtis L. Olson wrote: >> >> Andy Ross writes: > >> >> > and the code to calculate the scenery center for each tile can >> >> > simply go away. >> >> >This however isn't true. You still need to have an 'origin' for each >> >scenery tile so you know how to translate it relative to your scenery >> >center point (now perhaps they eye.) The scenery center point defines >> >our (0,0,0) for our world as opengl sees it. If this point is always >> >coincident with the eye point, then we would have to continually be >> >reshifting each of the scenery tile transforms. >> >> I don't know if this applies at all, but it worries me to >> hear what Andy wrote about the code going away. Will this >> have any impact on the ability to calculate the location, >> height, and orientation of an aircraft on a tile given the >> tile may have a non-vertical normal? >> >> This stuff sounds like a candidate for a branch in the >> code... > >Ahhh, Jon, that's a good point. If we make changes that affect the >scenery center and all the terrain transforms we definitely will need >to make sure that we don't break the line/terrain intersection code.
I think all that is needed is the transform that will take the points returned by the line/terrain intersection code to where they would have been if we were using the original VIEW transform and still doing the individual 'preptile()' translates before making the sgGeocToGeod() call inside fgCurrentElev(). However exactly what this transform 'will be' I am not sure of FWIW Studying Dave's profiling statistics leads me to believe that resetting all the transforms with in the SceneGraph, what we essentially end up doing when we translate all the individual tiles in tilemgr::prep_tiles is in the neigborhood of ~2% of the total time taken per frame. So even if we had to do this twice, once for terrain intersection and once for rendering it wouldn't be catastrophic and may be a cheap enough price to pay, if needed, for the cleaner 'VIEW' Cheers Norman _________________________________________________________ Do You Yahoo!? Get your free @yahoo.com address at http://mail.yahoo.com _______________________________________________ Flightgear-devel mailing list [EMAIL PROTECTED] http://mail.flightgear.org/mailman/listinfo/flightgear-devel