33 #ifdef OGDF_INCLUDE_CGAL
44 template<
typename stream = std::ostream>
45 class GeogebraExporter {
48 unsigned int point_counter;
51 GeogebraExporter(stream& outstream_) : outstream(outstream_), point_counter(0) {
55 template<
typename type>
56 void add(
const geometry::Point_t<type>& point) {
57 outstream <<
"A" << point_counter <<
"=" << point <<
"\n";
61 template<
typename Polygon>
62 void add(
const Polygon& polygon) {
63 unsigned int old_counter = point_counter;
64 for (
unsigned int i = 0; i < polygon.size(); ++i) {
68 outstream <<
"input = polygon[";
70 for (
unsigned int i = old_counter; i < point_counter; ++i) {
71 outstream <<
"A" << i;
72 if (i + 1 < point_counter) {
80 template<
typename type>
81 void add(
const geometry::LineSegment_t<type>& l) {
82 unsigned int i = point_counter;
85 outstream <<
"segment[A" << i <<
", A" << i + 1 <<
"]\n";