On 12/16/02 at 12:07 PM David Luff wrote:
>Some time ago (Sept/Oct) there was a long discussion about getting the
>ground elevation at an arbitrary point which left me very confused after
>reading it and didn't seem to come to any definate conclusion.  What is
the
>situation at the moment?  Is there a function like
>
>double GetGroundElev(Point3D lat_and_lon_of_somewhere)
>
>anywhere which will return the ground elev if the appropriate tile is
>already loaded and a distinctive value (-9999?) if the tile is not loaded?
>

Well, the fgCurrentElev(...) functions in hitlist.[ch]xx look promising,
but I might need a bit of help figuring out how to use them:

// Associated functions, assuming a wgs84 world with 0,0,0 at the
// center, find the current terrain intersection elevation for the
// point specified.
bool fgCurrentElev( sgdVec3 abs_view_pos,
                    sgdVec3 scenery_center,
                    ssgTransform *terra_transform,
                    FGHitList *hit_list,
                    double *terrain_elev,
                    double *radius,
                    double *normal );

bool fgCurrentElev( sgdVec3 abs_view_pos,
                    sgdVec3 scenery_center,
                    FGHitList *hit_list,
                    double *terrain_elev,
                    double *radius,
                    double *normal );

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?  What is the
abs_view_pos?  Is this perhaps the point at which we get the elev, or is
this the direction vector in which we are looking?  What is the hit_list
and can I ignore it - ie. just use a local one and discard it, eg:

{
    FGHitList tempHitList;
    bool haveIntersection = fgCurrentElev( ..., ..., &tempHitList, ...,
..., ...);
}

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?
Sorry for all the questions at once - this is all a bit daunting to me and
I haven't poked my head into the "3D" bits of Flightgear for a while.

Cheers - Dave


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

Reply via email to