summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJohn Firebaugh <john.firebaugh@gmail.com>2014-08-05 17:19:33 -0700
committerJohn Firebaugh <john.firebaugh@gmail.com>2014-08-20 13:52:39 -0700
commit2660b7bd1b77d9571ceb12adfef4b83e56d8e0f0 (patch)
treed48bdef2a674bd551356ebf5e40b559ebd817ada
parent1a475ec26912156989ae02092e8213109a8befdf (diff)
downloadqtlocation-mapboxgl-2660b7bd1b77d9571ceb12adfef4b83e56d8e0f0.tar.gz
Rename existing interpolate -> resample
-rw-r--r--include/mbgl/geometry/interpolate.hpp13
-rw-r--r--include/mbgl/geometry/resample.hpp13
-rw-r--r--src/geometry/resample.cpp (renamed from src/geometry/interpolate.cpp)8
-rw-r--r--src/renderer/symbol_bucket.cpp6
4 files changed, 20 insertions, 20 deletions
diff --git a/include/mbgl/geometry/interpolate.hpp b/include/mbgl/geometry/interpolate.hpp
deleted file mode 100644
index 998cba31cd..0000000000
--- a/include/mbgl/geometry/interpolate.hpp
+++ /dev/null
@@ -1,13 +0,0 @@
-#ifndef MBGL_GEOMETRY_INTERPOLATE
-#define MBGL_GEOMETRY_INTERPOLATE
-
-#include <mbgl/geometry/anchor.hpp>
-#include <mbgl/util/math.hpp>
-
-namespace mbgl {
-
-Anchors interpolate(const std::vector<Coordinate> &vertices, float spacing,
- float minScale, float maxScale, float tilePixelRatio, int start = 0);
-}
-
-#endif
diff --git a/include/mbgl/geometry/resample.hpp b/include/mbgl/geometry/resample.hpp
new file mode 100644
index 0000000000..bcfe4ca53d
--- /dev/null
+++ b/include/mbgl/geometry/resample.hpp
@@ -0,0 +1,13 @@
+#ifndef MBGL_GEOMETRY_INTERPOLATE
+#define MBGL_GEOMETRY_INTERPOLATE
+
+#include <mbgl/geometry/anchor.hpp>
+#include <mbgl/util/math.hpp>
+
+namespace mbgl {
+
+Anchors resample(const std::vector<Coordinate> &vertices, float spacing,
+ float minScale, float maxScale, float tilePixelRatio, int start = 0);
+}
+
+#endif
diff --git a/src/geometry/interpolate.cpp b/src/geometry/resample.cpp
index 618136ff47..c40fc9bb0a 100644
--- a/src/geometry/interpolate.cpp
+++ b/src/geometry/resample.cpp
@@ -1,4 +1,4 @@
-#include <mbgl/geometry/interpolate.hpp>
+#include <mbgl/geometry/resample.hpp>
#include <mbgl/util/math.hpp>
@@ -15,9 +15,9 @@ const std::array<std::vector<float>, 4> minScaleArrays = {{
}};
-Anchors interpolate(const std::vector<Coordinate> &vertices, float spacing,
- const float /*minScale*/, float maxScale, const float tilePixelRatio,
- const int start) {
+Anchors resample(const std::vector<Coordinate> &vertices, float spacing,
+ const float /*minScale*/, float maxScale, const float tilePixelRatio,
+ const int start) {
maxScale = std::round(std::fmax(std::fmin(8.0f, maxScale / 2.0f), 1.0f));
spacing *= tilePixelRatio / maxScale;
diff --git a/src/renderer/symbol_bucket.cpp b/src/renderer/symbol_bucket.cpp
index 30110faf02..e8c0fd1829 100644
--- a/src/renderer/symbol_bucket.cpp
+++ b/src/renderer/symbol_bucket.cpp
@@ -5,7 +5,7 @@
#include <mbgl/geometry/sprite_atlas.hpp>
#include <mbgl/geometry/geometry.hpp>
#include <mbgl/geometry/anchor.hpp>
-#include <mbgl/geometry/interpolate.hpp>
+#include <mbgl/geometry/resample.hpp>
#include <mbgl/renderer/painter.hpp>
#include <mbgl/text/glyph_store.hpp>
#include <mbgl/text/placement.hpp>
@@ -218,8 +218,8 @@ void SymbolBucket::addFeature(const std::vector<Coordinate> &line, const Shaping
if (properties.placement == PlacementType::Line) {
// Line labels
- anchors = interpolate(line, properties.min_distance, minScale, collision.maxPlacementScale,
- collision.tilePixelRatio);
+ anchors = resample(line, properties.min_distance, minScale, collision.maxPlacementScale,
+ collision.tilePixelRatio);
// Sort anchors by segment so that we can start placement with the
// anchors that can be shown at the lowest zoom levels.