1 // Copyright (c) 2000 Max-Planck-Institute Saarbruecken (Germany). 2 // All rights reserved. 3 // 4 // This file is part of CGAL (www.cgal.org). 5 // 6 // $URL: https://github.com/CGAL/cgal/blob/v5.3/Partition_2/include/CGAL/Partition_2/Turn_reverser.h $ 7 // $Id: Turn_reverser.h 0779373 2020-03-26T13:31:46+01:00 Sébastien Loriot 8 // SPDX-License-Identifier: GPL-3.0-or-later OR LicenseRef-Commercial 9 // 10 // 11 // Author(s) : Susan Hert <hert@mpi-sb.mpg.de> 12 13 #ifndef CGAL_TURN_REVERSER_H 14 #define CGAL_TURN_REVERSER_H 15 16 #include <CGAL/license/Partition_2.h> 17 18 19 namespace CGAL { 20 21 template <class Point_2, class TurnPredicate> 22 class Turn_reverser 23 { 24 public: Turn_reverser()25 Turn_reverser() {} Turn_reverser(const TurnPredicate & t)26 Turn_reverser( const TurnPredicate& t ): turn(t) {} 27 operator()28 bool operator() (const Point_2& p1, 29 const Point_2& p2, 30 const Point_2& p3) const 31 { return turn(p2, p1, p3); } 32 33 private: 34 TurnPredicate turn; 35 }; 36 37 38 } 39 40 #endif // CGAL_TURN_REVERSER_H 41