On 12/16/02 at 3:10 PM Jim Wilson wrote:

>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.

It's for the AI plane during taxiing and takeoff/landing run.  In order to
generate realistic radio traffic these may need to exist some distance from
the fdm, but I guess that the rendering accuracy required decreases the
further they are from the user.  Going under the ground is not an option
though if they are within sight of the user, unlike a building which may
simply become less tall.

>
>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.

OK, I think I see what you're doing - changing the scenery center to the
point of interest and then changing it back again when done.  How expensive
is this operation in the scheme of things - I see you do it every frame if
the view location is different so I presume it can't be too bad?

>
>> 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.
>

Thanks for the reply - I'll give it a go roughly along the lines of what
you've done and see what happens!

Cheers - Dave



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

Reply via email to