David Megginson writes:
> I would like to make it possible to specify the elevation of static
> and shared objects AGL as well as ASL, but for that, I need to know
> the elevation ASL at a specific location (not the current view
> position).  I have taken a look at the fgCurrentElev() functions in
> hitlist.cxx and (I think) supplied the right parameters, but I'm
> getting no intersection.
> 
> The problem location is tileentry.cxx -- search for "OBJECT_STATIC" to
> find the right chunk of code.  Somehow, there, I want to be able to
> determine what ground elevation is at the lon/lat supplied.

Norman Vine is the architect of the ground intersection code and it is
sufficiently complicated that probably no one else has dug in and
tried to understand it ... it's also heavily optimized which is good
for fps, but bad for anyone else trying to grok it.

FWIW, it would be handy to have a general intersection API so you
could specify any vector and get back the intersection points with
terrain.  This would allow you to test if you have line of sight with
a navaid, test if you one chunk of terrain is shading another, might
be useful for some sort of ground collision avoidance system, etc.

It would also be nice to do interesections at tile load time so when
you specify objects in the .stg file, you can just give them a lat/lon
and let the system position them correclty on the ground surface.

Curt.
-- 
Curtis Olson   IVLab / HumanFIRST Program       FlightGear Project
Twin Cities    [EMAIL PROTECTED]                  [EMAIL PROTECTED]
Minnesota      http://www.menet.umn.edu/~curt   http://www.flightgear.org

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

Reply via email to