mirror of
https://github.com/felt/tippecanoe.git
synced 2026-10-06 10:25:41 +02:00
Upgrade Wagyu to bfbf2893
This commit is contained in:
@@ -7,8 +7,8 @@
|
||||
#include <mapbox/geometry/multi_polygon.hpp>
|
||||
#include <mapbox/geometry/polygon.hpp>
|
||||
|
||||
#include <mapbox/geometry/wagyu/build_result.hpp>
|
||||
#include <mapbox/geometry/wagyu/build_local_minima_list.hpp>
|
||||
#include <mapbox/geometry/wagyu/build_result.hpp>
|
||||
#include <mapbox/geometry/wagyu/config.hpp>
|
||||
#include <mapbox/geometry/wagyu/local_minimum.hpp>
|
||||
#include <mapbox/geometry/wagyu/snap_rounding.hpp>
|
||||
@@ -25,28 +25,19 @@ private:
|
||||
using value_type = T;
|
||||
|
||||
local_minimum_list<value_type> minima_list;
|
||||
bool has_open_paths;
|
||||
bool reverse_output;
|
||||
|
||||
wagyu( wagyu const& ) = delete;
|
||||
wagyu& operator=(wagyu const& ) = delete;
|
||||
wagyu(wagyu const&) = delete;
|
||||
wagyu& operator=(wagyu const&) = delete;
|
||||
|
||||
public:
|
||||
wagyu() : minima_list(), has_open_paths(false), reverse_output(false) {
|
||||
wagyu() : minima_list(), reverse_output(false) {
|
||||
}
|
||||
|
||||
~wagyu() {
|
||||
clear();
|
||||
}
|
||||
|
||||
bool add_line(mapbox::geometry::line_string<value_type> const& pg) {
|
||||
bool success = add_line_string(pg, minima_list);
|
||||
if (success) {
|
||||
has_open_paths = true;
|
||||
}
|
||||
return success;
|
||||
}
|
||||
|
||||
bool add_ring(mapbox::geometry::linear_ring<value_type> const& pg,
|
||||
polygon_type p_type = polygon_type_subject) {
|
||||
return add_linear_ring(pg, minima_list, p_type);
|
||||
@@ -69,7 +60,6 @@ public:
|
||||
|
||||
void clear() {
|
||||
minima_list.clear();
|
||||
has_open_paths = false;
|
||||
}
|
||||
|
||||
mapbox::geometry::box<value_type> get_bounds() {
|
||||
@@ -122,13 +112,13 @@ public:
|
||||
fill_type clip_fill_type) {
|
||||
|
||||
ring_manager<T> rings;
|
||||
|
||||
|
||||
build_hot_pixels(minima_list, rings);
|
||||
|
||||
if (!execute_vatti(minima_list, rings, cliptype, subject_fill_type, clip_fill_type)) {
|
||||
return false;
|
||||
}
|
||||
|
||||
|
||||
do_simple_polygons(rings);
|
||||
|
||||
build_result(solution, rings, reverse_output);
|
||||
|
||||
Reference in New Issue
Block a user