summaryrefslogtreecommitdiff
path: root/src/mbgl/geometry
diff options
context:
space:
mode:
authorChris Loer <chris.loer@gmail.com>2017-11-09 13:24:43 -0800
committerChris Loer <chris.loer@mapbox.com>2017-11-17 10:05:15 -0800
commit601a1c8dcf73f1a419c1ed5c39fbd14c581abf50 (patch)
tree46834b3601d9da910f929e1e5e916f6ac368b494 /src/mbgl/geometry
parent31f0f47195ae7d4a6f96b1c64cd39e1268fdfc8d (diff)
downloadqtlocation-mapboxgl-601a1c8dcf73f1a419c1ed5c39fbd14c581abf50.tar.gz
[core] Add circle geometries to GridIndex.
- Adds early exiting "hitTest" query for fast collision detection - GridIndex now determines cell count separately for x and y axes based on grid dimensions.
Diffstat (limited to 'src/mbgl/geometry')
-rw-r--r--src/mbgl/geometry/feature_index.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/mbgl/geometry/feature_index.cpp b/src/mbgl/geometry/feature_index.cpp
index 1adb933e44..f7dbbfb8b3 100644
--- a/src/mbgl/geometry/feature_index.cpp
+++ b/src/mbgl/geometry/feature_index.cpp
@@ -18,7 +18,7 @@
namespace mbgl {
FeatureIndex::FeatureIndex()
- : grid(util::EXTENT, 16, 0) {
+ : grid(util::EXTENT, util::EXTENT, util::EXTENT >> 5) {
}
void FeatureIndex::insert(const GeometryCollection& geometries,