Tile Splitting:
(These functions were skipped in the previous commit for GisTile)
To update a set of tiles, the plugin responsible for the tiles needs
to periodically call the update function which will split any tiles
that are below the viewers desired resolution.
Unlike the WmsInfo method, the tiles are not automatically updated
when a particular tile is requested. (In fact, requesting a particular
tile is rarely done).
Tile Rendering:
Rendering with GisTile is significantly different than with WmsInfo
and fans. This difference is easily explained with some pseudocode:
Old way:
for triangle in mesh:
for tile in find_tiles(triangle):
render(triangle, tile.texture)
New way:
for tile in tiles:
for triangle in find_triangles(tile):
render(triangle, tile.texture)
Both find_tiles and find_triangles are O(log n) operations in the
worst case, but I think using find_triangles should result in faster
code because find_triangles can quickly return a large group of tiles,
while the find_tile function typically reruns a single tile. There's
additional discussion of this in the source code.
From an implementation standpoint, the new way makes it easier to add
plugins. With the old way, the find_tiles function was invoked by a
function pointer attached to the sphere, which makes rendering
multiples layers of tiles difficult. In the new, each plugin just
calls the render_tiles function which renders a set of tiles
(recursively) on top of the sphere.