buggy line support

This commit is contained in:
Konstantin Käfer
2014-01-28 18:40:17 +01:00
parent 43ab6732d9
commit e359d697fb
16 changed files with 273 additions and 29 deletions

View File

@@ -1,7 +1,6 @@
#include <llmr/map/transform.hpp>
#include <llmr/util/mat4.hpp>
#include <llmr/util/math.hpp>
#include <cmath>
#include <cstdio>
using namespace llmr;
@@ -14,16 +13,7 @@ const double M2PI = 2 * M_PI;
const double A = 6378137;
Transform::Transform()
:
width(0),
height(0),
x(0),
y(0),
angle(0.0),
scale(1.0),
min_scale(pow(2, 0)),
max_scale(pow(2, 20)) {
Transform::Transform() {
setScale(scale);
setAngle(angle);
}
@@ -168,6 +158,10 @@ float Transform::getZoom() const {
return log(scale) / M_LN2;
}
int32_t Transform::getIntegerZoom() const {
return floor(log(scale) / M_LN2);
}
double Transform::getScale() const {
return scale;
}