33 #ifdef OGDF_INCLUDE_CGAL
43 template<
typename Kernel_,
typename Graph>
45 :
public GeometricDrawing<Kernel_, Graph> {
47 using Kernel = Kernel_;
51 using Point = geometry::Point_t<Kernel>;
52 using LineSegment = geometry::LineSegment_t<Kernel>;
53 using Polyline = geometry::Polyline_t<Kernel>;
57 using parent = GeometricDrawing<Kernel, Graph>;
58 datastructure::EdgeVector<Polyline, Graph> edge_shape;
61 PolylineDrawing(Graph& g) : GeometricDrawing<Kernel,
Graph>(g) { }
68 inline const Polyline& get_polyline(
const Edge& e)
const {
return edge_shape[e]; }
70 inline void set_polyline(
const Edge& e, Polyline& p) {
72 OGDF_ASSERT(p.front() == this->get_point(e->source()));
73 OGDF_ASSERT(p.back() == this->get_point(e->target()));
77 inline void set_polyline(
const Edge& e, Polyline&& p) {
79 OGDF_ASSERT(p.front() == this->get_point(e->source()));
80 OGDF_ASSERT(p.back() == this->get_point(e->target()));
85 inline geometry::Bbox bbox()
const {
91 geometry::Bbox bb(xmin, ymin, xmax, ymax);
92 for (Node v : parent::nodes()) {
93 bb += parent::get_point(v).bbox();
96 for (Edge e : parent::edges()) {
97 bb += edge_shape[e].bbox();