Marble/TextureNG

    From KDE TechBase
    Revision as of 16:37, 16 December 2008 by Tampakrap (talk | contribs) (New page: NOTE: Some of the description below is of the status "Not Implemented Yet". Marble provides a sophisticated layer framework. Generally Marble is able to deal with several layers which c...)
    (diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)

    NOTE: Some of the description below is of the status "Not Implemented Yet".

    Marble provides a sophisticated layer framework.

    Generally Marble is able to deal with several layers which can consist of different datasets ("SubLayers"). E.g. an aerial map could consist of three different layers:

    * a layer that displays the aerial photo of the ground
    * a layer that shows the roads
    * a layer that shows clouds.
    

    In this case there would be three texture mapper objects needed. And each of them would deal with tiles that only consist of a single dataset.

    Alternatively an aerial map could also consist of a single layer which consists of different datasets that get merged together for each tile:

    * a dataset that displays the aerial photo of the ground
    * a dataset that shows the roads
    * a dataset that shows clouds.
    

    In this case there would only be a single texture mapper object. This single texture mapper would deal with tiles that contain all three datasets merged into a single tile.

    The class design works like this:

    TextureMapper

    For different projections and backends there exist different texture mapping classes. Each of these derives from the AbstractTextureMapper class. The texture mapping classes get the tiles that they need for texture mapping from the TileLoader Class.

    TileLoader

    The TileLoader class provides tile data needed for texture mapping. All tiles exist as objects of the type TextureTile (or: AbstractTile). As such it ensures that all tiles that are currently in use are kept in memory. It also ensures that depending on the distance to the ground there is a preferred tile level in use. All tiles that are currently displayed go into the TileHash. The tiles which have just recently been used go into the TileCache.

    TextureTile