#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/Line_traits_1.h>
#include <CGAL/Arrangement_on_curve_1/insert.h>
#include <CGAL/Arrangement_on_curve_1/Open_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.left_boundary_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;
}
Arrangement_on_curve_1 represents a subdivision of a continuous 1D curve, referred to as the master c...
Definition Arrangement_on_curve_1.h:77
Line_traits_1 is a minimal, scalar model of the AocTraits_1 concept.
Definition Line_traits_1.h:27
The class template Open_topology_traits is a model of the AocTopologyTraits concept for 1D arrangemen...
Definition Open_topology_traits.h:40
Arrangement_on_curve_1< GeometryTraits, TopologyTraits, BinarySearch >::Vertex_descriptor insert(Arrangement_on_curve_1< GeometryTraits, TopologyTraits, BinarySearch > &arr, const typename GeometryTraits::Point_1 &p)
inserts a point into an arrangement.