Hello Erik,

sorry for the late reply.

> I'm trying to get this included in CVS but it is a bit out of sync.

yep, I'm really getting a bad conscience about posting an unsync'ed patch :-)
I'm a bit busy at the moment, but I'll try to find some time to get the
flightgear modifications sorted out (if you haven't done so already)...

Unfortunately, I did the necessary modifications in the same breath as the
scenery API restructuring, so I don't have anything which would apply to
current CVS. Anyway, I think I had that API nearly finished, maybe I'll be
able to get that into a 'commitable' state instead.

>   Calling set_tile_center is not needed anymore, right?
>   How do I handle situations where get_tile_center is called?

I think you can safely use globals->get_scenery()->get_center().
But IIRC, get_tile_center() was anyway mostly used as the (unnecessary)
parameter for the get_absolute_view_pos() call ...

Generally, relative coordinates should only be used locally, both in time
(because moving reference frames invalidate the old coordinates) and scope
(don't pass relative coordinates among objects or unrelated functions, which
might use different reference frames). If coordinates are passed as
SGLocation (i.e. absolute), there should be no problem, and I think that's
warranted with the current FG implementation.

The tile center can be managed outside the SGLocation class, e.g. by
getting it from the scenery instance or whatever reference frame is convenient
for local calculations. That's why I thought it would fit in with Mathias'


Flightgear-devel mailing list

Reply via email to