diff options
author | John Firebaugh <john.firebaugh@gmail.com> | 2016-05-12 11:45:12 -0700 |
---|---|---|
committer | John Firebaugh <john.firebaugh@gmail.com> | 2016-05-13 09:01:32 -0700 |
commit | 39da776bd7f696351364440427a6cd0b8fc3589e (patch) | |
tree | bb48c1dcb873c0971c3950968a1cfad1833dccb3 /src/mbgl/text/collision_tile.cpp | |
parent | 9a7b7f6af3894abfb6f15e826e33b88073d117f0 (diff) | |
download | qtlocation-mapboxgl-39da776bd7f696351364440427a6cd0b8fc3589e.tar.gz |
[core] Use mapbox::geometry::{box,envelope}
Diffstat (limited to 'src/mbgl/text/collision_tile.cpp')
-rw-r--r-- | src/mbgl/text/collision_tile.cpp | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/mbgl/text/collision_tile.cpp b/src/mbgl/text/collision_tile.cpp index a7741d259a..e7824cde3c 100644 --- a/src/mbgl/text/collision_tile.cpp +++ b/src/mbgl/text/collision_tile.cpp @@ -153,13 +153,13 @@ Box CollisionTile::getTreeBox(const Point<float>& anchor, const CollisionBox& bo }; } -std::vector<IndexedSubfeature> CollisionTile::queryRenderedSymbols(const float minX, const float minY, const float maxX, const float maxY, const float scale) { +std::vector<IndexedSubfeature> CollisionTile::queryRenderedSymbols(const mapbox::geometry::box<int16_t>& box, const float scale) { std::vector<IndexedSubfeature> result; std::unordered_map<std::string, std::set<std::size_t>> sourceLayerFeatures; - auto anchor = util::matrixMultiply(rotationMatrix, Point<float>(minX, minY)); - CollisionBox queryBox(anchor, 0, 0, maxX - minX, maxY - minY, scale); + auto anchor = util::matrixMultiply(rotationMatrix, convertPoint<float>(box.min)); + CollisionBox queryBox(anchor, 0, 0, box.max.x - box.min.x, box.max.y - box.min.y, scale); auto predicates = bgi::intersects(getTreeBox(anchor, queryBox)); auto fn = [&] (const Tree& tree_) { |