📄 concept_archetype_functors.h
字号:
typedef typename K::Vector_2 Vector_2; typedef typename K::Point_2 Point_2;public: typedef Vector_2 result_type; typedef Arity_tag< 2 > Arity; Vector_2 operator()( const Point_2&, const Point_2&) const { return Vector_2(); } Vector_2 operator()( const Origin&, const Point_2&) const { return Vector_2(); } Vector_2 operator()( const Point_2&, const Origin&) const { return Vector_2(); } Vector_2 operator()( const Segment_2&) const { return Vector_2(); } Vector_2 operator()( const Ray_2&) const { return Vector_2(); } Vector_2 operator()( const Line_2&) const { return Vector_2(); } Vector_2 operator()( Null_vector) const { return Vector_2(); }};template <typename K>class Construct_vector_3{ typedef typename K::RT RT; typedef typename K::Segment_3 Segment_3; typedef typename K::Ray_3 Ray_3; typedef typename K::Line_3 Line_3; typedef typename K::Vector_3 Vector_3; typedef typename K::Point_3 Point_3;public: typedef Vector_3 result_type; typedef Arity_tag< 2 > Arity; Vector_3 operator()( const Point_3&, const Point_3&) const { return Vector_3(); } Vector_3 operator()( const Origin&, const Point_3&) const { return Vector_3(); } Vector_3 operator()( const Point_3&, const Origin&) const { return Vector_3(); } Vector_3 operator()( const Segment_3&) const { return Vector_3(); } Vector_3 operator()( const Ray_3&) const { return Vector_3(); } Vector_3 operator()( const Line_3&) const { return Vector_3(); } Vector_3 operator()( Null_vector) const { return Vector_3(); }};template <typename K>class Construct_vertex_2{ typedef typename K::Point_2 Point_2; typedef typename K::Segment_2 Segment_2; typedef typename K::Iso_rectangle_2 Iso_rectangle_2; typedef typename K::Triangle_2 Triangle_2;public: typedef Point_2 result_type; typedef Arity_tag< 2 > Arity; Point_2 operator()( const Segment_2&, int) const { return Point_2(); } Point_2 operator()( const Triangle_2&, int) const { return Point_2(); } Point_2 operator()( const Iso_rectangle_2&, int) const { return Point_2(); }};template <typename K>class Construct_vertex_3{ typedef typename K::Point_3 Point_3; typedef typename K::Segment_3 Segment_3; typedef typename K::Iso_cuboid_3 Iso_cuboid_3; typedef typename K::Triangle_3 Triangle_3; typedef typename K::Tetrahedron_3 Tetrahedron_3;public: typedef Point_3 result_type; typedef Arity_tag< 2 > Arity; Point_3 operator()( const Segment_3&, int) const { return Point_3(); } Point_3 operator()( const Triangle_3&, int) const { return Point_3(); } Point_3 operator()( const Iso_cuboid_3&, int) const { return Point_3(); } Point_3 operator()( const Tetrahedron_3&, int) const { return Point_3(); }};template <typename K>class Construct_bbox_2{ typedef typename K::Point_2 Point_2; typedef typename K::Segment_2 Segment_2; typedef typename K::Iso_rectangle_2 Iso_rectangle_2; typedef typename K::Triangle_2 Triangle_2; typedef typename K::Circle_2 Circle_2;public: typedef Bbox_2 result_type; typedef Arity_tag< 1 > Arity; Bbox_2 operator()( const Point_2&) const { Bbox_2 b; return b; } Bbox_2 operator()( const Segment_2&) const { Bbox_2 b; return b; } Bbox_2 operator()( const Triangle_2&) const { Bbox_2 b; return b; } Bbox_2 operator()( const Iso_rectangle_2&) const { Bbox_2 b; return b; } Bbox_2 operator()( const Circle_2&) const { Bbox_2 b; return b; }};template <typename K>class Construct_bbox_3{ typedef typename K::Point_3 Point_3; typedef typename K::Segment_3 Segment_3; typedef typename K::Iso_cuboid_3 Iso_cuboid_3; typedef typename K::Triangle_3 Triangle_3; typedef typename K::Tetrahedron_3 Tetrahedron_3; typedef typename K::Sphere_3 Sphere_3;public: typedef Bbox_3 result_type; typedef Arity_tag< 1 > Arity; Bbox_3 operator()( const Point_3&) const { Bbox_3 b; return b; } Bbox_3 operator()( const Segment_3&) const { Bbox_3 b; return b; } Bbox_3 operator()( const Triangle_3&) const { Bbox_3 b; return b; } Bbox_3 operator()( const Iso_cuboid_3&) const { Bbox_3 b; return b; } Bbox_3 operator()( const Tetrahedron_3&) const { Bbox_3 b; return b; } Bbox_3 operator()( const Sphere_3&) const { Bbox_3 b; return b; }}; template <typename K> class Construct_cartesian_const_iterator_2 { typedef typename K::Point_2 Point_2; typedef typename K::Cartesian_const_iterator_2 Cartesian_const_iterator_2; public: typedef Cartesian_const_iterator_2 result_type; typedef Arity_tag< 1 > Arity; Cartesian_const_iterator_2 operator()( const Point_2&) const { return Cartesian_const_iterator_2(); } Cartesian_const_iterator_2 operator()( const Point_2&, int) const { return Cartesian_const_iterator_2(); } }; template <typename K> class Construct_cartesian_const_iterator_3 { typedef typename K::Point_3 Point_3; typedef typename K::Cartesian_const_iterator_3 Cartesian_const_iterator_3; public: typedef Cartesian_const_iterator_3 result_type; typedef Arity_tag< 1 > Arity; Cartesian_const_iterator_3 operator()( const Point_3&) const { return Cartesian_const_iterator_3(); } Cartesian_const_iterator_3 operator()( const Point_3&, int) const { return Cartesian_const_iterator_3(); } };template <typename K>class Coplanar_orientation_3{ typedef typename K::Point_3 Point_3;public: typedef Orientation result_type; typedef Arity_tag< 4 > Arity; Orientation operator()(const Point_3&, const Point_3&, const Point_3&) const { return CGAL::COLLINEAR; } Orientation operator()( const Point_3&, const Point_3&, const Point_3&, const Point_3&) const { return CGAL::COLLINEAR; }};template <typename K>class Coplanar_side_of_bounded_circle_3{ typedef typename K::Point_3 Point_3;public: typedef Bounded_side result_type; typedef Arity_tag< 4 > Arity; Bounded_side operator()( const Point_3&, const Point_3&, const Point_3&, const Point_3&) const { return CGAL::ON_BOUNDARY; }};template <typename K>class Coplanar_3{ typedef typename K::Point_3 Point_3;public: typedef bool result_type; typedef Arity_tag< 4 > Arity; bool operator()( const Point_3&, const Point_3&, const Point_3&, const Point_3&) const { return true; }};template <typename K>class Counterclockwise_in_between_2{ typedef typename K::Direction_2 Direction_2;public: typedef bool result_type; typedef Arity_tag< 3 > Arity; bool operator()( const Direction_2&, const Direction_2&, const Direction_2&) const { return true; }};template <typename K>class Do_intersect_2{public: typedef bool result_type; typedef Arity_tag< 2 > Arity; // There are 36 combinaisons, so I use a template. template <class T1, class T2> bool operator()(const T1&, const T2&) const { return true; }};template <typename K>class Do_intersect_3{public: typedef bool result_type; typedef Arity_tag< 2 > Arity; // There are x combinaisons, so I use a template. template <class T1, class T2> bool operator()(const T1&, const T2&) const { return true; }};template <typename K>class Equal_xy_3{ typedef typename K::Point_3 Point_3;public: typedef bool result_type; typedef Arity_tag< 2 > Arity; bool operator()( const Point_3&, const Point_3&) const { return true; }};template <typename K>class Equal_x_2{ typedef typename K::Point_2 Point_2;public: typedef bool result_type; typedef Arity_tag< 2 > Arity; bool operator()( const Point_2&, const Point_2&) const { return true; }};template <typename K>class Equal_x_3{ typedef typename K::Point_3 Point_3;public: typedef bool result_type; typedef Arity_tag< 2 > Arity; bool operator()( const Point_3&, const Point_3&) const { return true; }};template <typename K>class Equal_y_2{ typedef typename K::Point_2 Point_2;public: typedef bool result_type; typedef Arity_tag< 2 > Arity; bool operator()( const Point_2&, const Point_2&) const { return true; }};template <typename K>class Equal_y_3{ typedef typename K::Point_3 Point_3;public: typedef bool result_type; typedef Arity_tag< 2 > Arity; bool operator()( const Point_3&, const Point_3&) const { return true; }};template <typename K>class Equal_z_3{ typedef typename K::Point_3 Point_3;public: typedef bool result_type; typedef Arity_tag< 2 > Arity; bool operator()( const Point_3&, const Point_3&) const { return true; }};template <typename K>class Equal_2{public: typedef bool result_type; typedef Arity_tag< 2 > Arity; // template to replace n different versions template <typename T> bool operator()(const T&, const T&) const { return true; }};template <typename K>class Equal_3{public: typedef bool result_type; typedef Arity_tag< 2 > Arity; // template to replace n different versions template <typename T> bool operator()(const T&, const T&) const { return true; }};template <typename K>class Has_on_boundary_2{ typedef typename K::Point_2 Point_2; typedef typename K::Iso_rectangle_2 Iso_rectangle_2; typedef typename K::Circle_2 Circle_2; typedef typename K::Triangle_2 Triangle_2;public: typedef bool result_type; typedef Arity_tag< 2 > Arity; bool operator()( const Circle_2&, const Point_2&) const { return true; } bool operator()( const Triangle_2&, const Point_2&) const { return true; } bool operator()( const Iso_rectangle_2&, const Point_2&) const { return true; }};template <typename K>class Has_on_boundary_3{ typedef typename K::Point_3 Point_3; typedef typename K::Iso_cuboid_3 Iso_cuboid_3; typedef typename K::Sphere_3 Sphere_3; typedef typename K::Tetrahedron_3 Tetrahedron_3; typedef typename K::Plane_3 Plane_3;public: typedef bool result_type; typedef Arity_tag< 2 > Arity; bool operator()( const Sphere_3&, const Point_3&) const { return true; } bool operator()( const Tetrahedron_3&, const Point_3&) const { return true; } bool operator()( const Iso_cuboid_3&, const Point_3&) const { return true; }};template <typename K>class Has_on_bounded_side_2{ typedef typename K::Point_2 Point_2; typedef typename K::Iso_rectangle_2 Iso_rectangle_2; typedef typename K::Circle_2 Circle_2; typedef typename K::Triangle_2 Triangle_2;public: typedef bool result_type; typedef Arity_tag< 2 > Arity; bool operator()( const Circle_2&, const Point_2&) const { return true; } bool operator()( const Triangle_2&, const Point_2&) const { return true; } bool operator()( const Iso_rectangle_2&, const Point_2&) const { return true; }};template <typename K>class Has_on_bounded_side_3{ typedef typename K::Point_3 Point_3; typedef typename K::Iso_cuboid_3 Iso_cuboid_3; typedef typename K::Sphere_3 Sphere_3; typedef typename K::Tetrahedron_3 Tetrahedron_3;public: typedef bool result_type; typedef Arity_tag< 2 > Arity; bool operator()( const Sphere_3&, const Point_3&) const { return true; } bool operator()( const Tetrahedron_3&, const Point_3&) const { return true; } bool operator()( const Iso_cuboid
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -