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

📄 global_functions_internal_2.h

📁 很多二维 三维几何计算算法 C++ 类库
💻 H
📖 第 1 页 / 共 2 页
字号:
// Copyright (c) 2003-2004  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/global_functions_internal_2.h $// $Id: global_functions_internal_2.h 34893 2006-10-24 05:24:31Z spion $// //// Author(s)     : Sylvain Pion #ifndef CGAL_KERNEL_GLOBAL_FUNCTIONS_INTERNAL_2_H#define CGAL_KERNEL_GLOBAL_FUNCTIONS_INTERNAL_2_H// Generic functions calling the kernel functor, taking the kernel as// parameter.// These functions are not documented for now, but could be as some point.#include <CGAL/basic.h>CGAL_BEGIN_NAMESPACEnamespace CGALi {template < class K >inlineAngleangle(const typename CGAL_WRAP(K)::Point_2 &p,      const typename CGAL_WRAP(K)::Point_2 &q,      const typename CGAL_WRAP(K)::Point_2 &r, const K& k){  return k.angle_2_object()(p, q, r);}template < class K >inlineboolare_ordered_along_line(const typename CGAL_WRAP(K)::Point_2 &p,                       const typename CGAL_WRAP(K)::Point_2 &q,                       const typename CGAL_WRAP(K)::Point_2 &r, const K& k){  return k.are_ordered_along_line_2_object()(p, q, r);}template < class K >inlineboolare_strictly_ordered_along_line(const typename CGAL_WRAP(K)::Point_2 &p,                                const typename CGAL_WRAP(K)::Point_2 &q,                                const typename CGAL_WRAP(K)::Point_2 &r,                                const K& k){  return k.are_strictly_ordered_along_line_2_object()(p, q, r);}template < class K >inlinetypename K::FTarea(const typename CGAL_WRAP(K)::Point_2 &p,     const typename CGAL_WRAP(K)::Point_2 &q,     const typename CGAL_WRAP(K)::Point_2 &r,     const K& k){  return k.compute_area_2_object()(p, q, r);}template <typename K>inlinetypename K::Line_2bisector(const typename CGAL_WRAP(K)::Point_2 &p,         const typename CGAL_WRAP(K)::Point_2 &q, const K &k){  return k.construct_bisector_2_object()(p, q);}template <typename K>inlinetypename K::Line_2bisector(const typename CGAL_WRAP(K)::Line_2 &l1,         const typename CGAL_WRAP(K)::Line_2 &l2, const K &k){  return k.construct_bisector_2_object()(l1, l2);}template < class K >inlinetypename K::Point_2centroid(const typename CGAL_WRAP(K)::Point_2 &p,         const typename CGAL_WRAP(K)::Point_2 &q,         const typename CGAL_WRAP(K)::Point_2 &r, const K& k){  return k.construct_centroid_2_object()(p, q, r);}template < class K >inlinetypename K::Point_2centroid(const typename CGAL_WRAP(K)::Point_2 &p,         const typename CGAL_WRAP(K)::Point_2 &q,         const typename CGAL_WRAP(K)::Point_2 &r,         const typename CGAL_WRAP(K)::Point_2 &s, const K& k){  return k.construct_centroid_2_object()(p, q, r, s);}template < class K >inlinetypename K::Point_2centroid(const typename CGAL_WRAP(K)::Triangle_2 &t, const K& k){  return k.construct_centroid_2_object()(t);}template < class K >inlinetypename K::Point_2circumcenter(const typename CGAL_WRAP(K)::Point_2 &p,             const typename CGAL_WRAP(K)::Point_2 &q, const K& k){  return k.construct_circumcenter_2_object()(p, q);}template < class K >inlinetypename K::Point_2circumcenter(const typename CGAL_WRAP(K)::Point_2 &p,             const typename CGAL_WRAP(K)::Point_2 &q,             const typename CGAL_WRAP(K)::Point_2 &r, const K& k){  return k.construct_circumcenter_2_object()(p, q, r);}template < class K >inlinetypename K::Point_2circumcenter(const typename CGAL_WRAP(K)::Triangle_2 &t, const K& k){  return k.construct_circumcenter_2_object()(t);}template < class K >inlineboolcollinear(const typename CGAL_WRAP(K)::Point_2 &p,          const typename CGAL_WRAP(K)::Point_2 &q,          const typename CGAL_WRAP(K)::Point_2 &r, const K& k){  return k.collinear_2_object()(p, q, r);}template < class K >inlineboolcollinear_are_ordered_along_line(const typename CGAL_WRAP(K)::Point_2 &p,                                 const typename CGAL_WRAP(K)::Point_2 &q,                                 const typename CGAL_WRAP(K)::Point_2 &r,                                 const K& k){  return k.collinear_are_ordered_along_line_2_object()(p, q, r);}template < class K >inlineboolcollinear_are_strictly_ordered_along_line(             const typename CGAL_WRAP(K)::Point_2 &p,             const typename CGAL_WRAP(K)::Point_2 &q,             const typename CGAL_WRAP(K)::Point_2 &r, const K& k){  return k.collinear_are_strictly_ordered_along_line_2_object()(p, q, r);}template < typename K >inlineComparison_resultcompare_angle_with_x_axis(const typename CGAL_WRAP(K)::Direction_2& d1,                          const typename CGAL_WRAP(K)::Direction_2& d2,                          const K& k){  return k.compare_angle_with_x_axis_2_object()(d1, d2);}template <class K >inlineComparison_resultcompare_distance_to_point(const typename CGAL_WRAP(K)::Point_2 &p,                          const typename CGAL_WRAP(K)::Point_2 &q,                          const typename CGAL_WRAP(K)::Point_2 &r, const K& k){  return k.compare_distance_2_object()(p, q, r);}template <class K >inlineComparison_resultcompare_squared_distance(const typename CGAL_WRAP(K)::Point_2 &p,                         const typename CGAL_WRAP(K)::Point_2 &q,                         const typename CGAL_WRAP(K)::FT &d2, const K& k){  return k.compare_squared_distance_2_object()(p, q, d2);}template <class K>inlineComparison_resultcompare_signed_distance_to_line(const typename CGAL_WRAP(K)::Point_2& p,				const typename CGAL_WRAP(K)::Point_2& q,				const typename CGAL_WRAP(K)::Point_2& r,				const typename CGAL_WRAP(K)::Point_2& s,				const K& k){  if (k.less_signed_distance_to_line_2_object()(p, q, r, s)) return SMALLER;  if (k.less_signed_distance_to_line_2_object()(p, q, s, r)) return LARGER;  return EQUAL;}template <class K>inlineComparison_resultcompare_signed_distance_to_line(const typename CGAL_WRAP(K)::Line_2& l,				const typename CGAL_WRAP(K)::Point_2& p,				const typename CGAL_WRAP(K)::Point_2& q,				const K& k){  if (k.less_signed_distance_to_line_2_object()(l, p, q)) return SMALLER;  if (k.less_signed_distance_to_line_2_object()(l, q, p)) return LARGER;  return EQUAL;}template < class K >inlineComparison_resultcompare_slopes(const typename CGAL_WRAP(K)::Line_2 &l1,               const typename CGAL_WRAP(K)::Line_2 &l2, const K& k){  return k.compare_slope_2_object()(l1, l2);}template < class K >inlineComparison_resultcompare_slopes(const typename CGAL_WRAP(K)::Segment_2 &s1,               const typename CGAL_WRAP(K)::Segment_2 &s2, const K& k){  return k.compare_slope_2_object()(s1, s2);}template < class K >inlineComparison_resultcompare_x(const typename CGAL_WRAP(K)::Point_2 &p,          const typename CGAL_WRAP(K)::Point_2 &q, const K& k){  return k.compare_x_2_object()(p, q);}template < class K >inlineComparison_resultcompare_x(const typename CGAL_WRAP(K)::Point_2 &p,          const typename CGAL_WRAP(K)::Line_2 &l1,          const typename CGAL_WRAP(K)::Line_2 &l2, const K& k){  return k.compare_x_2_object()(p, l1, l2);}template < class K >inlineComparison_resultcompare_x(const typename CGAL_WRAP(K)::Line_2 &l,          const typename CGAL_WRAP(K)::Line_2 &h1,          const typename CGAL_WRAP(K)::Line_2 &h2, const K& k){  return k.compare_x_2_object()(l, h1, h2);}template < class K >inlineComparison_resultcompare_x(const typename CGAL_WRAP(K)::Line_2 &l1,          const typename CGAL_WRAP(K)::Line_2 &h1,          const typename CGAL_WRAP(K)::Line_2 &l2,          const typename CGAL_WRAP(K)::Line_2 &h2, const K& k){  return k.compare_x_2_object()(l1, h1, l2, h2);}template < class K >inlineComparison_resultcompare_x_at_y(const typename CGAL_WRAP(K)::Point_2& p,               const typename CGAL_WRAP(K)::Line_2& h, const K& k){  return k.compare_x_at_y_2_object()(p, h);}/* Undocumentedtemplate < class K >inlineComparison_resultcompare_y_at_x(const typename CGAL_WRAP(K)::Point_2 &p,               const typename CGAL_WRAP(K)::Segment_2 &s, const K& k){  return k.compare_y_at_x_2_object()(p, s);}*/template < class K >inlineComparison_resultcompare_x_at_y(const typename CGAL_WRAP(K)::Point_2 &p,               const typename CGAL_WRAP(K)::Line_2 &h1,               const typename CGAL_WRAP(K)::Line_2 &h2, const K& k){  return k.compare_x_at_y_2_object()(p, h1, h2);}template < class K >inlineComparison_resultcompare_x_at_y(const typename CGAL_WRAP(K)::Line_2 &l1,               const typename CGAL_WRAP(K)::Line_2 &l2,               const typename CGAL_WRAP(K)::Line_2 &h, const K& k){  return k.compare_x_at_y_2_object()(l1, l2, h);}template < class K >inlineComparison_resultcompare_x_at_y(const typename CGAL_WRAP(K)::Line_2 &l1,               const typename CGAL_WRAP(K)::Line_2 &l2,               const typename CGAL_WRAP(K)::Line_2 &h1,               const typename CGAL_WRAP(K)::Line_2 &h2, const K& k){  return k.compare_x_at_y_2_object()(l1, l2, h1, h2);}template < class K >inlineComparison_resultcompare_xy(const typename CGAL_WRAP(K)::Point_2 &p,           const typename CGAL_WRAP(K)::Point_2 &q, const K& k){  return k.compare_xy_2_object()(p, q);}template < class K >inlineComparison_resultcompare_yx(const typename CGAL_WRAP(K)::Point_2 &p,           const typename CGAL_WRAP(K)::Point_2 &q, const K& k){  return k.compare_yx_2_object()(p, q);}template < class K >inlineComparison_resultcompare_y(const typename CGAL_WRAP(K)::Point_2 &p,          const typename CGAL_WRAP(K)::Point_2 &q, const K& k){  return k.compare_y_2_object()(p, q);}template < class K >inlineComparison_resultcompare_y(const typename CGAL_WRAP(K)::Point_2 &p,          const typename CGAL_WRAP(K)::Line_2 &l1,          const typename CGAL_WRAP(K)::Line_2 &l2, const K& k){  return k.compare_y_2_object()(p, l1, l2);}template < class K >inlineComparison_resultcompare_y(const typename CGAL_WRAP(K)::Line_2 &l1,          const typename CGAL_WRAP(K)::Line_2 &l2,          const typename CGAL_WRAP(K)::Line_2 &h1,          const typename CGAL_WRAP(K)::Line_2 &h2, const K& k){  return k.compare_y_2_object()(l1, l2, h1, h2);}template < class K >inlineComparison_resultcompare_y(const typename CGAL_WRAP(K)::Line_2 &l,          const typename CGAL_WRAP(K)::Line_2 &h1,          const typename CGAL_WRAP(K)::Line_2 &h2, const K& k){

⌨️ 快捷键说明

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