From fbfe6b6ea0684f345b4727685a88eabbc21e9a41 Mon Sep 17 00:00:00 2001 From: Pedro Machado Manhaes de Castro Date: Thu, 24 Aug 2006 14:25:02 +0000 Subject: [PATCH] Curved_kernel -> Circular_kernel_2 [adapt] --- .../include/CGAL/Curved_kernel_converter.h | 140 ------------------ 1 file changed, 140 deletions(-) delete mode 100644 Circular_kernel_2/include/CGAL/Curved_kernel_converter.h diff --git a/Circular_kernel_2/include/CGAL/Curved_kernel_converter.h b/Circular_kernel_2/include/CGAL/Curved_kernel_converter.h deleted file mode 100644 index e289a9e60bb..00000000000 --- a/Circular_kernel_2/include/CGAL/Curved_kernel_converter.h +++ /dev/null @@ -1,140 +0,0 @@ -// Copyright (c) 2003-2006 INRIA Sophia-Antipolis (France). -// 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$ -// $Id$ -// -// Author(s) : Monique Teillaud, Sylvain Pion, Constantinos Tsirogiannis - -// Partially supported by the IST Programme of the EU as a Shared-cost -// RTD (FET Open) Project under Contract No IST-2000-26473 -// (ECG - Effective Computational Geometry for Curves and Surfaces) -// and a STREP (FET Open) Project under Contract No IST-006413 -// (ACS -- Algorithms for Complex Shapes) - -#ifndef CGAL_CURVED_KERNEL_CONVERTER_H -#define CGAL_CURVED_KERNEL_CONVERTER_H - -#include -#include -#include - -// TODO : -// - we should have a better default than Cartesian_converter. - -CGAL_BEGIN_NAMESPACE - -template < class C1, class C2, - class LK_converter = Cartesian_converter, - //typename C1::Linear_kernel, typename C2::Linear_kernel>, - class AK_converter = Algebraic_kernel_converter > -class Circular_kernel_converter - : public LK_converter -{ -public: - - typedef C1 Source_kernel; - typedef C2 Target_kernel; -// typedef typename C1::Linear_kernel L1; -// typedef typename C2::Linear_kernel L2; - typedef LK_converter Linear_kernel_converter; - typedef AK_converter Algebraic_kernel_converter; - typedef typename Linear_kernel_converter::Number_type_converter RT_type_converter; - typedef typename Algebraic_kernel_converter::Root_of_type_converter Root_of_type_converter; - - using LK_converter::operator(); - - typename C2::Circular_arc_point_2 - operator()(const typename C1::Circular_arc_point_2 &a) const - { - return typename C2::Circular_arc_point_2( typename C2::Circular_arc_point_2::Root_for_circles_2_2( - Root_of_type_converter()( a.x() ), - Root_of_type_converter()( a.y() ) - ) - ); - } - - typename C2::Circular_arc_2 - operator()(const typename C1::Circular_arc_2 &a) const - { - return typename C2::Circular_arc_2(operator()(a.supporting_circle()), - operator()(a.source()), - operator()(a.target())); - } - - - typename C2::Line_arc_2 - operator()(const typename C1::Line_arc_2 &a) const - { - return typename C2::Line_arc_2 ( operator()( a.supporting_line() ), - operator()( a.source() ), - operator()( a.target() ) ); - } - - - - typename C2::Object_2 - operator()(const typename C1::Object_2 &obj) const - { - - if (const typename C1::Circular_arc_2 * ptr = object_cast(&obj)) { - return make_object(operator()(*ptr)); - } else if (const typename C1::Circular_arc_point_2 * ptr = - object_cast(&obj)) { - return make_object(operator()(*ptr)); - } else if (const std::pair * ptr = - object_cast >(&obj)) { - return make_object(std::make_pair(operator()(ptr->first),ptr->second)); - } else if (const typename C1::Line_arc_2 * ptr = - object_cast(&obj)) { - return make_object(operator()(*ptr)); - } - CGAL_assertion_msg(false,"CircularK_converter is unable to determine what is wrapped in the Object"); - return Object(); - - } - - - std::vector - operator()(const std::vector& v) const - { - std::vector res; - res.reserve(v.size()); - for(unsigned int i = 0; i < v.size(); i++){ - res.push_back(operator()(v[i])); - } - return res; - } - - - - std::pair - operator()(const std::pair &a) const - { - return std::make_pair (operator()( a.first ), - operator()( a.second )); - } - - std::pair - operator()(const std::pair &a) const - { - return std::make_pair (operator()( a.first ), - operator()( a.second )); - } - -}; - -CGAL_END_NAMESPACE - -#endif // CGAL_CURVED_KERNEL_CONVERTER_H