This commit is contained in:
Hannes Janetzek 2013-09-20 13:55:47 +02:00
parent f049673412
commit 4fadd929ee

View File

@ -18,19 +18,26 @@ package org.oscim.utils;
import org.oscim.core.Tile; import org.oscim.core.Tile;
/** /**
* Scan-line fill algorithm to retrieve tile-coordinates. * Scan-line fill algorithm to retrieve tile-coordinates from
* Viewport.
* <p>
* ScanBox is used to calculate tile coordinates that intersect the box (or
* trapezoid) which is the projection of screen bounds to the map. Usage:
* *
* ScanBox is used to calculate tile coordinates that intersect * <pre>
* the box (or trapezoid) which is the projection of screen
* bounds to the map.
*
* use:
* Viewport.getMapViewProjection(box) * Viewport.getMapViewProjection(box)
* yourScanBox.scan(pos.x, pos.y, pos.scale, zoomLevel, coords); * ScanBox sb = new ScanBox(){
* @Override
* protected void setVisible(int y, int x1, int x2) {
* }
* };
* sb.scan(pos.x, pos.y, pos.scale, * zoomLevel, coords);
* *
* where zoomLevel is the zoom-level for which tile coordinates * </pre>
* should be calculated. *
* */ * where zoomLevel is the zoom-level for which tile coordinates should be
* calculated.
*/
public abstract class ScanBox { public abstract class ScanBox {
private final float[] mBox = new float[8]; private final float[] mBox = new float[8];