Open
Graph Drawing
Framework

 v. 2023.09 (Elderberry)
 

Direction.h
Go to the documentation of this file.
1 
31 #pragma once
32 
33 #ifdef OGDF_INCLUDE_CGAL
34 
35 # include <CGAL/Aff_transformation_2.h>
36 # include <CGAL/Direction_2.h>
37 # include <CGAL/aff_transformation_tags.h>
38 
39 namespace ogdf {
40 namespace internal {
41 namespace gcm {
42 namespace geometry {
43 template<typename kernel>
44 using Direction_t = CGAL::Direction_2<kernel>;
45 
46 template<typename kernel>
47 inline Direction_t<kernel> rotate(const Direction_t<kernel>& v, const double angle) {
48  CGAL::Aff_transformation_2<kernel> rotatation(CGAL::ROTATION, std::sin(angle), std::cos(angle));
49  return std::move(rotatation(v));
50 }
51 }
52 }
53 }
54 }
55 
56 #endif
ogdf
The namespace for all OGDF objects.
Definition: multilevelmixer.cpp:39
backward::details::move
const T & move(const T &v)
Definition: backward.hpp:243