David Luff <[EMAIL PROTECTED]> said:

> 
> What does the scenery_center refer to?  Is this the exact location at which
> I receive the terrain_elev, or the center of the tile?
Neither actually, but it is a tile center.  It is usually the center of the
tile that the aircraft is currently located over.  You're query location needs
to be reasonably close to the scenery_center to get a good elevation. 
Depending on what you are doing (e.g. placing buildings) the the current FDM
scenery_center is probably good enough.

Take a look at the code under "Tile Manager Updates" to approx line 1200 in
main.cxx, to see how the query works.  Note that prep_ssg_nodes needs to be
run to reallign the scenery vertices if you change the scenery center, before
doing a query.

> What is the abs_view_pos?
This is where you are.  If I recall this is in geocentric coordinates.  Same
units as the scenery_center.

> or do I need to pay more attention to it?  Lastly, what do the radius and
> normal refer to - bounding sphere and normal of the specific intersected
> polygon perhaps?
IIRC the normal would be the straight down vector to the intersecting ground
polygon.  

It seems to me that Norman recently made some changes that simplified what you
are trying to do.  Not sure if they are in CVS or not.

There's a good chance you can use the same technique I used (see that main.cxx
reference) depending on what you want to do.  Just heed the comment 
around line 1227...the view location update/query needs to be done last before
the rendering.

Best,

Jim

_______________________________________________
Flightgear-devel mailing list
[EMAIL PROTECTED]
http://mail.flightgear.org/mailman/listinfo/flightgear-devel

Reply via email to