[core] *Tile ↔ *TileData

Tile is now the main base class; RasterTile, VectorTile, etc are its subclasses. GeometryTileData and its subclasses form the piece that's passed to the worker.
This commit is contained in:
John Firebaugh
2016-06-13 10:59:33 -07:00
parent 3ab7c1cca3
commit 5c7dfd948f
58 changed files with 814 additions and 820 deletions

View File

@@ -3,7 +3,7 @@
#include <mbgl/style/filter.hpp>
#include <mbgl/style/filter_evaluator.hpp>
#include <mbgl/style/parser.hpp>
#include <mbgl/tile/geometry_tile.hpp>
#include <mbgl/tile/geometry_tile_data.hpp>
#include <rapidjson/document.h>

View File

@@ -56,7 +56,7 @@
'math/minmax.cpp',
'math/clamp.cpp',
'tile/geometry_tile.cpp',
'tile/geometry_tile_data.cpp',
'tile/tile_id.cpp',
'storage/offline.cpp',

View File

@@ -1,9 +1,9 @@
#include <mbgl/test/util.hpp>
#include <mbgl/tile/geometry_tile.hpp>
#include <mbgl/tile/geometry_tile_data.hpp>
using namespace mbgl;
TEST(GeometryTile, classifyRings1) {
TEST(GeometryTileData, classifyRings1) {
std::vector<GeometryCollection> polygons = classifyRings({
{ {0, 0}, {0, 40}, {40, 40}, {40, 0}, {0, 0} }
});
@@ -14,7 +14,7 @@ TEST(GeometryTile, classifyRings1) {
ASSERT_EQ(polygons[0].size(), 1u);
}
TEST(GeometryTile, classifyRings2) {
TEST(GeometryTileData, classifyRings2) {
std::vector<GeometryCollection> polygons = classifyRings({
{ {0, 0}, {0, 40}, {40, 40}, {40, 0}, {0, 0} },
{ {10, 10}, {20, 10}, {20, 20}, {10, 10} }
@@ -26,7 +26,7 @@ TEST(GeometryTile, classifyRings2) {
ASSERT_EQ(polygons[0].size(), 2u);
}
TEST(GeometryTile, limitHoles1) {
TEST(GeometryTileData, limitHoles1) {
GeometryCollection polygon = {
{ {0, 0}, {0, 40}, {40, 40}, {40, 0}, {0, 0} },
{ {30, 30}, {32, 30}, {32, 32}, {30, 30} },
@@ -43,7 +43,7 @@ TEST(GeometryTile, limitHoles1) {
ASSERT_EQ(polygon[1][0].x, 10);
}
TEST(GeometryTile, limitHoles2) {
TEST(GeometryTileData, limitHoles2) {
GeometryCollection polygon = {
{ {0, 0}, {0, 40}, {40, 40}, {40, 0}, {0, 0} },
{ {10, 10}, {20, 10}, {20, 20}, {10, 10} },