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

📄 segment_assertions.h

📁 很多二维 三维几何计算算法 C++ 类库
💻 H
字号:
// Copyright (c) 1997  Tel-Aviv University (Israel).// All rights reserved.//// This file is part of CGAL (www.cgal.org); you may redistribute it under// the terms of the Q Public License version 1.0.// See the file LICENSE.QPL 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/Arrangement_2/include/CGAL/Arr_traits_2/Segment_assertions.h $// $Id: Segment_assertions.h 37160 2007-03-16 14:33:01Z lrineau $// //// Author(s)     : Baruch Zukerman <baruchzu@post.tau.ac.il>#ifndef CGAL_SEGMENT_ASSERTIONS_H#define CGAL_SEGMENT_ASSERTIONS_HCGAL_BEGIN_NAMESPACEtemplate <class Traits_>class Segment_assertions{  typedef Traits_                                  Traits_2;  typedef typename Traits_2::Point_2               Point_2;  typedef typename Traits_2::Kernel                Kernel;  typedef typename Kernel::Line_2                  Line_2;  typedef typename Traits_2::X_monotone_curve_2    X_monotone_curve_2;public:  static bool _assert_is_point_on (const Point_2& pt,                                   const X_monotone_curve_2& cv,                                   Tag_true)  {    Traits_2    traits;    return (traits.compare_y_at_x_2_object() (pt, cv) == EQUAL);  }  static bool _assert_is_point_on (const Point_2& /*pt*/,                                   const X_monotone_curve_2& /*cv*/,                                   Tag_false)  {    return (true);  }  static bool _assert_is_point_on (const Point_2& pt,                                   const Line_2& l,                                   Tag_true)  {    Kernel      kernel;    return (kernel.has_on_2_object() (l, pt));  }  static bool _assert_is_point_on (const Point_2& /*pt*/,                                   const Line_2&  /*l*/,                                   Tag_false)  {    return (true);  }};CGAL_END_NAMESPACE#endif

⌨️ 快捷键说明

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