33 #ifdef OGDF_INCLUDE_CGAL
48 template<
typename Kernel>
51 using Vector = Vector_t<Kernel>;
57 Cone_t(
const Vector& left,
const Vector& right) : Cone_t(left.direction, right.direction()) {
66 const Direction& left()
const {
return m_left; }
68 const Direction& right()
const {
return m_right; }
74 template<
typename Kernel>
75 bool is_subset(
const Cone_t<Kernel>& c_1,
const Cone_t<Kernel>& c_2) {
76 return c_1.left().counterclockwise_in_between(c_2.left(), c_2.right())
77 && c_1.right().counterclockwise_in_between(c_2.left(), c_2.right());
80 template<
typename Kernel>
81 bool is_in(
const Direction_t<Kernel>& d,
const Cone_t<Kernel>& c) {
82 return d.counterclockwise_in_between(c.left(), c.right());
85 template<
typename Kernel>
86 bool do_intersect(
const Cone_t<Kernel>& c_1,
const Cone_t<Kernel>& c_2) {
87 return is_in(c_1.left(), c_2) || is_in(c_1.right(), c_2) || is_in(c_2.left(), c_1)
88 || is_in(c_2.right(), c_1);
91 template<
typename kernel>
92 std::ostream&
operator<<(std::ostream& os,
const Cone_t<kernel>& c) {
93 os <<
"cone[(" << c.left().vector() <<
", " << c.right().vector() <<
")]";