#include <iostream>
#include <string>
#include <CGAL/Exact_predicates_exact_constructions_kernel.h>
#include <CGAL/Arrangement_on_curve_1/Arrangement_on_curve_1.h>
#include <CGAL/Arrangement_on_curve_1/Ft_traits_1.h>
#include <CGAL/Arrangement_on_curve_1/insert.h>
#include <CGAL/Arrangement_on_curve_1/Unbounded_topology_traits.h>
using Point = Geom_traits::Point_1;
int main() {
auto traits_ptr = std::make_shared<const Geom_traits>();
Arrangement arr(traits_ptr);
std::cout << "Inserting raw coordinate fields into 1D track...\n";
auto v_data_map = arr.vertex_data_map();
put(v_data_map, v1, "Right Node");
put(v_data_map, v2, "Left Node");
put(v_data_map, v3, "Center Node");
std::cout << "\nResulting Sorted Sequence along the 1D Line:\n";
auto v_pnt_map = arr.vertex_point_map();
auto e = arr.unbounded_left_edge();
while (arr.has_right_vertex(e)) {
auto v = arr.right_vertex(e);
std::cout << " Vertex Point: (" << get(v_pnt_map, v) << ") | Extension ID: " << get(v_data_map, v) << "\n";
e = arr.right_edge(v);
}
return 0;
}
Definition Arrangement_on_curve_1.h:30
Ft_traits_1 is a minimal, scalar model of the AocTraits_1 concept.
Definition Ft_traits_1.h:20
The class template Unbounded_topology_traits provides a model of the AocTopologyTraits concept for 1D...
Definition Unbounded_topology_traits.h:38
Arrangement_on_curve_1< GeometryTraits, TopologyTraits >::Vertex_descriptor insert(Arrangement_on_curve_1< GeometryTraits, TopologyTraits > &arr, const typename GeometryTraits::Point_1 &p)
inserts a point into an arrangement.