33#ifdef OGDF_INCLUDE_CGAL
39# include <CGAL/IO/io.h>
40# include <CGAL/Ray_2.h>
48template<
typename kernel>
49using Ray_t = CGAL::Ray_2<kernel>;
51template<
typename kernel,
typename type>
52inline Point_t<kernel> rel_point_at(
const Ray_t<kernel>&
r,
const type l) {
53 return r.source() +
r.to_vector() * l;
56template<
typename kernel>
57inline typename kernel::FT squared_convex_parameter_directed(
const Ray_t<kernel>&
r,
58 const Point_t<kernel>& p) {
60 return (
r.source() - p).squared_length() /
r.to_vector().squared_length();
63template<
typename kernel>
64inline Point_t<kernel> intersect(
const Line_t<kernel>& l,
const Ray_t<kernel>&
r) {
67 auto result = CGAL::intersection(l,
r);
69 return Point_t<kernel>(std::numeric_limits<unsigned int>::max(),
70 std::numeric_limits<unsigned int>::max());
73 if (boost::get<Ray_t<kernel>>(&*result)) {
74 auto s = boost::get<Ray_t<kernel>>(&*result);
void intersection(Graph &G1, const Graph &G2, const NodeArray< node > &nodeMap, bool directed=false)
Computes the intersection of G1 and G2.
#define OGDF_ASSERT(expr)
Assert condition expr. See doc/build.md for more information.
The namespace for all OGDF objects.