diff options
Diffstat (limited to 'src/mbgl/geometry/feature_index.hpp')
-rw-r--r-- | src/mbgl/geometry/feature_index.hpp | 33 |
1 files changed, 28 insertions, 5 deletions
diff --git a/src/mbgl/geometry/feature_index.hpp b/src/mbgl/geometry/feature_index.hpp index 2ae7da33df..e95bb94da6 100644 --- a/src/mbgl/geometry/feature_index.hpp +++ b/src/mbgl/geometry/feature_index.hpp @@ -2,6 +2,7 @@ #include <mbgl/style/types.hpp> #include <mbgl/tile/geometry_tile_data.hpp> +#include <mbgl/tile/tile_id.hpp> #include <mbgl/util/grid_index.hpp> #include <mbgl/util/feature.hpp> @@ -14,16 +15,37 @@ namespace mbgl { class RenderedQueryOptions; class RenderLayer; -class CollisionTile; -class CanonicalTileID; +class CollisionIndex; class IndexedSubfeature { public: IndexedSubfeature() = delete; - std::size_t index; + IndexedSubfeature(std::size_t index_, std::string sourceLayerName_, std::string bucketName_, size_t sortIndex_) + : index(index_) + , sourceLayerName(std::move(sourceLayerName_)) + , bucketName(std::move(bucketName_)) + , sortIndex(sortIndex_) + , tileID(0, 0, 0) + {} + + IndexedSubfeature(std::size_t index_, std::string sourceLayerName_, std::string bucketName_, size_t sortIndex_, + std::string sourceID_, CanonicalTileID tileID_) + : index(index_) + , sourceLayerName(std::move(sourceLayerName_)) + , bucketName(std::move(bucketName_)) + , sortIndex(std::move(sortIndex_)) + , sourceID(std::move(sourceID_)) + , tileID(std::move(tileID_)) + {} + + size_t index; std::string sourceLayerName; std::string bucketName; size_t sortIndex; + + // Only used for symbol features + std::string sourceID; + CanonicalTileID tileID; }; class FeatureIndex { @@ -40,9 +62,10 @@ public: const double scale, const RenderedQueryOptions& options, const GeometryTileData&, - const CanonicalTileID&, + const UnwrappedTileID&, + const std::string&, const std::vector<const RenderLayer*>&, - const CollisionTile*, + const CollisionIndex&, const float additionalQueryRadius) const; static optional<GeometryCoordinates> translateQueryGeometry( |