refactor header includes
This commit is contained in:
@@ -1,35 +0,0 @@
|
||||
#ifndef LLMR_MAP_LAYER
|
||||
#define LLMR_MAP_LAYER
|
||||
|
||||
#include <string>
|
||||
#include <forward_list>
|
||||
|
||||
namespace llmr {
|
||||
|
||||
// class Bucket;
|
||||
|
||||
// class Layer {
|
||||
// public:
|
||||
// Layer(const std::string& name, const std::shared_ptr<Bucket>& bucket)
|
||||
// : name(name),
|
||||
// bucket(bucket) {}
|
||||
|
||||
// Layer(const std::string& name)
|
||||
// : name(name) {}
|
||||
|
||||
// public:
|
||||
// std::string name;
|
||||
// std::shared_ptr<Bucket> bucket;
|
||||
// std::forward_list<Layer> child_layers;
|
||||
|
||||
// private:
|
||||
// // Make noncopyable
|
||||
// // Layer(const Layer&) = delete;
|
||||
// // Layer(const Layer&&) = delete;
|
||||
// // Layer& operator=(const Layer&) = delete;
|
||||
// // Layer& operator=(const Layer && ) = delete;
|
||||
// };
|
||||
|
||||
}
|
||||
|
||||
#endif
|
||||
@@ -1,18 +1,17 @@
|
||||
#ifndef LLMR_MAP_MAP
|
||||
#define LLMR_MAP_MAP
|
||||
|
||||
#include "../platform/platform.hpp"
|
||||
#include "../renderer/painter.hpp"
|
||||
#include "transform.hpp"
|
||||
#include <llmr/map/tile.hpp>
|
||||
#include "settings.hpp"
|
||||
#include "../style/style.hpp"
|
||||
#include <llmr/map/transform.hpp>
|
||||
#include <llmr/style/style.hpp>
|
||||
#include <llmr/renderer/painter.hpp>
|
||||
|
||||
#include <forward_list>
|
||||
#include <cstdint>
|
||||
#include <string>
|
||||
|
||||
namespace llmr {
|
||||
|
||||
class Sprite;
|
||||
class Settings;
|
||||
|
||||
class Map {
|
||||
public:
|
||||
@@ -37,8 +36,8 @@ public:
|
||||
void moveBy(double dx, double dy);
|
||||
void scaleBy(double ds, double cx, double cy);
|
||||
void rotateBy(double cx, double cy, double sx, double sy, double ex, double ey);
|
||||
void tileLoaded(Tile::Ptr tile);
|
||||
void tileFailed(Tile::Ptr tile);
|
||||
void tileLoaded(std::shared_ptr<Tile> tile);
|
||||
void tileFailed(std::shared_ptr<Tile> tile);
|
||||
|
||||
/* position */
|
||||
void resetNorth();
|
||||
@@ -54,8 +53,8 @@ private:
|
||||
bool findLoadedChildren(const Tile::ID& id, int32_t maxCoveringZoom, std::forward_list<Tile::ID>& retain);
|
||||
bool findLoadedParent(const Tile::ID& id, int32_t minCoveringZoom, std::forward_list<Tile::ID>& retain);
|
||||
void updateTiles();
|
||||
Tile::Ptr addTile(const Tile::ID& id);
|
||||
Tile::Ptr hasTile(const Tile::ID& id);
|
||||
std::shared_ptr<Tile> addTile(const Tile::ID& id);
|
||||
std::shared_ptr<Tile> hasTile(const Tile::ID& id);
|
||||
|
||||
|
||||
void update();
|
||||
@@ -69,8 +68,8 @@ private:
|
||||
int32_t min_zoom;
|
||||
int32_t max_zoom;
|
||||
|
||||
std::forward_list<Tile::Ptr> tiles;
|
||||
std::forward_list<Tile::Ptr> historic_tiles;
|
||||
std::forward_list<std::shared_ptr<Tile>> tiles;
|
||||
std::forward_list<std::shared_ptr<Tile>> historic_tiles;
|
||||
};
|
||||
|
||||
}
|
||||
|
||||
@@ -1,31 +1,26 @@
|
||||
#ifndef LLMR_MAP_TILE
|
||||
#define LLMR_MAP_TILE
|
||||
|
||||
#include "../geometry/debug_font_buffer.hpp"
|
||||
#include "../geometry/fill_buffer.hpp"
|
||||
#include "../geometry/line_buffer.hpp"
|
||||
|
||||
#include "layer.hpp"
|
||||
|
||||
#include <stdint.h>
|
||||
#include <forward_list>
|
||||
#include <mutex>
|
||||
#include <llmr/util/vec.hpp>
|
||||
|
||||
#include <cstdint>
|
||||
#include <forward_list>
|
||||
#include <string>
|
||||
#include <vector>
|
||||
#include <map>
|
||||
#include <memory>
|
||||
|
||||
namespace llmr {
|
||||
|
||||
struct pbf;
|
||||
class Style;
|
||||
class Bucket;
|
||||
class LayerDescription;
|
||||
class BucketDescription;
|
||||
class VectorTile;
|
||||
class VectorTileLayer;
|
||||
|
||||
|
||||
class DebugFontBuffer;
|
||||
class FillBuffer;
|
||||
class LineBuffer;
|
||||
|
||||
class Tile : public std::enable_shared_from_this<Tile> {
|
||||
public:
|
||||
@@ -83,14 +78,11 @@ public:
|
||||
// Holds the buckets of this tile.
|
||||
// They contain the location offsets in the buffers stored above
|
||||
std::map<std::string, std::shared_ptr<Bucket>> buckets;
|
||||
// std::forward_list<Layer> layers;
|
||||
|
||||
private:
|
||||
// Source data
|
||||
std::string data;
|
||||
|
||||
// std::mutex mtx;
|
||||
|
||||
const Style& style;
|
||||
};
|
||||
|
||||
|
||||
@@ -1,13 +1,10 @@
|
||||
#ifndef LLMR_MAP_TRANSFORM
|
||||
#define LLMR_MAP_TRANSFORM
|
||||
|
||||
|
||||
#include <llmr/util/vec.hpp>
|
||||
#include <llmr/util/mat4.hpp>
|
||||
#include <llmr/util/animation.hpp>
|
||||
|
||||
#include <cmath>
|
||||
#include <cstdint>
|
||||
#include <forward_list>
|
||||
|
||||
namespace llmr {
|
||||
|
||||
@@ -1,22 +1,24 @@
|
||||
#ifndef LLMR_RENDERER_PAINTER
|
||||
#define LLMR_RENDERER_PAINTER
|
||||
|
||||
#include "shader-fill.hpp"
|
||||
#include "shader-plain.hpp"
|
||||
#include "shader-outline.hpp"
|
||||
#include "shader-line.hpp"
|
||||
#include "shader-pattern.hpp"
|
||||
|
||||
#include "../map/tile.hpp"
|
||||
#include "../geometry/vertex_buffer.hpp"
|
||||
#include "../util/mat4.hpp"
|
||||
#include <llmr/map/tile.hpp>
|
||||
#include <llmr/geometry/vertex_buffer.hpp>
|
||||
#include <llmr/util/mat4.hpp>
|
||||
|
||||
namespace llmr {
|
||||
|
||||
class Settings;
|
||||
class Transform;
|
||||
class Settings;
|
||||
class Style;
|
||||
class LayerDescription;
|
||||
class Tile;
|
||||
// class LayerDescription;
|
||||
|
||||
class Shader;
|
||||
class PlainShader;
|
||||
class OutlineShader;
|
||||
class FillShader;
|
||||
class LineShader;
|
||||
class PatternShader;
|
||||
|
||||
class FillBucket;
|
||||
class LineBucket;
|
||||
|
||||
@@ -1,20 +1,21 @@
|
||||
#ifndef LLMR_STYLE_STYLE
|
||||
#define LLMR_STYLE_STYLE
|
||||
|
||||
#include <cstdint>
|
||||
|
||||
#include <llmr/util/pbf.hpp>
|
||||
#include <llmr/style/bucket_description.hpp>
|
||||
#include <llmr/style/layer_description.hpp>
|
||||
#include <llmr/style/class_description.hpp>
|
||||
|
||||
#include <map>
|
||||
#include <vector>
|
||||
#include <set>
|
||||
#include "../util/pbf.hpp"
|
||||
|
||||
#include "value.hpp"
|
||||
#include "properties.hpp"
|
||||
#include "bucket_description.hpp"
|
||||
#include "layer_description.hpp"
|
||||
#include "class_description.hpp"
|
||||
#include "sprite.hpp"
|
||||
|
||||
namespace llmr {
|
||||
|
||||
class Sprite;
|
||||
|
||||
class Style {
|
||||
public:
|
||||
Style();
|
||||
|
||||
@@ -1,8 +1,9 @@
|
||||
#ifndef llmr_util_vec2_
|
||||
#define llmr_util_vec2_
|
||||
#ifndef LLMR_UTIL_VEC
|
||||
#define LLMR_UTIL_VEC
|
||||
|
||||
#include <limits>
|
||||
#include <type_traits>
|
||||
#include <cmath>
|
||||
|
||||
namespace llmr {
|
||||
|
||||
|
||||
Reference in New Issue
Block a user