Port scanline algorithm from _getCoveringTiles()

fixes #22
This commit is contained in:
Konstantin Käfer
2014-03-04 14:50:17 +01:00
parent ed5e335da1
commit ba5070bf52
7 changed files with 133 additions and 32 deletions

View File

@@ -0,0 +1,13 @@
#ifndef LLMR_MAP_COVERAGE
#define LLMR_MAP_COVERAGE
#include <llmr/util/vec.hpp>
#include <forward_list>
namespace llmr {
std::forward_list<vec3<int32_t>> covering_tiles(int32_t zoom, const box& points);
}
#endif

View File

@@ -51,7 +51,7 @@ public:
void stopScaling();
// Temporary
void mapCornersToBox(uint32_t z, box& b) const;
box mapCornersToBox(uint32_t z) const;
private:
void setScaleXY(double new_scale, double xn, double yn, double duration = 0);

View File

@@ -55,6 +55,7 @@ struct vec4 {
struct box {
vec2<double> tl, tr, bl, br;
vec2<double> center;
};
}