⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 concept_archetype_functors.h

📁 很多二维 三维几何计算算法 C++ 类库
💻 H
📖 第 1 页 / 共 5 页
字号:
// Copyright (c) 1999,2003  Utrecht University (The Netherlands),// ETH Zurich (Switzerland), Freie Universitaet Berlin (Germany),// INRIA Sophia-Antipolis (France), Martin-Luther-University Halle-Wittenberg// (Germany), Max-Planck-Institute Saarbruecken (Germany), RISC Linz (Austria),// and Tel-Aviv University (Israel).  All rights reserved.//// This file is part of CGAL (www.cgal.org); you can redistribute it and/or// modify it under the terms of the GNU Lesser General Public License as// published by the Free Software Foundation; version 2.1 of the License.// See the file LICENSE.LGPL distributed with CGAL.//// Licensees holding a valid commercial license may use this file in// accordance with the commercial license agreement provided with the software.//// This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE// WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.//// $URL: svn+ssh://scm.gforge.inria.fr/svn/cgal/branches/CGAL-3.3-branch/Kernel_23/include/CGAL/Kernel/concept_archetype_functors.h $// $Id: concept_archetype_functors.h 38250 2007-04-17 22:09:34Z spion $// //// Author(s)     : Matthias Baesken#ifndef CGAL_CONCEPT_ARCHETYPE_FUNCTION_OBJECTS_H#define CGAL_CONCEPT_ARCHETYPE_FUNCTION_OBJECTS_H#include <CGAL/functional_base.h>#include <CGAL/Quotient.h>#include <CGAL/Origin.h>#include <CGAL/Bbox_2.h>#include <CGAL/Bbox_3.h>#include <CGAL/Kernel/Cartesian_coordinate_iterator_2.h>// see kernel functors for original version// all deprecated stuff was removed ...// all functors were put into namespace CGALca // (to avoid ambiguities with the original functors)CGAL_BEGIN_NAMESPACEnamespace CGALca {template <typename K>class Angle_2{    typedef typename K::Point_2 Point_2;public:    typedef Angle            result_type;    typedef Arity_tag< 3 >   Arity;    Angle operator()(const Point_2&, const Point_2&,                      const Point_2&) const    { CGAL::Angle a = CGAL::RIGHT;      return a;     }};template <typename K>class Angle_3{    typedef typename K::Point_3 Point_3;public:    typedef Angle            result_type;    typedef Arity_tag< 3 >   Arity;    Angle operator()(const Point_3&, const Point_3&,                      const Point_3&) const    { CGAL::Angle a = CGAL::RIGHT;      return a;     }};template <typename K>class Are_ordered_along_line_2{    typedef typename K::Point_2 Point_2;public:    typedef bool             result_type;    typedef Arity_tag< 3 >   Arity;    bool operator()(const Point_2&, const Point_2&, const Point_2&) const    { return true; }};template <typename K>class Are_ordered_along_line_3{    typedef typename K::Point_3 Point_3;public:    typedef bool             result_type;    typedef Arity_tag< 3 >   Arity;    bool operator()(const Point_3&, const Point_3&, const Point_3&) const    { return true; }};template <typename K>class Are_parallel_2{    typedef typename K::Line_2          Line_2;    typedef typename K::Segment_2       Segment_2;    typedef typename K::Ray_2           Ray_2;    public:    typedef bool             result_type;    typedef Arity_tag< 2 >   Arity;    bool    operator()(const Line_2&, const Line_2&) const    { return true; }    bool    operator()(const Segment_2&, const Segment_2&) const    { return true; }    bool    operator()(const Ray_2&, const Ray_2&) const    { return true; }};template <typename K>class Are_parallel_3{    typedef typename K::Line_3          Line_3;    typedef typename K::Segment_3       Segment_3;    typedef typename K::Ray_3           Ray_3;    typedef typename K::Plane_3         Plane_3;    public:    typedef bool             result_type;    typedef Arity_tag< 2 >   Arity;    bool    operator()(const Line_3&, const Line_3&) const    { return true; }    bool    operator()(const Plane_3&, const Plane_3&) const    { return true; }    bool    operator()(const Segment_3&, const Segment_3&) const    { return true; }    bool    operator()(const Ray_3&, const Ray_3&) const    { return true; }};template <typename K>class Are_strictly_ordered_along_line_2{    typedef typename K::Point_2 Point_2;public:    typedef bool             result_type;    typedef Arity_tag< 3 >   Arity;    bool operator()(const Point_2&, const Point_2&, const Point_2&) const    { return true; }};template <typename K>class Are_strictly_ordered_along_line_3{    typedef typename K::Point_3 Point_3;public:    typedef bool             result_type;    typedef Arity_tag< 3 >   Arity;    bool operator()(const Point_3&, const Point_3&, const Point_3&) const    { return true; }};template <typename K>class Assign_2{    typedef typename K::Object_2 Object_2;public:    typedef bool             result_type;    typedef Arity_tag< 2 >   Arity;    template <class T>    bool operator()(T&, const Object_2&) const    { return true; }};template <typename K>class Assign_3{    typedef typename K::Object_3 Object_3;public:    typedef bool             result_type;    typedef Arity_tag< 2 >   Arity;    template <class T>    bool operator()(T&, const Object_3&) const    { return true; }};template <typename K>class Bounded_side_2{    typedef typename K::Point_2         Point_2;    typedef typename K::Circle_2        Circle_2;    typedef typename K::Triangle_2      Triangle_2;    typedef typename K::Iso_rectangle_2 Iso_rectangle_2;public:    typedef Bounded_side     result_type;    typedef Arity_tag< 2 >   Arity;    Bounded_side operator()( const Circle_2&, const Point_2&) const    { return CGAL::ON_BOUNDARY; }    Bounded_side operator()( const Triangle_2&, const Point_2&) const    { return CGAL::ON_BOUNDARY; }    Bounded_side operator()( const Iso_rectangle_2&, const Point_2&) const    { return CGAL::ON_BOUNDARY; }};template <typename K>class Bounded_side_3{    typedef typename K::Point_3         Point_3;    typedef typename K::Sphere_3        Sphere_3;    typedef typename K::Tetrahedron_3   Tetrahedron_3;    typedef typename K::Iso_cuboid_3    Iso_cuboid_3;public:    typedef Bounded_side     result_type;    typedef Arity_tag< 2 >   Arity;    Bounded_side    operator()( const Sphere_3&, const Point_3&) const    { return CGAL::ON_BOUNDARY; }    Bounded_side    operator()( const Tetrahedron_3&, const Point_3&) const    { return CGAL::ON_BOUNDARY; }    Bounded_side    operator()( const Iso_cuboid_3&, const Point_3&) const    { return CGAL::ON_BOUNDARY; }};template <typename K>class Collinear_are_ordered_along_line_2{    typedef typename K::Point_2         Point_2;public:    typedef bool             result_type;    typedef Arity_tag< 3 >   Arity;    bool    operator()(const Point_2&, const Point_2&, const Point_2&) const    { return true; }};template <typename K>class Collinear_are_ordered_along_line_3{    typedef typename K::Point_3         Point_3;public:    typedef bool             result_type;    typedef Arity_tag< 3 >   Arity;    bool    operator()(const Point_3&, const Point_3&, const Point_3&) const    { return true; }};template <typename K>class Collinear_are_strictly_ordered_along_line_2{    typedef typename K::Point_2   Point_2;public:    typedef bool             result_type;    typedef Arity_tag< 3 >   Arity;    bool    operator()(const Point_2&, const Point_2&, const Point_2&) const    { return true; }};template <typename K>class Collinear_are_strictly_ordered_along_line_3{    typedef typename K::Point_3   Point_3;public:    typedef bool             result_type;    typedef Arity_tag< 3 >   Arity;    bool    operator()(const Point_3&, const Point_3&, const Point_3&) const    { return true; }};template <typename K>class Collinear_has_on_2{    typedef typename K::Point_2    Point_2;    typedef typename K::Ray_2      Ray_2;    typedef typename K::Segment_2  Segment_2;public:    typedef bool             result_type;    typedef Arity_tag< 2 >   Arity;    bool    operator()( const Ray_2&, const Point_2&) const    { return true; }    bool    operator()( const Segment_2&, const Point_2&) const    { return true; }};template <typename K>class Collinear_2{    typedef typename K::Point_2    Point_2;public:    typedef bool             result_type;    typedef Arity_tag< 3 >   Arity;    bool    operator()(const Point_2&, const Point_2&, const Point_2&) const    { return true; }};template <typename K>class Collinear_3{    typedef typename K::Point_3    Point_3;public:    typedef bool             result_type;    typedef Arity_tag< 3 >   Arity;    bool    operator()(const Point_3&, const Point_3&, const Point_3&) const    { return true; }};template <typename K>class Compare_angle_with_x_axis_2{    typedef typename K::Direction_2  Direction_2;public:    typedef Comparison_result        result_type;    typedef Arity_tag< 2 >           Arity;    Comparison_result    operator()(const Direction_2&, const Direction_2&) const    { return CGAL::LARGER; }};template <typename K>class Compare_distance_2{    typedef typename K::Point_2   Point_2;public:    typedef Comparison_result     result_type;    typedef Arity_tag< 3 >        Arity;    Comparison_result    operator()(const Point_2&, const Point_2&, const Point_2&) const    { return CGAL::LARGER; }};template <typename K>class Compare_squared_distance_2{    typedef typename K::Point_2   Point_2;    typedef typename K::FT        FT;public:    typedef Comparison_result     result_type;    typedef Arity_tag< 3 >        Arity;    Comparison_result    operator()(const Point_2&, const Point_2&, const FT&) const    { return CGAL::LARGER; }};template <typename K>class Compare_distance_3{    typedef typename K::Point_3   Point_3;public:    typedef Comparison_result     result_type;    typedef Arity_tag< 3 >        Arity;    Comparison_result    operator()(const Point_3&, const Point_3&, const Point_3&) const    { return CGAL::LARGER; }};template <typename K>class Compare_squared_distance_3{    typedef typename K::Point_3   Point_3;    typedef typename K::FT        FT;public:    typedef Comparison_result     result_type;    typedef Arity_tag< 3 >        Arity;    Comparison_result    operator()(const Point_3&, const Point_3&, const FT&) const    { return CGAL::LARGER; }};template <typename K>class Compare_slope_2{    typedef typename K::Line_2     Line_2;    typedef typename K::Segment_2  Segment_2;public:    typedef Comparison_result      result_type;    typedef Arity_tag< 2 >         Arity;    Comparison_result    operator()(const Line_2&, const Line_2&) const    { return CGAL::LARGER; }    Comparison_result    operator()(const Segment_2&, const Segment_2&) const    { return CGAL::LARGER; }};template <typename K>class Compare_x_at_y_2{    typedef typename K::Point_2    Point_2;    typedef typename K::Line_2     Line_2;public:    typedef Comparison_result      result_type;    typedef Arity_tag< 3 >         Arity;    Comparison_result    operator()( const Point_2&, const Line_2&) const    { return CGAL::LARGER; }    Comparison_result    operator()( const Point_2&, const Line_2&, const Line_2&) const    { return CGAL::LARGER; }    Comparison_result    operator()( const Line_2&, const Line_2&, const Line_2&) const    { return CGAL::LARGER; }    Comparison_result    operator()( const Line_2&, const Line_2&,	        const Line_2&, const Line_2&) const    { return CGAL::LARGER; }};template <typename K>class Compare_xyz_3{    typedef typename K::Point_3    Point_3;public:    typedef Comparison_result  result_type;    typedef Arity_tag< 2 >     Arity;    Comparison_result    operator()( const Point_3&, const Point_3&) const    { return CGAL::LARGER; }};template <typename K>class Compare_xy_2{    typedef typename K::Point_2    Point_2;public:    typedef Comparison_result  result_type;    typedef Arity_tag< 2 >     Arity;    Comparison_result    operator()( const Point_2&, const Point_2&) const    { return CGAL::LARGER; }};template <typename K>class Compare_xy_3{    typedef typename K::Point_3    Point_3;public:    typedef Comparison_result  result_type;    typedef Arity_tag< 2 >     Arity;    Comparison_result    operator()( const Point_3&, const Point_3&) const    { return CGAL::LARGER; }};template <typename K>class Compare_x_2{    typedef typename K::Point_2    Point_2;    typedef typename K::Line_2     Line_2;public:    typedef Comparison_result      result_type;    typedef Arity_tag< 2 >     Arity;    Comparison_result    operator()( const Point_2&, const Point_2&) const    { return CGAL::LARGER; }    Comparison_result    operator()( const Point_2&, const Line_2&, const Line_2&) const    { return CGAL::LARGER; }    Comparison_result    operator()( const Line_2&, const Line_2&, const Line_2&) const    { return CGAL::LARGER; }    Comparison_result    operator()( const Line_2&, const Line_2&,	        const Line_2&, const Line_2&) const    { return CGAL::LARGER; }};template <typename K>class Compare_x_3{    typedef typename K::Point_3    Point_3;public:    typedef Comparison_result      result_type;    typedef Arity_tag< 2 >         Arity;    Comparison_result    operator()( const Point_3&, const Point_3&) const    { return CGAL::LARGER; }};template <typename K>class Compare_y_at_x_2{    typedef typename K::Point_2    Point_2;    typedef typename K::Line_2     Line_2;    typedef typename K::Segment_2  Segment_2;public:    typedef Comparison_result      result_type;    typedef Arity_tag< 3 >         Arity;    Comparison_result

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -