#pragma once #include #include #include #ifdef DEBUG #include #endif namespace mapbox { namespace geometry { namespace wagyu { template struct intersect_node { bound_ptr bound1; bound_ptr bound2; mapbox::geometry::point pt; intersect_node(intersect_node&& n) : bound1(std::move(n.bound1)), bound2(std::move(n.bound2)), pt(std::move(n.pt)) { } intersect_node& operator=(intersect_node&& n) { bound1 = std::move(n.bound1); bound2 = std::move(n.bound2); pt = std::move(n.pt); return *this; } intersect_node(bound_ptr const& bound1_, bound_ptr const& bound2_, mapbox::geometry::point const& pt_) : bound1(bound1_), bound2(bound2_), pt(pt_) { } }; template using intersect_list = std::vector>; #ifdef DEBUG template inline std::basic_ostream& operator<<(std::basic_ostream& out, const intersect_node& e) { out << " point x: " << e.pt.x << " y: " << e.pt.y << std::endl; out << " bound 1: " << std::endl; out << *e.bound1 << std::endl; out << " bound 2: " << std::endl; out << *e.bound2 << std::endl; return out; } template inline std::basic_ostream& operator<<(std::basic_ostream& out, const intersect_list& ints) { std::size_t c = 0; for (auto const& i : ints) { out << "Intersection: " << c++ << std::endl; out << i; } return out; } #endif } } }