use pimpl for collision in tile_parser

This commit is contained in:
Konstantin Käfer
2014-08-14 13:21:36 +02:00
parent 6c45972502
commit 937f82fcda
5 changed files with 24 additions and 24 deletions

View File

@@ -4,7 +4,6 @@
#include <mbgl/map/vector_tile.hpp>
#include <mbgl/style/filter_expression.hpp>
#include <mbgl/text/glyph.hpp>
#include <mbgl/text/collision.hpp>
#include <cstdint>
#include <iosfwd>
@@ -28,6 +27,7 @@ class StyleBucketLine;
class StyleBucketSymbol;
class StyleLayerGroup;
class VectorTileData;
class Collision;
class TileParser {
public:
@@ -37,6 +37,7 @@ public:
const std::shared_ptr<GlyphStore> &glyphStore,
const std::shared_ptr<SpriteAtlas> &spriteAtlas,
const std::shared_ptr<Sprite> &sprite);
~TileParser();
public:
void parse();
@@ -65,7 +66,7 @@ private:
std::shared_ptr<Sprite> sprite;
std::shared_ptr<Texturepool> texturePool;
Collision collision;
std::unique_ptr<Collision> collision;
};
}

View File

@@ -29,7 +29,6 @@ class Collision {
public:
Collision(float zoom, float tileExtent, float tileSize, float placementDepth = 1);
~Collision();
float getPlacementScale(const GlyphBoxes &glyphs, float minPlacementScale, bool avoidEdges);
PlacementRange getPlacementRange(const GlyphBoxes &glyphs, float placementScale,
@@ -38,8 +37,8 @@ public:
const PlacementRange &placementRange, bool horizontal);
private:
void *hTree;
void *cTree;
Tree hTree;
Tree cTree;
PlacementValue leftEdge;
PlacementValue topEdge;
PlacementValue rightEdge;