blob: 87ebdb279efbe0a59e19ba272b7e751c83667d52 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
|
#ifndef MBGL_TEXT_COLLISION
#define MBGL_TEXT_COLLISION
#include <mbgl/text/types.hpp>
namespace mbgl {
class Collision {
public:
Collision(float zoom, float tileExtent, float tileSize, float placementDepth = 1);
~Collision();
float getPlacementScale(const GlyphBoxes &glyphs, float minPlacementScale);
PlacementRange getPlacementRange(const GlyphBoxes &glyphs, float placementScale,
bool horizontal);
void insert(const GlyphBoxes &glyphs, const CollisionAnchor &anchor, float placementScale,
const PlacementRange &placementRange, bool horizontal);
private:
void *hTree;
void *cTree;
public:
const float tilePixelRatio;
const float zoom;
const float maxPlacementScale;
};
}
#endif
|