diff options
author | John Firebaugh <john.firebaugh@gmail.com> | 2016-05-05 16:53:06 -0700 |
---|---|---|
committer | John Firebaugh <john.firebaugh@gmail.com> | 2016-05-12 08:43:08 -0700 |
commit | 0e7f3ada64d34fe4123f0e1b2a0f6d10c0f25d4f (patch) | |
tree | 77c88468aef0f82c07b4d0daf383393686e9b93b /src/mbgl/geometry/feature_index.hpp | |
parent | 5620cea82e9f274a0ceddbabca7759f321c58048 (diff) | |
download | qtlocation-mapboxgl-0e7f3ada64d34fe4123f0e1b2a0f6d10c0f25d4f.tar.gz |
[core] Fix code style issues
Diffstat (limited to 'src/mbgl/geometry/feature_index.hpp')
-rw-r--r-- | src/mbgl/geometry/feature_index.hpp | 98 |
1 files changed, 48 insertions, 50 deletions
diff --git a/src/mbgl/geometry/feature_index.hpp b/src/mbgl/geometry/feature_index.hpp index a3cb16ee76..0cb9a891d7 100644 --- a/src/mbgl/geometry/feature_index.hpp +++ b/src/mbgl/geometry/feature_index.hpp @@ -16,59 +16,57 @@ class CollisionTile; enum class TranslateAnchorType : bool; class IndexedSubfeature { - public: - IndexedSubfeature() = delete; - std::size_t index; - std::string sourceLayerName; - std::string bucketName; - size_t sortIndex; +public: + IndexedSubfeature() = delete; + std::size_t index; + std::string sourceLayerName; + std::string bucketName; + size_t sortIndex; }; class FeatureIndex { - public: - FeatureIndex(); - - void insert(const GeometryCollection&, std::size_t index, const std::string& sourceLayerName, const std::string& bucketName); - - void query( - std::unordered_map<std::string, std::vector<Feature>>& result, - const GeometryCollection& queryGeometry, - const float bearing, - const double tileSize, - const double scale, - const optional<std::vector<std::string>>& layerIDs, - const GeometryTile& geometryTile, - const Style&) const; - - static optional<GeometryCollection> translateQueryGeometry( - const GeometryCollection& queryGeometry, - const std::array<float, 2>& translate, - const TranslateAnchorType, - const float bearing, - const float pixelsToTileUnits); - - void addBucketLayerName(const std::string &bucketName, const std::string &layerName); - - void setCollisionTile(std::unique_ptr<CollisionTile>); - - private: - - void addFeature( - std::unordered_map<std::string, std::vector<Feature>>& result, - const IndexedSubfeature &indexedFeature, - const GeometryCollection& queryGeometry, - const optional<std::vector<std::string>>& filterLayerIDs, - const GeometryTile& geometryTile, - const Style& style, - const float bearing, - const float pixelsToTileUnits) const; - - std::unique_ptr<CollisionTile> collisionTile; - GridIndex<IndexedSubfeature> grid; - unsigned int sortIndex = 0; - - std::unordered_map<std::string,std::vector<std::string>> bucketLayerIDs; - +public: + FeatureIndex(); + + void insert(const GeometryCollection&, std::size_t index, const std::string& sourceLayerName, const std::string& bucketName); + + void query( + std::unordered_map<std::string, std::vector<Feature>>& result, + const GeometryCollection& queryGeometry, + const float bearing, + const double tileSize, + const double scale, + const optional<std::vector<std::string>>& layerIDs, + const GeometryTile&, + const Style&) const; + + static optional<GeometryCollection> translateQueryGeometry( + const GeometryCollection& queryGeometry, + const std::array<float, 2>& translate, + const TranslateAnchorType, + const float bearing, + const float pixelsToTileUnits); + + void addBucketLayerName(const std::string& bucketName, const std::string& layerName); + + void setCollisionTile(std::unique_ptr<CollisionTile>); + +private: + void addFeature( + std::unordered_map<std::string, std::vector<Feature>>& result, + const IndexedSubfeature&, + const GeometryCollection& queryGeometry, + const optional<std::vector<std::string>>& filterLayerIDs, + const GeometryTile&, + const Style&, + const float bearing, + const float pixelsToTileUnits) const; + + std::unique_ptr<CollisionTile> collisionTile; + GridIndex<IndexedSubfeature> grid; + unsigned int sortIndex = 0; + + std::unordered_map<std::string, std::vector<std::string>> bucketLayerIDs; }; } |