Andy Ross writes:
> Good point, I overstated.  The code to compute an exact center is not
> longer an issue (any vertex on the tile will do) but clearly it has to
> be stored somewhere.  Still, getting it out of the way of the view
> code can't do anything but help modularity.

Right, but at some point we have to convert from earth centered
cartesian coordinates into local tile centered cartesian coordinates
so that we can place the opengl view in the correct place relative to
the scenery.

   view_pos = world_pos - current_scenery_center

> I think this is OK, no?  The vertices are stored as a big float
> table inside the tile, relative to the (global, double-valued)
> centroid location.  Just push a tile-centroid-to-viewpoint offset
> matrix onto the stack before rendering each tile, and things should
> work.  I may have missed something, but this sounds right to me.
> It's basically the same operation that happens already, but done
> inside the tile relative to the viewpoint, rather than in the view
> code relative to the tile centroid.  You say potato, I say...

Yah, pretty much ... too late for me to be splitting hairs here. :-)

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