mirror of https://github.com/CGAL/cgal
Merge pull request #785 from afabri/CGAL-missing_includes-GF
Partial cleanup of issue #595 Part2
This commit is contained in:
commit
00e6e03d5c
|
|
@ -49,20 +49,11 @@
|
|||
#include <CGAL/Algebraic_kernel_d/Interval_evaluate_1.h>
|
||||
#include <CGAL/Algebraic_kernel_d/Interval_evaluate_2.h>
|
||||
|
||||
#if CGAL_ACK_WITH_ROTATIONS
|
||||
#include <CGAL/Algebraic_curve_kernel_2/trigonometric_approximation.h>
|
||||
#endif
|
||||
|
||||
#include <CGAL/Polynomial_type_generator.h>
|
||||
#include <CGAL/polynomial_utils.h>
|
||||
|
||||
#if CGAL_ACK_USE_EXACUS
|
||||
#include <CGAL/Algebraic_curve_kernel_2/Curve_analysis_2_exacus.h>
|
||||
#include <CGAL/Algebraic_curve_kernel_2/Curve_pair_analysis_2_exacus.h>
|
||||
#else
|
||||
#include <CGAL/Algebraic_kernel_d/Curve_analysis_2.h>
|
||||
#include <CGAL/Algebraic_kernel_d/Curve_pair_analysis_2.h>
|
||||
#endif
|
||||
|
||||
#include <boost/shared_ptr.hpp>
|
||||
|
||||
|
|
@ -102,11 +93,7 @@ namespace CGAL {
|
|||
* when a kernel function deals with two polynomials,
|
||||
* implicitly or explicitly (e.g. \c Solve_2, \c Sign_at_2).
|
||||
*/
|
||||
#if CGAL_ACK_USE_EXACUS
|
||||
template < class AlgebraicCurvePair_2, class AlgebraicKernel_d_1 >
|
||||
#else
|
||||
template < class AlgebraicKernel_d_1 >
|
||||
#endif
|
||||
class Algebraic_curve_kernel_2 : public AlgebraicKernel_d_1{
|
||||
|
||||
// for each predicate functor defines a member function returning an instance
|
||||
|
|
@ -127,31 +114,14 @@ public:
|
|||
//! type of 1D algebraic kernel
|
||||
typedef AlgebraicKernel_d_1 Algebraic_kernel_d_1;
|
||||
|
||||
#if CGAL_ACK_USE_EXACUS
|
||||
// type of an internal curve pair
|
||||
typedef AlgebraicCurvePair_2 Internal_curve_pair_2;
|
||||
|
||||
// type of an internal curve
|
||||
typedef typename AlgebraicCurvePair_2::Algebraic_curve_2 Internal_curve_2;
|
||||
#endif
|
||||
|
||||
//! type of x-coordinate
|
||||
#if CGAL_ACK_USE_EXACUS
|
||||
typedef typename Internal_curve_2::X_coordinate Algebraic_real_1;
|
||||
#else
|
||||
typedef typename Algebraic_kernel_d_1::Algebraic_real_1 Algebraic_real_1;
|
||||
#endif
|
||||
|
||||
//! type of polynomial coefficient
|
||||
typedef typename Algebraic_kernel_d_1::Coefficient Coefficient;
|
||||
|
||||
// myself
|
||||
#if CGAL_ACK_USE_EXACUS
|
||||
typedef Algebraic_curve_kernel_2<AlgebraicCurvePair_2, AlgebraicKernel_d_1>
|
||||
Self;
|
||||
#else
|
||||
typedef Algebraic_curve_kernel_2<AlgebraicKernel_d_1> Self;
|
||||
#endif
|
||||
|
||||
typedef Self Algebraic_kernel_d_2;
|
||||
|
||||
|
|
@ -188,21 +158,13 @@ public:
|
|||
* type of the curve analysis, a model for the
|
||||
* \c AlgebraicKernelWithAnalysis_d_2::CurveAnalysis_2 concept
|
||||
*/
|
||||
#if CGAL_ACK_USE_EXACUS
|
||||
typedef internal::Curve_analysis_2<Self> Curve_analysis_2;
|
||||
#else
|
||||
typedef CGAL::Curve_analysis_2<Self> Curve_analysis_2;
|
||||
#endif
|
||||
|
||||
/*!
|
||||
* type of the curve pair analysis, a model for the
|
||||
* \c AlgebraicKernelWithAnalysis_d_2::CurvePairAnalysis_2 concept
|
||||
*/
|
||||
#if CGAL_ACK_USE_EXACUS
|
||||
typedef internal::Curve_pair_analysis_2<Self> Curve_pair_analysis_2;
|
||||
#else
|
||||
typedef CGAL::Curve_pair_analysis_2<Self> Curve_pair_analysis_2;
|
||||
#endif
|
||||
|
||||
//! traits class used for approximations of y-coordinates
|
||||
|
||||
|
|
@ -214,18 +176,11 @@ public:
|
|||
//!@}
|
||||
//! \name rebind operator
|
||||
//!@{
|
||||
#if CGAL_ACK_USE_EXACUS
|
||||
template <class NewCurvePair, class NewAlgebraicKernel>
|
||||
struct rebind {
|
||||
typedef Algebraic_curve_kernel_2<NewCurvePair,NewAlgebraicKernel>
|
||||
Other;
|
||||
};
|
||||
#else
|
||||
|
||||
template <class NewAlgebraicKernel>
|
||||
struct rebind {
|
||||
typedef Algebraic_curve_kernel_2<NewAlgebraicKernel> Other;
|
||||
};
|
||||
#endif
|
||||
|
||||
//!@}
|
||||
protected:
|
||||
|
|
@ -461,58 +416,6 @@ public:
|
|||
|
||||
Construct_curve_2(const Algebraic_kernel_d_2* kernel) : _m_kernel(kernel) {}
|
||||
|
||||
#if CGAL_ACK_WITH_ROTATIONS
|
||||
|
||||
Curve_analysis_2 operator()(const Polynomial_2& f,
|
||||
Bound angle,
|
||||
long final_prec) {
|
||||
|
||||
#if CGAL_ACK_DEBUG_FLAG
|
||||
CGAL_ACK_DEBUG_PRINT << "angle=" << angle << std::endl;
|
||||
CGAL_ACK_DEBUG_PRINT << "final_prec=" << final_prec << std::endl;
|
||||
#endif
|
||||
std::pair<Bound,Bound> sin_cos
|
||||
= approximate_sin_and_cos_of_angle(angle,final_prec);
|
||||
|
||||
Bound sine = sin_cos.first, cosine = sin_cos.second;
|
||||
|
||||
|
||||
typedef typename CGAL::Polynomial_traits_d<Polynomial_2>
|
||||
::template Rebind<Bound,1>::Other::Type
|
||||
Poly_rat_1;
|
||||
|
||||
typedef typename CGAL::Polynomial_traits_d<Polynomial_2>
|
||||
::template Rebind<Bound,2>::Other::Type
|
||||
Poly_rat_2;
|
||||
|
||||
Poly_rat_2
|
||||
sub_x(Poly_rat_1(Bound(0), cosine), Poly_rat_1(sine)),
|
||||
sub_y(Poly_rat_1(Bound(0), -sine), Poly_rat_1(cosine)),
|
||||
res;
|
||||
|
||||
std::vector<Poly_rat_2> subs;
|
||||
subs.push_back(sub_x);
|
||||
subs.push_back(sub_y);
|
||||
|
||||
res = typename CGAL::Polynomial_traits_d<Polynomial_2>
|
||||
::Substitute() (f, subs.begin(), subs.end());
|
||||
|
||||
CGAL::simplify(res);
|
||||
|
||||
// integralize polynomial
|
||||
typedef CGAL::Fraction_traits<Poly_rat_2> FT;
|
||||
typename FT::Denominator_type dummy;
|
||||
Polynomial_2 num;
|
||||
typename FT::Decompose()(res, num, dummy);
|
||||
|
||||
#if CGAL_ACK_DEBUG_FLAG
|
||||
CGAL_ACK_DEBUG_PRINT << "integralized poly: " << num << std::endl;
|
||||
#endif
|
||||
|
||||
return _m_kernel->curve_cache_2()(num);
|
||||
}
|
||||
|
||||
#endif //CGAL_ACK_WITH_ROTATIONS
|
||||
Curve_analysis_2 operator()
|
||||
(const Polynomial_2& f) const {
|
||||
return _m_kernel->curve_cache_2()(f);
|
||||
|
|
@ -1737,33 +1640,7 @@ public:
|
|||
#else
|
||||
|
||||
Construct_curve_2 cc_2 = _m_kernel->construct_curve_2_object();
|
||||
#if CGAL_ACK_USE_EXACUS
|
||||
typedef std::vector<Internal_curve_2> Curves;
|
||||
|
||||
Curves parts_f, parts_g;
|
||||
|
||||
if(Internal_curve_2::decompose(ca1._internal_curve(),
|
||||
ca2._internal_curve(),
|
||||
std::back_inserter(parts_f),
|
||||
std::back_inserter(parts_g))) {
|
||||
typename Curves::const_iterator cit;
|
||||
// this is temporary solution while curves are cached on
|
||||
// AlciX level
|
||||
CGAL_precondition(parts_f[0].polynomial_2() ==
|
||||
parts_g[0].polynomial_2());
|
||||
*oib++ = cc_2(parts_f[0].polynomial_2());
|
||||
|
||||
if(parts_f.size() > 1)
|
||||
for(cit = parts_f.begin() + 1; cit != parts_f.end(); cit++)
|
||||
*oi1++ = cc_2(cit->polynomial_2());
|
||||
if(parts_g.size() > 1)
|
||||
for(cit = parts_g.begin() + 1; cit != parts_g.end(); cit++)
|
||||
*oi2++ = cc_2(cit->polynomial_2());
|
||||
return true;
|
||||
}
|
||||
|
||||
|
||||
#else
|
||||
|
||||
|
||||
if (ca1.id() == ca2.id()) {
|
||||
return false;
|
||||
|
|
@ -1808,7 +1685,6 @@ public:
|
|||
return true;
|
||||
}
|
||||
|
||||
#endif
|
||||
|
||||
// copy original curves to the output iterator:
|
||||
*oi1++ = ca1;
|
||||
|
|
|
|||
|
|
@ -1,509 +0,0 @@
|
|||
// Copyright (c) 2003,2004 INRIA Sophia-Antipolis (France).
|
||||
// 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
|
||||
// General Public License as published by the Free Software Foundation,
|
||||
// either version 3 of the License, or (at your option) any later version.
|
||||
//
|
||||
// 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) : Menelaos Karavelas <mkaravel@iacm.forth.gr>
|
||||
|
||||
|
||||
|
||||
#ifndef CGAL_APOLLONIUS_GRAPH_UNCERTAIN_FILTERED_TRAITS_2_H
|
||||
#define CGAL_APOLLONIUS_GRAPH_UNCERTAIN_FILTERED_TRAITS_2_H
|
||||
|
||||
|
||||
#include <CGAL/Apollonius_graph_traits_2.h>
|
||||
#include <CGAL/Apollonius_graph_2/new_traits/Apollonius_graph_new_traits_2.h>
|
||||
|
||||
#include <CGAL/Filtered_predicate.h>
|
||||
#include <CGAL/Filtered_construction.h>
|
||||
|
||||
// includes for the default parameters of the filtered traits
|
||||
#include <CGAL/Simple_cartesian.h>
|
||||
#include <CGAL/MP_Float.h>
|
||||
#include <CGAL/Interval_arithmetic.h>
|
||||
#include <CGAL/Cartesian_converter.h>
|
||||
#include <CGAL/number_utils_classes.h>
|
||||
|
||||
|
||||
// new includes
|
||||
|
||||
#include <CGAL/Apollonius_graph_2/uncertain/Uncertain_is_hidden_C2.h>
|
||||
#include <CGAL/Apollonius_graph_2/uncertain/Uncertain_oriented_side_of_bisector_C2.h>
|
||||
#include <CGAL/Apollonius_graph_2/uncertain/Uncertain_vertex_conflict_2.h>
|
||||
|
||||
|
||||
namespace CGAL {
|
||||
|
||||
|
||||
//-----------------------------------------------------------------------
|
||||
//-----------------------------------------------------------------------
|
||||
//-----------------------------------------------------------------------
|
||||
//-----------------------------------------------------------------------
|
||||
// the filtered Traits class
|
||||
//-----------------------------------------------------------------------
|
||||
//-----------------------------------------------------------------------
|
||||
//-----------------------------------------------------------------------
|
||||
//-----------------------------------------------------------------------
|
||||
|
||||
template<class CK_t,
|
||||
class CK_MTag = Integral_domain_without_division_tag,
|
||||
class EK_t = Simple_cartesian< MP_Float >,
|
||||
class EK_MTag = CK_MTag,
|
||||
class FK_t = Simple_cartesian< Interval_nt<false> >,
|
||||
class FK_MTag = CK_MTag,
|
||||
class C2E_t = Cartesian_converter<CK_t, EK_t>,
|
||||
class C2F_t =
|
||||
Cartesian_converter<CK_t, FK_t, To_interval<typename CK_t::RT> > >
|
||||
class Apollonius_graph_uncertain_filtered_traits_2
|
||||
{
|
||||
private:
|
||||
typedef Apollonius_graph_traits_2<CK_t, CK_MTag> CK_traits;
|
||||
typedef Apollonius_graph_traits_2<FK_t, FK_MTag> FK_traits;
|
||||
typedef Apollonius_graph_traits_2<EK_t, EK_MTag> EK_traits;
|
||||
|
||||
typedef
|
||||
CGAL_APOLLONIUS_GRAPH_2_NS::Apollonius_graph_kernel_wrapper_2<CK_t> CK;
|
||||
|
||||
typedef
|
||||
CGAL_APOLLONIUS_GRAPH_2_NS::Apollonius_graph_kernel_wrapper_2<FK_t> FK;
|
||||
|
||||
typedef
|
||||
CGAL_APOLLONIUS_GRAPH_2_NS::Apollonius_graph_kernel_wrapper_2<EK_t> EK;
|
||||
|
||||
typedef
|
||||
CGAL_APOLLONIUS_GRAPH_2_NS::
|
||||
Apollonius_graph_cartesian_converter<CK, EK, C2E_t> C2E;
|
||||
|
||||
typedef
|
||||
CGAL_APOLLONIUS_GRAPH_2_NS::
|
||||
Apollonius_graph_cartesian_converter<CK, FK, C2F_t> C2F;
|
||||
|
||||
#if 0
|
||||
// the following typedefs have been made in the direction of
|
||||
// providing filtered constructions; however, there is a problem,
|
||||
// namely, the Construct_Apollonius_site_2 functor has two
|
||||
// different operator()'s with two different return types; this
|
||||
// functor should be split in two (along with the appropriate
|
||||
// changes in the spec/concept); see also changes needed for the
|
||||
// filtered construction below.
|
||||
typedef Cartesian_converter<FK, CK, To_double<typename FK::RT> > F2C_t;
|
||||
typedef Cartesian_converter<EK, CK, To_double<typename EK::RT> > E2C_t;
|
||||
|
||||
typedef
|
||||
Apollonius_graph_cartesian_converter<FK, CK, F2C_t> F2C;
|
||||
typedef
|
||||
Apollonius_graph_cartesian_converter<EK, CK, E2C_t> E2C;
|
||||
#endif
|
||||
|
||||
// Types for the construction kernel
|
||||
typedef typename CK::Point_2 CK_Point_2;
|
||||
typedef typename CK::Site_2 CK_Site_2;
|
||||
|
||||
typedef typename CK::Line_2 CK_Line_2;
|
||||
typedef typename CK::Ray_2 CK_Ray_2;
|
||||
typedef typename CK::Segment_2 CK_Segment_2;
|
||||
|
||||
typedef typename CK::FT CK_FT;
|
||||
typedef typename CK::RT CK_RT;
|
||||
|
||||
// Types for the exact kernel
|
||||
typedef typename EK::Point_2 EK_Point_2;
|
||||
typedef typename EK::Site_2 EK_Site_2;
|
||||
|
||||
typedef typename EK::Line_2 EK_Line_2;
|
||||
typedef typename EK::Ray_2 EK_Ray_2;
|
||||
typedef typename EK::Segment_2 EK_Segment_2;
|
||||
|
||||
typedef typename EK::FT EK_FT;
|
||||
typedef typename EK::RT EK_RT;
|
||||
|
||||
// Types for the filtering kernel
|
||||
typedef typename FK::Point_2 FK_Point_2;
|
||||
typedef typename FK::Site_2 FK_Site_2;
|
||||
|
||||
typedef typename FK::Line_2 FK_Line_2;
|
||||
typedef typename FK::Ray_2 FK_Ray_2;
|
||||
typedef typename FK::Segment_2 FK_Segment_2;
|
||||
|
||||
typedef typename FK::FT FK_FT;
|
||||
typedef typename FK::RT FK_RT;
|
||||
|
||||
public:
|
||||
//-----------------------------------------------------------------------
|
||||
// TYPE DEFINITIONS
|
||||
//-----------------------------------------------------------------------
|
||||
|
||||
// BASIC TYPES
|
||||
//------------
|
||||
typedef CK_t R;
|
||||
typedef CK_MTag Method_tag;
|
||||
|
||||
typedef CK_traits Construction_traits;
|
||||
typedef FK_traits Filtering_traits;
|
||||
typedef EK_traits Exact_traits;
|
||||
|
||||
typedef CK_MTag Construction_traits_method_tag;
|
||||
typedef FK_MTag Filtering_traits_method_tag;
|
||||
typedef EK_MTag Exact_traits_method_tag;
|
||||
|
||||
typedef typename CK::Point_2 Point_2;
|
||||
typedef typename CK::Site_2 Site_2;
|
||||
|
||||
typedef typename CK::Line_2 Line_2;
|
||||
typedef typename CK::Ray_2 Ray_2;
|
||||
typedef typename CK::Segment_2 Segment_2;
|
||||
|
||||
typedef typename CK::Object_2 Object_2;
|
||||
typedef typename CK::FT FT;
|
||||
typedef typename CK::RT RT;
|
||||
|
||||
|
||||
public:
|
||||
// OBJECT CONSTRUCTION & ASSIGNMENT
|
||||
//---------------------------------
|
||||
typedef typename CK_traits::Construct_object_2 Construct_object_2;
|
||||
typedef typename CK_traits::Assign_2 Assign_2;
|
||||
|
||||
// CONSTRUCTIONS
|
||||
//--------------
|
||||
// vertex and dual site
|
||||
protected:
|
||||
typedef typename CK_traits::Construct_Apollonius_vertex_2
|
||||
CK_Construct_Apollonius_vertex_2;
|
||||
|
||||
typedef typename CK_traits::Construct_Apollonius_site_2
|
||||
CK_Construct_Apollonius_site_2;
|
||||
|
||||
typedef typename FK_traits::Construct_Apollonius_vertex_2
|
||||
FK_Construct_Apollonius_vertex_2;
|
||||
|
||||
typedef typename FK_traits::Construct_Apollonius_site_2
|
||||
FK_Construct_Apollonius_site_2;
|
||||
|
||||
typedef typename EK_traits::Construct_Apollonius_vertex_2
|
||||
EK_Construct_Apollonius_vertex_2;
|
||||
|
||||
typedef typename EK_traits::Construct_Apollonius_site_2
|
||||
EK_Construct_Apollonius_site_2;
|
||||
|
||||
public:
|
||||
#if 0
|
||||
// the following typedefs have been made in the direction of
|
||||
// providing filtered constructions; however, there is a problem,
|
||||
// namely, the Construct_Apollonius_site_2 functor has two
|
||||
// different operator()'s with two different return types; this
|
||||
// functor should be split in two (along with the appropriate
|
||||
// changes in the spec/concept); see also changes needed for the
|
||||
// filtered construction above.
|
||||
typedef Filtered_construction<CK_Construct_Apollonius_vertex_2,
|
||||
EK_Construct_Apollonius_vertex_2,
|
||||
FK_Construct_Apollonius_vertex_2,
|
||||
C2E, C2F, E2C, F2C>
|
||||
Construct_Apollonius_vertex_2;
|
||||
|
||||
typedef Filtered_construction<CK_Construct_Apollonius_site_2,
|
||||
EK_Construct_Apollonius_site_2,
|
||||
FK_Construct_Apollonius_site_2,
|
||||
C2E, C2F, E2C, F2C>
|
||||
Construct_Apollonius_site_2;
|
||||
#else
|
||||
typedef typename CK_traits::Construct_Apollonius_vertex_2
|
||||
Construct_Apollonius_vertex_2;
|
||||
|
||||
typedef typename CK_traits::Construct_Apollonius_site_2
|
||||
Construct_Apollonius_site_2;
|
||||
#endif
|
||||
|
||||
private:
|
||||
// PREDICATES FOR THE TWO KERNELS
|
||||
//-------------------------------
|
||||
|
||||
#if 0
|
||||
// Predicates for the filtering kernel
|
||||
typedef typename FK_traits::Compare_x_2 FK_Compare_x_2;
|
||||
typedef typename FK_traits::Compare_y_2 FK_Compare_y_2;
|
||||
typedef typename FK_traits::Compare_weight_2 FK_Compare_weight_2;
|
||||
typedef typename FK_traits::Orientation_2 FK_Orientation_2;
|
||||
typedef typename FK_traits::Is_hidden_2 FK_Is_hidden_2;
|
||||
|
||||
typedef typename FK_traits::Oriented_side_of_bisector_2
|
||||
FK_Oriented_side_of_bisector_2;
|
||||
|
||||
typedef typename FK_traits::Vertex_conflict_2 FK_Vertex_conflict_2;
|
||||
|
||||
typedef typename FK_traits::Finite_edge_interior_conflict_2
|
||||
FK_Finite_edge_interior_conflict_2;
|
||||
|
||||
typedef typename FK_traits::Infinite_edge_interior_conflict_2
|
||||
FK_Infinite_edge_interior_conflict_2;
|
||||
|
||||
typedef typename FK_traits::Is_degenerate_edge_2
|
||||
FK_Is_degenerate_edge_2;
|
||||
|
||||
|
||||
// Predicates for the exact kernel
|
||||
typedef typename EK_traits::Compare_x_2 EK_Compare_x_2;
|
||||
typedef typename EK_traits::Compare_y_2 EK_Compare_y_2;
|
||||
typedef typename EK_traits::Compare_weight_2 EK_Compare_weight_2;
|
||||
typedef typename EK_traits::Orientation_2 EK_Orientation_2;
|
||||
typedef typename EK_traits::Is_hidden_2 EK_Is_hidden_2;
|
||||
|
||||
typedef typename EK_traits::Oriented_side_of_bisector_2
|
||||
EK_Oriented_side_of_bisector_2;
|
||||
|
||||
typedef typename EK_traits::Vertex_conflict_2 EK_Vertex_conflict_2;
|
||||
|
||||
typedef typename EK_traits::Finite_edge_interior_conflict_2
|
||||
EK_Finite_edge_interior_conflict_2;
|
||||
|
||||
typedef typename EK_traits::Infinite_edge_interior_conflict_2
|
||||
EK_Infinite_edge_interior_conflict_2;
|
||||
|
||||
typedef typename EK_traits::Is_degenerate_edge_2
|
||||
EK_Is_degenerate_edge_2;
|
||||
#else
|
||||
// Predicates for the filtering kernel
|
||||
typedef
|
||||
CGAL_APOLLONIUS_GRAPH_2_NS::Compare_x_2<FK>
|
||||
FK_Compare_x_2;
|
||||
|
||||
typedef
|
||||
CGAL_APOLLONIUS_GRAPH_2_NS::Compare_y_2<FK>
|
||||
FK_Compare_y_2;
|
||||
|
||||
typedef
|
||||
CGAL_APOLLONIUS_GRAPH_2_NS::Compare_weight_2<FK>
|
||||
FK_Compare_weight_2;
|
||||
|
||||
typedef
|
||||
CGAL_APOLLONIUS_GRAPH_2_NS::Orientation_2<FK,FK_MTag>
|
||||
FK_Orientation_2;
|
||||
|
||||
// typedef Ag2_uncertain_is_hidden_C2<FK,FK_MTag> FK_Is_hidden_2;
|
||||
typedef
|
||||
CGAL_APOLLONIUS_GRAPH_2_NS::Is_hidden_2<FK,FK_MTag>
|
||||
FK_Is_hidden_2;
|
||||
|
||||
// typedef Uncertain_vertex_conflict_new_2<FK,FK_MTag>
|
||||
typedef
|
||||
CGAL_APOLLONIUS_GRAPH_2_NS::Vertex_conflict_new_2<FK,FK_MTag>
|
||||
FK_Vertex_conflict_2;
|
||||
|
||||
// typedef Ag2_uncertain_oriented_side_of_bisector_C2<FK,FK_MTag>
|
||||
typedef
|
||||
CGAL_APOLLONIUS_GRAPH_2_NS::Oriented_side_of_bisector_2<FK,FK_MTag>
|
||||
FK_Oriented_side_of_bisector_2;
|
||||
|
||||
// typedef Finite_edge_interior_conflict_new_2<FK,FK_MTag>
|
||||
typedef
|
||||
CGAL_APOLLONIUS_GRAPH_2_NS::Finite_edge_interior_conflict_2<FK,FK_MTag>
|
||||
FK_Finite_edge_interior_conflict_2;
|
||||
|
||||
// typedef Infinite_edge_interior_conflict_new_2<FK,FK_MTag>
|
||||
typedef
|
||||
CGAL_APOLLONIUS_GRAPH_2_NS::Infinite_edge_interior_conflict_2<FK,FK_MTag>
|
||||
FK_Infinite_edge_interior_conflict_2;
|
||||
|
||||
typedef
|
||||
CGAL_APOLLONIUS_GRAPH_2_NS::Is_degenerate_edge_2<FK,FK_MTag>
|
||||
FK_Is_degenerate_edge_2;
|
||||
|
||||
// Predicates for the exact kernel
|
||||
typedef
|
||||
CGAL_APOLLONIUS_GRAPH_2_NS::Compare_x_2<EK>
|
||||
EK_Compare_x_2;
|
||||
|
||||
typedef
|
||||
CGAL_APOLLONIUS_GRAPH_2_NS::Compare_y_2<EK>
|
||||
EK_Compare_y_2;
|
||||
|
||||
typedef
|
||||
CGAL_APOLLONIUS_GRAPH_2_NS::Compare_weight_2<EK>
|
||||
EK_Compare_weight_2;
|
||||
|
||||
typedef
|
||||
CGAL_APOLLONIUS_GRAPH_2_NS::Orientation_2<EK,EK_MTag>
|
||||
EK_Orientation_2;
|
||||
|
||||
// typedef Ag2_uncertain_is_hidden_C2<EK,EK_MTag> EK_Is_hidden_2;
|
||||
typedef
|
||||
CGAL_APOLLONIUS_GRAPH_2_NS::Is_hidden_2<EK,EK_MTag>
|
||||
EK_Is_hidden_2;
|
||||
|
||||
// typedef Uncertain_vertex_conflict_new_2<EK,EK_MTag>
|
||||
typedef
|
||||
CGAL_APOLLONIUS_GRAPH_2_NS::Vertex_conflict_new_2<EK,EK_MTag>
|
||||
EK_Vertex_conflict_2;
|
||||
|
||||
// typedef Ag2_uncertain_oriented_side_of_bisector_C2<EK,EK_MTag>
|
||||
typedef
|
||||
CGAL_APOLLONIUS_GRAPH_2_NS::Oriented_side_of_bisector_2<EK,EK_MTag>
|
||||
EK_Oriented_side_of_bisector_2;
|
||||
|
||||
// typedef Finite_edge_interior_conflict_new_2<EK,EK_MTag>
|
||||
typedef
|
||||
CGAL_APOLLONIUS_GRAPH_2_NS::Finite_edge_interior_conflict_2<EK,EK_MTag>
|
||||
EK_Finite_edge_interior_conflict_2;
|
||||
|
||||
// typedef Infinite_edge_interior_conflict_new_2<EK,EK_MTag>
|
||||
typedef
|
||||
CGAL_APOLLONIUS_GRAPH_2_NS::Infinite_edge_interior_conflict_2<EK,EK_MTag>
|
||||
EK_Infinite_edge_interior_conflict_2;
|
||||
|
||||
typedef
|
||||
CGAL_APOLLONIUS_GRAPH_2_NS::Is_degenerate_edge_2<EK,EK_MTag>
|
||||
EK_Is_degenerate_edge_2;
|
||||
#endif
|
||||
|
||||
public:
|
||||
// PREDICATES
|
||||
//-----------
|
||||
|
||||
typedef
|
||||
Filtered_predicate<EK_Compare_x_2, FK_Compare_x_2, C2E, C2F>
|
||||
Compare_x_2;
|
||||
|
||||
typedef
|
||||
Filtered_predicate<EK_Compare_y_2, FK_Compare_y_2, C2E, C2F>
|
||||
Compare_y_2;
|
||||
|
||||
typedef
|
||||
Filtered_predicate<EK_Compare_weight_2, FK_Compare_weight_2,
|
||||
C2E, C2F>
|
||||
Compare_weight_2;
|
||||
|
||||
typedef
|
||||
Filtered_predicate<EK_Orientation_2, FK_Orientation_2, C2E, C2F>
|
||||
Orientation_2;
|
||||
|
||||
typedef
|
||||
Filtered_predicate<EK_Is_hidden_2, FK_Is_hidden_2, C2E, C2F>
|
||||
Is_hidden_2;
|
||||
|
||||
typedef
|
||||
Filtered_predicate<EK_Oriented_side_of_bisector_2,
|
||||
FK_Oriented_side_of_bisector_2, C2E, C2F>
|
||||
Oriented_side_of_bisector_2;
|
||||
|
||||
typedef
|
||||
Filtered_predicate<EK_Vertex_conflict_2,
|
||||
FK_Vertex_conflict_2, C2E, C2F>
|
||||
Vertex_conflict_2;
|
||||
|
||||
typedef
|
||||
Filtered_predicate<EK_Finite_edge_interior_conflict_2,
|
||||
FK_Finite_edge_interior_conflict_2, C2E, C2F>
|
||||
Finite_edge_interior_conflict_2;
|
||||
|
||||
typedef
|
||||
Filtered_predicate<EK_Infinite_edge_interior_conflict_2,
|
||||
FK_Infinite_edge_interior_conflict_2, C2E, C2F>
|
||||
Infinite_edge_interior_conflict_2;
|
||||
|
||||
typedef
|
||||
Filtered_predicate<EK_Is_degenerate_edge_2,
|
||||
FK_Is_degenerate_edge_2, C2E, C2F>
|
||||
Is_degenerate_edge_2;
|
||||
|
||||
public:
|
||||
//-----------------------------------------------------------------------
|
||||
// ACCESS TO OBJECTS
|
||||
//-----------------------------------------------------------------------
|
||||
|
||||
// OBJECT CONSTRUCTION & ASSIGNMENT
|
||||
Assign_2
|
||||
assign_2_object() const {
|
||||
return Assign_2();
|
||||
}
|
||||
|
||||
Construct_object_2
|
||||
construct_object_2_object() const {
|
||||
return Construct_object_2();
|
||||
}
|
||||
|
||||
|
||||
// CONSTRUCTIONS
|
||||
//--------------
|
||||
Construct_Apollonius_vertex_2
|
||||
construct_Apollonius_vertex_2_object() const {
|
||||
return Construct_Apollonius_vertex_2();
|
||||
}
|
||||
|
||||
Construct_Apollonius_site_2
|
||||
construct_Apollonius_site_2_object() const {
|
||||
return Construct_Apollonius_site_2();
|
||||
}
|
||||
|
||||
// PREDICATES
|
||||
//-----------
|
||||
Compare_x_2
|
||||
compare_x_2_object() const {
|
||||
return Compare_x_2();
|
||||
}
|
||||
|
||||
Compare_y_2
|
||||
compare_y_2_object() const {
|
||||
return Compare_y_2();
|
||||
}
|
||||
|
||||
Compare_weight_2
|
||||
compare_weight_2_object() const {
|
||||
return Compare_weight_2();
|
||||
}
|
||||
|
||||
Orientation_2
|
||||
orientation_2_object() const {
|
||||
return Orientation_2();
|
||||
}
|
||||
|
||||
Is_hidden_2
|
||||
is_hidden_2_object() const {
|
||||
return Is_hidden_2();
|
||||
}
|
||||
|
||||
Oriented_side_of_bisector_2
|
||||
oriented_side_of_bisector_2_object() const {
|
||||
return Oriented_side_of_bisector_2();
|
||||
}
|
||||
|
||||
Vertex_conflict_2
|
||||
vertex_conflict_2_object() const {
|
||||
return Vertex_conflict_2();
|
||||
}
|
||||
|
||||
Finite_edge_interior_conflict_2
|
||||
finite_edge_interior_conflict_2_object() const {
|
||||
return Finite_edge_interior_conflict_2();
|
||||
}
|
||||
|
||||
Infinite_edge_interior_conflict_2
|
||||
infinite_edge_interior_conflict_2_object() const {
|
||||
return Infinite_edge_interior_conflict_2();
|
||||
}
|
||||
|
||||
Is_degenerate_edge_2
|
||||
is_degenerate_edge_2_object() const {
|
||||
return Is_degenerate_edge_2();
|
||||
}
|
||||
|
||||
};
|
||||
|
||||
|
||||
|
||||
} //namespace CGAL
|
||||
|
||||
|
||||
#endif // CGAL_APOLLONIUS_GRAPH_UNCERTAIN_FILTERED_TRAITS_2_H
|
||||
|
|
@ -32,7 +32,6 @@
|
|||
|
||||
#include <CGAL/Curved_kernel_via_analysis_2/Arc_2.h>
|
||||
|
||||
//#include <CGAL/IO/Qt_widget.h>
|
||||
|
||||
namespace CGAL {
|
||||
|
||||
|
|
|
|||
|
|
@ -390,6 +390,5 @@ namespace boost {
|
|||
};
|
||||
} // namespace boost
|
||||
|
||||
//#include <CGAL/graph_traits_Delaunay_delaunay_triangulation_2.h>
|
||||
|
||||
#endif // CGAL_GRAPH_TRAITS_DELAUNAY_TRIANGULATION_2_H
|
||||
|
|
|
|||
|
|
@ -868,6 +868,5 @@ namespace std {
|
|||
|
||||
} // namespace std
|
||||
|
||||
//#include <CGAL/graph_traits_Delaunay_triangulation_2.h>
|
||||
|
||||
#endif // CGAL_GRAPH_TRAITS_TRIANGULATION_2_H
|
||||
|
|
|
|||
|
|
@ -42,8 +42,6 @@
|
|||
#endif
|
||||
|
||||
|
||||
// maybe it is better to change to the bbox filtered one
|
||||
//#include <CGAL/Lazy_circular_kernel_2.h>
|
||||
#include <CGAL/Filtered_bbox_circular_kernel_2.h>
|
||||
|
||||
namespace CGAL {
|
||||
|
|
|
|||
|
|
@ -30,7 +30,7 @@
|
|||
#include <CGAL/Eigen_svd.h>
|
||||
#else
|
||||
#ifdef CGAL_LAPACK_ENABLED
|
||||
#include <CGAL/Lapack/Linear_algebra_lapack.h>
|
||||
#include <CGAL/Lapack_svd.h>
|
||||
#endif
|
||||
#endif
|
||||
|
||||
|
|
|
|||
|
|
@ -1,36 +0,0 @@
|
|||
// Copyright (c) 1997-2000
|
||||
// Utrecht University (The Netherlands),
|
||||
// ETH Zurich (Switzerland),
|
||||
// INRIA Sophia-Antipolis (France),
|
||||
// Max-Planck-Institute Saarbruecken (Germany),
|
||||
// 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; either version 3 of the License,
|
||||
// or (at your option) any later version.
|
||||
//
|
||||
// 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) : Michael Seel <seel@mpi-sb.mpg.de>
|
||||
|
||||
#if defined(CGAL_POINTCD_H) && defined(CGAL_VECTORCD_H) && \
|
||||
defined(CGAL_DIRECTIONCD_H) && defined(CGAL_HYPERPLANECD_H) && \
|
||||
defined(CGAL_AFF_TRANSFORMATIONCD_H) && !defined(CGAL_PVDHACD_C)
|
||||
#define CGAL_PVDHACD_C
|
||||
|
||||
#include <CGAL/Kernel_d/PointCd_impl.h>
|
||||
#include <CGAL/Kernel_d/VectorCd_impl.h>
|
||||
#include <CGAL/Kernel_d/DirectionCd_impl.h>
|
||||
#include <CGAL/Kernel_d/HyperplaneCd_impl.h>
|
||||
#include <CGAL/Kernel_d/Aff_transformationCd_impl.h>
|
||||
|
||||
#endif //CGAL_PVDHACD_C
|
||||
|
|
@ -1,36 +0,0 @@
|
|||
// Copyright (c) 1997-2000
|
||||
// Utrecht University (The Netherlands),
|
||||
// ETH Zurich (Switzerland),
|
||||
// INRIA Sophia-Antipolis (France),
|
||||
// Max-Planck-Institute Saarbruecken (Germany),
|
||||
// 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; either version 3 of the License,
|
||||
// or (at your option) any later version.
|
||||
//
|
||||
// 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) : Michael Seel <seel@mpi-sb.mpg.de>
|
||||
|
||||
#if defined(CGAL_POINTHD_H) && defined(CGAL_VECTORHD_H) && \
|
||||
defined(CGAL_DIRECTIONHD_H) && defined(CGAL_HYPERPLANEHD_H) && \
|
||||
defined(CGAL_AFF_TRANSFORMATIONHD_H) && !defined(CGAL_PVDHAHD_C)
|
||||
#define CGAL_PVDHAHD_C
|
||||
|
||||
#include <CGAL/Kernel_d/PointHd_impl.h>
|
||||
#include <CGAL/Kernel_d/VectorHd_impl.h>
|
||||
#include <CGAL/Kernel_d/DirectionHd_impl.h>
|
||||
#include <CGAL/Kernel_d/HyperplaneHd_impl.h>
|
||||
#include <CGAL/Kernel_d/Aff_transformationHd_impl.h>
|
||||
|
||||
#endif //CGAL_PVDHAHD_C
|
||||
|
|
@ -45,5 +45,4 @@ public:
|
|||
|
||||
} } //namespace CGAL::Kinetic
|
||||
|
||||
//#include <CGAL/Kinetic_internals/kernel_undefs.h>
|
||||
#endif
|
||||
|
|
|
|||
|
|
@ -29,7 +29,7 @@
|
|||
#include <iostream>
|
||||
#include <CGAL/Kinetic/Ref_counted.h>
|
||||
#include <CGAL/Kinetic/internal/To_static.h>
|
||||
//#include <CGAL/Kinetic/Cartesian_static_converter.h>
|
||||
|
||||
|
||||
#define CGAL_MSA(Pred, pred, Arg, d) typedef Instantaneous_adaptor<typename Static_kernel::Pred##_##d, typename Kinetic_kernel::Pred##_##d, Rep, Arg> Pred##_##d; \
|
||||
Pred##_##d pred##_##d##_object() const \
|
||||
|
|
|
|||
|
|
@ -28,7 +28,7 @@
|
|||
#include <iostream>
|
||||
#include <CGAL/Kinetic/Ref_counted.h>
|
||||
#include <CGAL/Kinetic/internal/To_static.h>
|
||||
//#include <CGAL/Kinetic/Cartesian_static_converter.h>
|
||||
|
||||
|
||||
/*#define CGAL_MSA(Pred, pred, Arg, d) typedef Instantaneous_adaptor<typename Static_kernel::Pred##_##d, Current_coordinates, Arg> Pred##_##d; \
|
||||
Pred##_##d pred##_##d##_object() const \
|
||||
|
|
|
|||
|
|
@ -1,759 +0,0 @@
|
|||
// Copyright (c) 2005 Stanford University (USA).
|
||||
// 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; either version 3 of the License,
|
||||
// or (at your option) any later version.
|
||||
//
|
||||
// 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) : Daniel Russel <drussel@alumni.princeton.edu>
|
||||
|
||||
#ifndef CGAL_KINETIC_KINETIC_TRIANGULATION_2_H
|
||||
#define CGAL_KINETIC_KINETIC_TRIANGULATION_2_H
|
||||
#include <CGAL/Kinetic/basic.h>
|
||||
|
||||
#include <CGAL/Kinetic/Triangulation_face_base_2.h>
|
||||
#include <CGAL/Kinetic/Triangulation_vertex_base_2.h>
|
||||
#include <CGAL/Kinetic/Triangulation_visitor_base_2.h>
|
||||
#include <CGAL/Kinetic/Active_objects_batch_listener_helper.h>
|
||||
#include <CGAL/Kinetic/Simulator_kds_listener.h>
|
||||
#include <CGAL/Kinetic/internal/tds_2_helpers.h>
|
||||
#include <CGAL/Triangulation_2.h>
|
||||
#include <CGAL/Kinetic/Ref_counted.h>
|
||||
#include <iterator>
|
||||
#include <CGAL/Kinetic/Event_base.h>
|
||||
#include <CGAL/Kinetic/Triangulation_default_traits_2.h>
|
||||
|
||||
namespace CGAL { namespace Kinetic {
|
||||
#ifdef NDEBUG
|
||||
#define CGAL_TRIANGULATION_2_DEBUG(x)
|
||||
#else
|
||||
#define CGAL_TRIANGULATION_2_DEBUG(x) x
|
||||
#endif
|
||||
|
||||
template <class KDel>
|
||||
struct Triangulation_event: public Event_base<KDel*> {
|
||||
typedef Event_base<KDel*> P;
|
||||
Triangulation_event(const typename KDel::Face_handle &e,
|
||||
KDel *kdel): P(kdel), e_(e) {}
|
||||
const typename KDel::Face_handle face() const {
|
||||
return e_;
|
||||
}
|
||||
KDel* kdel() {
|
||||
return P::kds();
|
||||
}
|
||||
|
||||
KDel* kdel() const {
|
||||
return P::kds();
|
||||
}
|
||||
void process() {
|
||||
kdel()->handle_failure(e_);
|
||||
}
|
||||
|
||||
void audit(typename KDel::Event_key k) const {
|
||||
kdel()->audit_event(k, e_);
|
||||
}
|
||||
|
||||
CGAL::Comparison_result compare_concurrent(typename KDel::Event_key a,
|
||||
typename KDel::Event_key b) const {
|
||||
return kdel()->compare_concurrent(a, b);
|
||||
}
|
||||
|
||||
std::ostream& write(std::ostream &out) const
|
||||
{
|
||||
out << "Face " << e_->vertex(0)->point() << ", "
|
||||
<< e_->vertex(1)->point()
|
||||
<< ", " << e_->vertex(2)->point() ;
|
||||
return out;
|
||||
}
|
||||
const typename KDel::Face_handle e_;
|
||||
};
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
//! A 2D kinetic triangulation.
|
||||
/*! There is one certificate for each face. For the internal faces
|
||||
(inside the convex hull), that certificate is for the face
|
||||
collapsing at which point we need to figure out which edge to flip.
|
||||
|
||||
For the faces outside the convex hull, the certificate is for the
|
||||
edge that is CCW from the infinite vertex and for whether the other
|
||||
vertex on the edge leaves the convex hull.
|
||||
|
||||
The annoying part is how to figure out which edge to flip when an
|
||||
internal face collapses. As far as I can tell this requires
|
||||
evaluating which point is in the segment defined by which other two,
|
||||
so four 1D orientation predicates.
|
||||
*/
|
||||
template <class Simulation_traits_t,
|
||||
class Visitor= Triangulation_visitor_base_2,
|
||||
class Tri
|
||||
= CGAL::Triangulation_2<typename Simulation_traits_t::Instantaneous_kernel,
|
||||
CGAL::Triangulation_data_structure_2<
|
||||
Triangulation_vertex_base_2<typename Simulation_traits_t::Instantaneous_kernel>,
|
||||
CGAL::Kinetic::Triangulation_face_base_2<Simulation_traits_t > > >,
|
||||
class Triangulation_traits_t= Triangulation_default_traits_2<Simulation_traits_t, Tri> >
|
||||
class Triangulation_2:
|
||||
public Ref_counted<Triangulation_2<Simulation_traits_t, Visitor, Tri, Triangulation_traits_t> >
|
||||
{
|
||||
|
||||
typedef CGAL::Triangulation_2<typename Simulation_traits_t::Instantaneous_kernel,
|
||||
CGAL::Triangulation_data_structure_2<
|
||||
Triangulation_vertex_base_2<typename Simulation_traits_t::Instantaneous_kernel>,
|
||||
CGAL::Kinetic::Triangulation_face_base_2<Simulation_traits_t > > > Basic_Delaunay;
|
||||
|
||||
public:
|
||||
typedef Triangulation_traits_t Traits;
|
||||
typedef Simulation_traits_t Simulation_traits;
|
||||
typedef Triangulation_2<Simulation_traits, Visitor, Tri, Traits> This;
|
||||
|
||||
typedef typename Simulation_traits::Kinetic_kernel Kinetic_kernel;
|
||||
typedef typename Simulation_traits::Simulator Simulator;
|
||||
typedef typename Simulation_traits::Active_points_2_table Moving_point_table;
|
||||
|
||||
typedef typename Moving_point_table::Key Point_key;
|
||||
typedef typename Simulator::Event_key Event_key;
|
||||
//typedef typename Simulator::Root_stack Root_stack;
|
||||
|
||||
typedef typename Traits::Triangulation Triangulation;
|
||||
|
||||
typedef typename Triangulation::Edge_circulator Edge_circulator;
|
||||
typedef typename Triangulation::Face_circulator Face_circulator;
|
||||
typedef typename Triangulation::Finite_edges_iterator Finite_edges_iterator;
|
||||
//typedef typename Triangulation::Edge_iterator Edge_iterator;
|
||||
|
||||
typedef typename Triangulation::Geom_traits::Point_2 Del_point;
|
||||
|
||||
typedef typename Triangulation::Vertex_handle Vertex_handle;
|
||||
typedef typename Triangulation::Face_handle Face_handle;
|
||||
typedef typename Triangulation::Edge Edge;
|
||||
typedef typename Triangulation::All_faces_iterator Face_iterator;
|
||||
typedef typename Triangulation::All_edges_iterator Edge_iterator;
|
||||
typedef typename Traits::Certificate_data Certificate_data;
|
||||
typedef typename Traits::Time Time;
|
||||
typedef internal::Triangulation_data_structure_helper_2<typename Triangulation::Triangulation_data_structure> TDS_helper;
|
||||
|
||||
typedef Triangulation_event<This> Event;
|
||||
|
||||
//friend class Delaunay_edge_failure_event<This>;
|
||||
//friend class Delaunay_hull_edge_failure_event<This>;
|
||||
|
||||
typedef typename CGAL::Kinetic::Simulator_kds_listener<typename Simulator::Listener, This> Simulator_listener;
|
||||
friend class CGAL::Kinetic::Simulator_kds_listener<typename Simulator::Listener, This>;
|
||||
typedef typename CGAL::Kinetic::Active_objects_batch_listener_helper<typename Moving_point_table::Listener, This> Moving_point_table_listener;
|
||||
friend class CGAL::Kinetic::Active_objects_batch_listener_helper<typename Moving_point_table::Listener, This>;
|
||||
|
||||
/*struct Compare_edges{
|
||||
bool operator()(const Edge &a, const Edge &b) const {
|
||||
Point_key a0, a1, b0, b1;
|
||||
a0= a.first->vertex((a.second+1)%3)->point();
|
||||
a1= a.first->vertex((a.second+2)%3)->point();
|
||||
b0= b.first->vertex((b.second+1)%3)->point();
|
||||
b1= b.first->vertex((b.second+2)%3)->point();
|
||||
if (a0 > a1) std::swap(a0, a1);
|
||||
if (b0 > b1) std::swap(b0, b1);
|
||||
if (a0 < b0) return true;
|
||||
else if (a0 > b0) return false;
|
||||
else return a1 < b1;
|
||||
}
|
||||
};*/
|
||||
|
||||
void init_data(bool insert) {
|
||||
siml_ = Simulator_listener(traits_.simulator_handle(), this);
|
||||
motl_= Moving_point_table_listener(traits_.active_points_2_table_handle(), this, insert);
|
||||
has_certificates_=false;
|
||||
clear_stats();
|
||||
|
||||
batching_=false;
|
||||
}
|
||||
|
||||
public:
|
||||
|
||||
Triangulation_2(Traits st,
|
||||
Triangulation del,
|
||||
Visitor w= Visitor()):
|
||||
traits_(st),
|
||||
watcher_(w),
|
||||
del_(del) {
|
||||
vhs_.resize(del_.number_of_vertices());
|
||||
for (typename Triangulation::Vertex_iterator vit = del_.vertices_begin(); vit != del_.vertices_end(); ++vit) {
|
||||
CGAL_assertion(vit->point().index() < del_.number_of_vertices());
|
||||
vhs_[vit->point().index()]=vit;
|
||||
}
|
||||
init_data(false);
|
||||
|
||||
set_has_certificates(true);
|
||||
}
|
||||
|
||||
Triangulation_2(Simulation_traits st,
|
||||
Visitor w= Visitor()):
|
||||
traits_(st),
|
||||
watcher_(w),
|
||||
del_(traits_.instantaneous_kernel_object()) {
|
||||
init_data(true);
|
||||
set_has_certificates(true);
|
||||
}
|
||||
|
||||
|
||||
|
||||
//! Just write the objects in order;
|
||||
void write(std::ostream &out) const
|
||||
{
|
||||
out << del_;
|
||||
}
|
||||
|
||||
void clear_stats() {
|
||||
num_events_=0;
|
||||
// num_single_certificates_=0;
|
||||
}
|
||||
|
||||
void write_stats(std::ostream &out) const {
|
||||
out << "Num events is " << num_events_ << std::endl;
|
||||
}
|
||||
|
||||
const Triangulation &triangulation(const typename Simulator::NT &t) const
|
||||
{
|
||||
//update_instantaneous_kernel_time();
|
||||
del_.geom_traits().set_time(t);
|
||||
return del_;
|
||||
}
|
||||
|
||||
const Triangulation &triangulation() const
|
||||
{
|
||||
return del_;
|
||||
}
|
||||
|
||||
|
||||
// for Qt_triangulation
|
||||
/*Event_key null_event() const {
|
||||
return traits_.simulator_handle()->null_event();
|
||||
}*/
|
||||
|
||||
/*const Simulation_traits& simulation_traits_object() const {
|
||||
return traits_;
|
||||
}*/
|
||||
|
||||
typedef typename Triangulation::Triangulation_data_structure Triangulation_data_structure;
|
||||
const Triangulation_data_structure &triangulation_data_structure() const
|
||||
{
|
||||
return del_.tds();
|
||||
}
|
||||
|
||||
bool is_batch_editing() const {
|
||||
return batching_;
|
||||
}
|
||||
|
||||
void set_is_batch_editing(bool tf) {
|
||||
if (tf) {
|
||||
batching_=true;
|
||||
} else if (batching_) {
|
||||
|
||||
//unsigned int num_certs= num_certificates_;
|
||||
// this is important that it be before update
|
||||
batching_=false;
|
||||
|
||||
//std::sort(batched_certs_.begin(), batched_certs_.end(), Compare_edges());
|
||||
|
||||
/*batched_certs_.erase(std::unique(batched_certs_.begin(),
|
||||
batched_certs_.end()),
|
||||
batched_certs_.end());*/
|
||||
|
||||
|
||||
for (unsigned int i=0; i< batched_certs_.size(); ++i){
|
||||
//Point_key s=TDS_helper::origin(batched_certs_[i])->point();
|
||||
//Point_key t=TDS_helper::destination(batched_certs_[i])->point();
|
||||
|
||||
//std::cout << std::min(s,t) << "--" << std::max
|
||||
//BOOST_PREVENT_MACRO_SUBSTITUTION(s,t) << std::endl;
|
||||
update_face(batched_certs_[i]);
|
||||
}
|
||||
|
||||
batched_certs_.clear();
|
||||
/*CGAL_LOG(CGAL::Kinetic::Log::SOME,
|
||||
*traits_.simulator_handle() << std::endl;);*/
|
||||
//int dnum= num_certificates_-num_certs;
|
||||
//std::cout << "Edit had " << dnum << " certificate computations" << std::endl;
|
||||
|
||||
//audit();
|
||||
}
|
||||
}
|
||||
|
||||
/*const std::set<Edge>& recent_edges() const {
|
||||
return new_edges_;
|
||||
}*/
|
||||
|
||||
//! Verify that the current state of the
|
||||
void audit()const;
|
||||
|
||||
void audit_event(Event_key k, Face_handle e) const {
|
||||
if (e->event() !=k) {
|
||||
std::cerr << "AUDIT FAILURE orphan event " << k << std::endl;
|
||||
}
|
||||
CGAL_assertion(e->event() ==k);
|
||||
}
|
||||
|
||||
void set_has_certificates(bool tf, bool no_failures=false) {
|
||||
if (tf == has_certificates_){
|
||||
|
||||
} else {
|
||||
if (tf==true && del_.dimension()==2) {
|
||||
CGAL_LOG(CGAL::Kinetic::Log::SOME, "DELAUNAY2: Creating certificates."<< std::endl);
|
||||
if (no_failures) {
|
||||
for (Face_iterator f = del_.all_faces_begin(); f != del_.all_faces_end(); ++f) {
|
||||
f->set_event(traits_.simulator_handle()->null_event());
|
||||
}
|
||||
}
|
||||
/*for (typename Triangulation::All_vertices_iterator vit = del_.all_vertices_begin();
|
||||
vit != del_.all_vertices_end(); ++vit) {
|
||||
int deg=TDS_helper::low_degree(vit, del_.tds());
|
||||
CGAL_assertion(deg >=3);
|
||||
Vertex_handle vh= vit;
|
||||
vh->set_neighbors(deg);
|
||||
CGAL_TRIANGULATION_2_DEBUG(std::cout << "Set degree of " << vit->point() << " to " << deg << std::endl);
|
||||
//vit->set_neighbors_is_changed(false);
|
||||
}*/
|
||||
if (!no_failures) {
|
||||
for (Face_iterator eit = del_.all_faces_begin(); eit != del_.all_faces_end(); ++eit) {
|
||||
eit->set_event(Event_key());
|
||||
update_face(eit);
|
||||
}
|
||||
}
|
||||
|
||||
watcher_.create_faces(del_.all_faces_begin(), del_.all_faces_end());
|
||||
} else if (tf==false) {
|
||||
for (Face_iterator f = del_.all_faces_begin(); f != del_.all_faces_end(); ++f) {
|
||||
delete_certificate(f);
|
||||
}
|
||||
}
|
||||
CGAL_LOG(CGAL::Kinetic::Log::SOME,
|
||||
*traits_.simulator_handle() << std::endl;);
|
||||
has_certificates_=tf;
|
||||
}
|
||||
}
|
||||
bool has_certificates() {
|
||||
return has_certificates_;
|
||||
}
|
||||
|
||||
void erase(Point_key k) {
|
||||
CGAL_error();
|
||||
#if 0
|
||||
// erase all incident certificates
|
||||
Vertex_handle vh= vertex_handle(k);
|
||||
if (vh == Vertex_handle()) {
|
||||
CGAL_LOG(CGAL::Kinetic::Log::SOME, "Point " << k << " is not in triangulation on removal."<< std::endl);
|
||||
return;
|
||||
}
|
||||
watcher_.remove_vertex(vh);
|
||||
Face_handle hull_cert;
|
||||
if (has_certificates_) {
|
||||
// have to clean up hull events which are not adjacent
|
||||
Face_circulator fc= vh->incident_faces(), fe=fc;
|
||||
if (fc != NULL) {
|
||||
do {
|
||||
delete_certificate(fc);
|
||||
++fc;
|
||||
} while (fc != fe);
|
||||
}
|
||||
hull_cert= hull_face(k);
|
||||
if (hull_cert != Face_handle()) {
|
||||
delete_certificate(hull_cert);
|
||||
}
|
||||
}
|
||||
// remove from triangulation
|
||||
del_.geom_traits().set_time(traits_.rational_current_time());
|
||||
del_.remove(vh);
|
||||
//new_edges_.clear();
|
||||
if (del_.dimension()==2 && has_certificates_) {
|
||||
std::vector<Face_handle> faces;
|
||||
|
||||
del_.get_conflicts(k,std::back_inserter(faces));
|
||||
|
||||
if (hull_cert != Face_handle()) {
|
||||
faces.push_back(hull_cert);
|
||||
}
|
||||
// update non-adjacent hull certificates
|
||||
for (unsigned int i=0; i< faces.size(); ++i) {
|
||||
update_face(faces[i]);
|
||||
}
|
||||
|
||||
watcher_.create_faces(faces.begin(), faces.end());
|
||||
}
|
||||
#endif
|
||||
}
|
||||
|
||||
//! The assertion will catch that the object is in the same sorted order
|
||||
void set(Point_key k) {
|
||||
std::cout << "Object changed " << k << std::endl;
|
||||
|
||||
//new_edges_.clear();
|
||||
traits_.point_changed(k);
|
||||
if (del_.dimension() != 2) {
|
||||
CGAL_LOG(CGAL::Kinetic::Log::SOME,"Triangulation is still 1D.\n");
|
||||
return;
|
||||
}
|
||||
|
||||
Vertex_handle vh=vertex_handle(k);
|
||||
if (vh == Vertex_handle()) {
|
||||
CGAL_LOG(CGAL::Kinetic::Log::SOME, "Point " << k << " is not in triangulation on set."<< std::endl);
|
||||
return;
|
||||
}
|
||||
|
||||
if (has_certificates_) {
|
||||
Face_circulator fc= vh->incident_faces(), fe=fc;
|
||||
if (fc != NULL) {
|
||||
do {
|
||||
delete_certificate(fc);
|
||||
update_face(fc);
|
||||
++fc;
|
||||
} while (fc != fe);
|
||||
}
|
||||
Face_handle hull_cert= hull_face(vh);
|
||||
if (hull_cert != Face_handle()) {
|
||||
std::cout << "Hull face is " << hull_cert->vertex(0)->point()
|
||||
<< ", " << hull_cert->vertex(1)->point() << ", "
|
||||
<< hull_cert->vertex(2)->point() << std::endl;
|
||||
delete_certificate(hull_cert);
|
||||
update_face(hull_cert);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
watcher_.modify_vertex(vh);
|
||||
|
||||
/*if (has_certificates_) {
|
||||
Face_handle f= vh->face(), fe= vh->face();
|
||||
int i= f->index(vh);
|
||||
do {
|
||||
//int i= fc->index(vh);
|
||||
Edge e0(f, i);
|
||||
update_edge(e0);
|
||||
Edge e1=Edge(f, (i+1)%3);
|
||||
update_edge(e1);
|
||||
f= f->neighbor((i+1)%3);
|
||||
i= f->index(vh);
|
||||
} while (f != fe);
|
||||
}*/
|
||||
//write(std::cout);
|
||||
}
|
||||
|
||||
|
||||
void insert(Point_key k) {
|
||||
// evil hack
|
||||
CGAL_precondition(k.index() >= vhs_.size() || vertex_handle(k) == Vertex_handle());
|
||||
CGAL_TRIANGULATION_2_DEBUG(std::cout << "Inserting " << k << std::endl);
|
||||
bool was_2d= (del_.dimension()==2);
|
||||
|
||||
del_.geom_traits().set_time(traits_.rational_current_time());
|
||||
|
||||
Face_handle lf= del_.locate(k);
|
||||
|
||||
if (was_2d && has_certificates_) {
|
||||
watcher_.remove_faces(&lf, &lf+1);
|
||||
delete_certificate(lf);
|
||||
}
|
||||
Vertex_handle vh= del_.insert(k, lf);
|
||||
set_vertex_handle(k, vh);
|
||||
|
||||
CGAL_assertion(vertex_handle(k) != Vertex_handle());
|
||||
|
||||
//CGAL_TRIANGULATION_2_DEBUG(std::cout << "Vertex " << vertex_handle(k)->point() << std::endl);
|
||||
watcher_.create_vertex(vertex_handle(k));
|
||||
|
||||
// now have to update
|
||||
if (has_certificates_) {
|
||||
if (!was_2d && del_.dimension()==2) {
|
||||
has_certificates_=false;
|
||||
set_has_certificates(true);
|
||||
} else if (del_.dimension() == 2) {
|
||||
set(k);
|
||||
}
|
||||
}
|
||||
//write(std::cout);
|
||||
//if (del_.dimension()==2) audit();
|
||||
}
|
||||
|
||||
|
||||
|
||||
Comparison_result compare_concurrent(Event_key a, Event_key b) const {
|
||||
//Edge ea= traits_.simulator_handle()->template event<Event>(a).edge();
|
||||
//Edge eb= traits_.simulator_handle()->template event<Event>(b).edge();
|
||||
return traits_.compare_concurrent(a, b);
|
||||
}
|
||||
|
||||
|
||||
|
||||
void handle_failure(Face_handle f) {
|
||||
int infi=-1;
|
||||
for (unsigned int i=0; i< 3; ++i) {
|
||||
if (f->vertex(i)->point() == Point_key()) {
|
||||
infi=i;
|
||||
break;
|
||||
}
|
||||
}
|
||||
if (infi != -1) {
|
||||
flip(Edge(f, (infi+2)%3));
|
||||
} else {
|
||||
// determine which edge to flip
|
||||
CGAL::Comparison_result cx01= traits_.compare(f->vertex(0)->point(), f->vertex(1)->point(), 0);
|
||||
CGAL::Comparison_result cx12= traits_.compare(f->vertex(1)->point(), f->vertex(2)->point(), 0);
|
||||
if (cx01== cx12) {
|
||||
CGAL_precondition(cx01 != CGAL::EQUAL);
|
||||
flip(Edge(f, 1));
|
||||
} else {
|
||||
CGAL::Comparison_result cx02= traits_.compare(f->vertex(0)->point(), f->vertex(2)->point(), 0);
|
||||
if (cx02 == -cx12) {
|
||||
flip(Edge(f,2));
|
||||
} else {
|
||||
flip(Edge(f,0));
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
void flip(const Edge &e) {
|
||||
++num_events_;
|
||||
CGAL_precondition(!batching_);
|
||||
CGAL_LOG(CGAL::Kinetic::Log::SOME, "\n\n\n\n\n\nFlipping edge "
|
||||
<< TDS_helper::origin(e)->point()
|
||||
<< TDS_helper::destination(e)->point()
|
||||
<< " to get " << TDS_helper::third_vertex(e)->point()
|
||||
<< ", " << TDS_helper::mirror_vertex(e)->point()<< std::endl);
|
||||
//CGAL_LOG(CGAL::Kinetic::Log::NONE, TDS_helper::destination(e)->point() << std::endl);
|
||||
//CGAL_LOG(CGAL::Kinetic::Log::SOME, " at " << traits_.simulator()->current_time() << std::endl);
|
||||
|
||||
Face_handle face= e.first;
|
||||
int index= e.second;
|
||||
Face_handle mirror_face = face->neighbor(index);
|
||||
int mirror_index =face->mirror_index(index);
|
||||
Edge em(mirror_face,mirror_index);
|
||||
CGAL_precondition(mirror_face->neighbor(mirror_index) == face);
|
||||
|
||||
Face_handle bef;
|
||||
int bei;
|
||||
|
||||
CGAL_assertion (!del_.is_edge(TDS_helper::third_vertex(e), TDS_helper::mirror_vertex(e),
|
||||
bef, bei));/* {
|
||||
std::cout << "Flipping edge out of the way" << std::endl;
|
||||
flip(Edge(bef, bei));
|
||||
}*/
|
||||
|
||||
//delete_certificate(face);
|
||||
delete_certificate(mirror_face);
|
||||
face->set_event(Event_key());
|
||||
|
||||
|
||||
watcher_.before_flip(e);
|
||||
del_.tds().flip(face,index);
|
||||
|
||||
// we also know that CGAL preserves the edge index of the flipped edge
|
||||
//mirror_index = mirror_face->index(face);
|
||||
//index= face->index(mirror_face);
|
||||
|
||||
watcher_.after_flip(Edge(face, index));
|
||||
|
||||
update_face(face);
|
||||
update_face(mirror_face);
|
||||
for (unsigned int i=0; i< 3; ++i) {
|
||||
if (face->vertex(i)->point() == Point_key()) {
|
||||
if (face->neighbor((i+1)%3) != mirror_face) {
|
||||
delete_certificate(face->neighbor((i+1)%3));
|
||||
update_face(face->neighbor((i+1)%3));
|
||||
}
|
||||
}
|
||||
if (mirror_face->vertex(i)->point() == Point_key()) {
|
||||
if (mirror_face->neighbor((i+1)%3) != face) {
|
||||
delete_certificate(mirror_face->neighbor((i+1)%3));
|
||||
update_face(mirror_face->neighbor((i+1)%3));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
//return flipped_edge;
|
||||
}
|
||||
|
||||
Visitor &visitor() {
|
||||
return watcher_;
|
||||
}
|
||||
|
||||
const Visitor &visitor() const
|
||||
{
|
||||
return watcher_;
|
||||
}
|
||||
|
||||
bool has_event(const Edge &e) const {
|
||||
return e.first->event() != Event_key() || e.first->neighbor(e.second)->event() != Event_key();
|
||||
}
|
||||
|
||||
bool has_finite_event(const Edge &e) const {
|
||||
return e.first->event() != traits_.simulator_handle()->null_event()
|
||||
|| e.first->neighbor(e.second)->event() != traits_.simulator_handle()->null_event() ;
|
||||
}
|
||||
|
||||
protected:
|
||||
Traits traits_;
|
||||
Visitor watcher_;
|
||||
Triangulation del_;
|
||||
|
||||
|
||||
Simulator_listener siml_;
|
||||
Moving_point_table_listener motl_;
|
||||
std::vector<Vertex_handle> vhs_;
|
||||
|
||||
bool has_certificates_;
|
||||
bool batching_;
|
||||
std::vector<Face_handle> batched_certs_;
|
||||
|
||||
|
||||
Face_handle hull_face(Vertex_handle v) const {
|
||||
Face_circulator fc= v->incident_faces(), fe=fc;
|
||||
if (fc != NULL) {
|
||||
do {
|
||||
int i= fc->index(v);
|
||||
if (fc->vertex((i+2)%3)->point() == Point_key()) {
|
||||
return fc->neighbor(i);
|
||||
}
|
||||
++fc;
|
||||
} while (fc != fe);
|
||||
}
|
||||
return Face_handle();
|
||||
}
|
||||
|
||||
mutable unsigned int num_events_;
|
||||
//mutable unsigned int num_single_certificates_;
|
||||
|
||||
const typename Traits::Point_2& point(Point_key k) const
|
||||
{
|
||||
return traits_.point(k);
|
||||
}
|
||||
|
||||
|
||||
Vertex_handle vertex_handle(Point_key k) const {
|
||||
//if (k.index() >= vhs_.size()) return Vertex_handle();
|
||||
CGAL_precondition(k.index() < vhs_.size());
|
||||
return vhs_[k.index()];
|
||||
}
|
||||
|
||||
|
||||
void set_vertex_handle(Point_key k, Vertex_handle vh) {
|
||||
vhs_.resize(std::max BOOST_PREVENT_MACRO_SUBSTITUTION(k.index()+1, vhs_.size()));
|
||||
vhs_[k.index()]=vh;
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
void update_face_no_batch(const Face_handle e) {
|
||||
CGAL_TRIANGULATION_2_DEBUG(std::cout << "Updating face "
|
||||
<< e->vertex(0)->point() << ", " << e->vertex(1)->point()
|
||||
<< ", " << e->vertex(2)->point() << std::endl);
|
||||
|
||||
if (e->event() != Event_key()) {
|
||||
CGAL_TRIANGULATION_2_DEBUG(std::cout << "Already has event " << std::endl);
|
||||
// can't do this since I create all edges around vertex of degree 4 at once
|
||||
// CGAL_error();
|
||||
} else {
|
||||
//CGAL_TRIANGULATION_2_DEBUG(std::cout << "New certificate" << std::endl);
|
||||
new_certificate(e);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
void update_face(const Face_handle e) {
|
||||
if (batching_) {
|
||||
//delete_certificate(e);
|
||||
batched_certs_.push_back(e);
|
||||
} else if (e->event() == Event_key()) {
|
||||
update_face_no_batch(e);
|
||||
}
|
||||
}
|
||||
|
||||
// return true if hull
|
||||
Vertex_handle points(const Face_handle e, Point_key ks[3]) const {
|
||||
ks[0]= e->vertex(0)->point();
|
||||
ks[1]= e->vertex(1)->point();
|
||||
ks[2]= e->vertex(2)->point();
|
||||
|
||||
|
||||
Vertex_handle cv;
|
||||
for (unsigned int i=0; i<3; ++i) {
|
||||
if (ks[i]== Point_key()) {
|
||||
cv=e->vertex((i+1)%3);
|
||||
ks[i]= TDS_helper::mirror_vertex(Edge(e, (i+2)%3))->point();
|
||||
}
|
||||
}
|
||||
|
||||
if (cv != Vertex_handle()) {
|
||||
std::swap(ks[0], ks[1]);
|
||||
}
|
||||
return cv;
|
||||
}
|
||||
|
||||
void new_certificate(Face_handle e) {
|
||||
CGAL_precondition(e->event() == Event_key());
|
||||
|
||||
Time t;
|
||||
Point_key ks[3];
|
||||
Vertex_handle cv= points(e,ks);
|
||||
if (cv != Vertex_handle()) {
|
||||
std::cout << "Center is " << cv->point() << std::endl;
|
||||
if (cv->degree() ==3) {
|
||||
std::cout << "Skipping set " << ks[0] << ", " << ks[1] << ", " << ks[2] << std::endl;
|
||||
e->set_event(traits_.simulator_handle()->null_event());
|
||||
return;
|
||||
}
|
||||
}
|
||||
if (traits_.certificate_failure_time(e, ks, t)) {
|
||||
Event_key k= traits_.simulator_handle()->new_event(t, Event(e, this));
|
||||
e->set_event(k);
|
||||
} else {
|
||||
e->set_event(traits_.simulator_handle()->null_event());
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
void delete_certificate(Face_handle e) {
|
||||
//CGAL_TRIANGULATION_2_DEBUG(std::cout << "Cleaning edge " << TDS_helper::origin(e)->point() << " " << TDS_helper::destination(e)->point() << std::endl);
|
||||
Event_key k= e->event();
|
||||
if (k != Event_key()) {
|
||||
traits_.simulator_handle()->delete_event(k);
|
||||
e->set_event(Event_key());
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
template <class Sim, class Del, class W, class T>
|
||||
std::ostream &operator<<(std::ostream &out, const Triangulation_2<Sim, Del, W, T> &kd)
|
||||
{
|
||||
kd.write(out);
|
||||
return out;
|
||||
}
|
||||
|
||||
template <class Sim, class Del, class W, class T>
|
||||
void Triangulation_2<Sim, Del, W, T>::audit() const {
|
||||
del_.geom_traits().set_time(traits_.rational_current_time());
|
||||
typename Simulation_traits::Instantaneous_kernel::Orientation_2 o2=
|
||||
del_.geom_traits().orientation_2_object();
|
||||
for (typename Triangulation::All_faces_iterator f = del_.all_faces_begin();
|
||||
f != del_.all_faces_end(); ++f) {
|
||||
Point_key ks[3];
|
||||
points(f,ks);
|
||||
CGAL_assertion(o2(ks[0],ks[1],ks[2])== CGAL::POSITIVE);
|
||||
}
|
||||
}
|
||||
|
||||
} } //namespace CGAL::Kinetic
|
||||
#endif
|
||||
|
|
@ -26,7 +26,6 @@
|
|||
#include <CGAL/Kinetic/internal/Triangulation_helper_3.h>
|
||||
#include <CGAL/Kinetic/internal/triangulation_helpers_3.h>
|
||||
#include <CGAL/Kinetic/Event_base.h>
|
||||
//#include <CGAL/Kinetic/internal/Delaunay_cache_3.h>
|
||||
|
||||
// STL
|
||||
#include <map>
|
||||
|
|
|
|||
|
|
@ -255,5 +255,5 @@ protected:
|
|||
|
||||
} } } //namespace CGAL::Kinetic::internal
|
||||
|
||||
//#include <CGAL/Kinetic_internals/kernel_undefs.h>
|
||||
|
||||
#endif
|
||||
|
|
|
|||
|
|
@ -22,7 +22,7 @@
|
|||
#define CGAL_KINETIC_CARTESIAN_WEIGHTED_MOVING_LIFTED_3_H_
|
||||
#include <CGAL/Kinetic/basic.h>
|
||||
#include <iostream>
|
||||
#include <CGAL/Kinetic/Kernel/Cartesian_moving_point_3.h>
|
||||
#include <CGAL/Kinetic/internal/Kernel/Cartesian_moving_point_3.h>
|
||||
|
||||
namespace CGAL { namespace Kinetic { namespace internal {;
|
||||
|
||||
|
|
|
|||
|
|
@ -23,7 +23,6 @@
|
|||
#include <CGAL/Kinetic/basic.h>
|
||||
#include <CGAL/determinant.h>
|
||||
|
||||
//#include <CGAL/Kinetic/kernel/Cartesian_moving_sphere_3.h>
|
||||
|
||||
namespace CGAL { namespace Kinetic { namespace internal {
|
||||
|
||||
|
|
|
|||
|
|
@ -203,9 +203,6 @@ struct Bezier_tag {};
|
|||
} } //namespace CGAL::POLYNOMIAL
|
||||
*/
|
||||
|
||||
#ifdef CGAL_POLYNOMIAL_NO_LIMITS
|
||||
#include <CGAL/Polynomial/internal/limits.h>
|
||||
#else
|
||||
#include <limits>
|
||||
#endif
|
||||
#endif
|
||||
|
||||
#endif // CGAL_POLYNOMIAL_BASIC_H
|
||||
|
|
|
|||
|
|
@ -22,13 +22,13 @@
|
|||
#define CGAL_POLYNOMIAL_FILTERED_POLYNOMIAL_KERNEL_H
|
||||
|
||||
#include <CGAL/Polynomial/basic.h>
|
||||
#include <CGAL/Polynomial/Filtered_rational/Filtered_rational_traits.h>
|
||||
#include <CGAL/Polynomial/Filtered_kernel/Filtered_sign_at.h>
|
||||
#include <CGAL/Polynomial/Filtered_kernel/Filtered_root_multiplicity.h>
|
||||
#include <CGAL/Polynomial/Kernel/Root_container.h>
|
||||
#include <CGAL/Polynomial/Kernel/Is_even_multiplicity.h>
|
||||
#include <CGAL/Polynomial/Kernel/Is_rational.h>
|
||||
#include <CGAL/Polynomial/Kernel/To_rational.h>
|
||||
#include <CGAL/Polynomial/internal/Filtered_rational/Filtered_rational_traits.h>
|
||||
#include <CGAL/Polynomial/internal/Filtered_kernel/Filtered_sign_at.h>
|
||||
#include <CGAL/Polynomial/internal/Filtered_kernel/Filtered_root_multiplicity.h>
|
||||
#include <CGAL/Polynomial/internal/Kernel/Root_container.h>
|
||||
#include <CGAL/Polynomial/internal/Kernel/Is_even_multiplicity.h>
|
||||
#include <CGAL/Polynomial/internal/Kernel/Is_rational.h>
|
||||
#include <CGAL/Polynomial/internal/Kernel/To_rational.h>
|
||||
|
||||
namespace CGAL { namespace POLYNOMIAL {
|
||||
|
||||
|
|
|
|||
|
|
@ -21,7 +21,7 @@
|
|||
#ifndef CGAL_POLYNOMIAL_FILTERED_DESCARTES_HAS_ROOT_H
|
||||
#define CGAL_POLYNOMIAL_FILTERED_DESCARTES_HAS_ROOT_H
|
||||
#include <CGAL/Polynomial/basic.h>
|
||||
#include <CGAL/Polynomial/Filtered_kernel/Filtered_Descartes_root_counter.h>
|
||||
#include <CGAL/Polynomial/internal/Filtered_kernel/Filtered_Descartes_root_counter.h>
|
||||
|
||||
namespace CGAL { namespace POLYNOMIAL { namespace internal {;
|
||||
|
||||
|
|
|
|||
|
|
@ -23,8 +23,8 @@
|
|||
|
||||
#include <CGAL/Polynomial/basic.h>
|
||||
|
||||
#include <CGAL/Polynomial/Tools/Alternation_counter.h>
|
||||
#include <CGAL/Polynomial/Tools/interval_arithmetic.h>
|
||||
#include <CGAL/Polynomial/internal/Alternation_counter.h>
|
||||
#include <CGAL/Polynomial/internal/interval_arithmetic.h>
|
||||
|
||||
namespace CGAL { namespace POLYNOMIAL { namespace internal {;
|
||||
|
||||
|
|
|
|||
|
|
@ -1,226 +0,0 @@
|
|||
// Copyright (c) 2005 Stanford University (USA).
|
||||
// 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; either version 3 of the License,
|
||||
// or (at your option) any later version.
|
||||
//
|
||||
// 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) : Daniel Russel <drussel@alumni.princeton.edu>
|
||||
|
||||
#ifndef CGAL_POLYNOMIAL_FILTERED_POLYNOMIAL_RATIONAL_KERNEL_H
|
||||
#define CGAL_POLYNOMIAL_FILTERED_POLYNOMIAL_RATIONAL_KERNEL_H
|
||||
|
||||
#include <CGAL/Polynomial/basic.h>
|
||||
#include <CGAL/Polynomial/Tools/interval_arithmetic.h>
|
||||
|
||||
#include <CGAL/Polynomial/Tools/Filtered_function.h>
|
||||
#include <CGAL/Polynomial/internal/Virtual_function_explicit.h>
|
||||
#include <CGAL/Polynomial/internal/Virtual_function_constant.h>
|
||||
#include <CGAL/Polynomial/internal/Virtual_function_generator.h>
|
||||
|
||||
#include <CGAL/Polynomial/Filtered_kernel/Filtered_sign_at.h>
|
||||
#include <CGAL/Polynomial/Filtered_kernel/Filtered_are_negations.h>
|
||||
#include <CGAL/Polynomial/Filtered_kernel/Filtered_Descartes_has_root.h>
|
||||
#include <CGAL/Polynomial/Filtered_kernel/Filtered_root_bound_evaluator.h>
|
||||
#include <CGAL/Polynomial/Filtered_kernel/Filtered_sign_at.h>
|
||||
#include <CGAL/Polynomial/Filtered_kernel/Filtered_root_multiplicity.h>
|
||||
|
||||
// not yet ported
|
||||
#include <CGAL/Polynomial/Kernel/Bezier_root_counter.h>
|
||||
#include <CGAL/Polynomial/Kernel/Sturm_root_counter.h>
|
||||
#include <CGAL/Polynomial/Kernel/Compare_isolated_roots_in_interval.h>
|
||||
|
||||
namespace CGAL { namespace POLYNOMIAL { namespace internal {
|
||||
|
||||
template <class SFK_t, class IFK_t, class EFK_t, class IFC_t, class EFC_t, class EIFC_t>
|
||||
class Filtered_polynomial_rational_kernel
|
||||
{
|
||||
typedef Filtered_polynomial_rational_kernel<SFK_t, IFK_t, EFK_t,
|
||||
IFC_t, EFC_t, EIFC_t> This;
|
||||
public:
|
||||
|
||||
Filtered_polynomial_rational_kernel(){}
|
||||
|
||||
typedef typename SFK_t::Function::NT NT;
|
||||
typedef Filtered_function<typename SFK_t::Function,
|
||||
typename IFK_t::Function,
|
||||
typename EFK_t::Function,
|
||||
IFC_t, EFC_t, EIFC_t> Function;
|
||||
|
||||
typedef typename SFK_t::Function Explicit_function;
|
||||
|
||||
typedef SFK_t Explicit_kernel;
|
||||
typedef IFK_t Interval_kernel;
|
||||
typedef EFK_t Exact_kernel;
|
||||
|
||||
const Explicit_kernel &explicit_kernel_object() const { return sk_;}
|
||||
const Interval_kernel &interval_kernel_object() const {return ik_;}
|
||||
const Exact_kernel &exact_kernel_object() const {return ek_;}
|
||||
|
||||
typedef EFC_t Exact_function_converter;
|
||||
typedef IFC_t Interval_function_converter;
|
||||
typedef EIFC_t Exact_interval_function_converter;
|
||||
|
||||
const Exact_function_converter &exact_function_converter_object() const
|
||||
{
|
||||
return efc_;
|
||||
}
|
||||
|
||||
const Interval_function_converter &interval_function_converter_object() const
|
||||
{
|
||||
return ifc_;
|
||||
}
|
||||
|
||||
const Exact_interval_function_converter &exact_interval_function_converter_object() const
|
||||
{
|
||||
return eifc_;
|
||||
}
|
||||
|
||||
typedef internal::Filtered_sign_at<This> Sign_at;
|
||||
Sign_at sign_at_object(const Function &p) const
|
||||
{
|
||||
return Sign_at(p, *this);
|
||||
}
|
||||
|
||||
typedef internal::Filtered_Descartes_root_counter<This> Descartes_root_counter;
|
||||
Descartes_root_counter Descartes_root_counter_object(const Function &p) const
|
||||
{
|
||||
return Descartes_root_counter(p, *this);
|
||||
}
|
||||
|
||||
typedef internal::Filtered_are_negations<This> Are_negations;
|
||||
Are_negations are_negations_object() const
|
||||
{
|
||||
return Are_negations(*this);
|
||||
}
|
||||
|
||||
typedef internal::Filtered_Descartes_has_root<This> Descartes_has_root;
|
||||
Descartes_has_root Descartes_has_root_object(const Function &p) const
|
||||
{
|
||||
return Descartes_has_root(p, *this);
|
||||
}
|
||||
|
||||
typedef internal::Sturm_root_counter<Exact_kernel> Sturm_root_counter;
|
||||
Sturm_root_counter Sturm_root_counter_object(const Function &p) const
|
||||
{
|
||||
return Sturm_root_counter(p.exact_function());
|
||||
}
|
||||
|
||||
typedef internal::Bezier_root_counter<Exact_kernel> Bezier_root_counter;
|
||||
Bezier_root_counter Bezier_root_counter_object(const Function &p) const
|
||||
{
|
||||
return Bezier_root_counter(p.exact_function());
|
||||
}
|
||||
|
||||
typedef internal::Compare_isolated_roots_in_interval<Exact_kernel>
|
||||
Compare_isolated_roots_in_interval;
|
||||
Compare_isolated_roots_in_interval compare_isolated_roots_in_interval_object(const Function &p0,
|
||||
const Function &p1)const
|
||||
{
|
||||
return Compare_isolated_roots_in_interval(p0.exact_function(), p1.exact_function(),
|
||||
exact_kernel_object());
|
||||
}
|
||||
|
||||
typedef internal::Filtered_root_bound_evaluator<This> Root_bound;
|
||||
Root_bound root_bound_object(bool power_of_two=true)const
|
||||
{
|
||||
return Root_bound(power_of_two, *this);
|
||||
}
|
||||
|
||||
typedef internal::Filtered_root_multiplicity<This> Zero_multiplicity;
|
||||
Zero_multiplicity zero_multiplicity_object(const Function &p0) const
|
||||
{
|
||||
return Zero_multiplicity(p0, *this);
|
||||
}
|
||||
|
||||
protected:
|
||||
typedef internal::Virtual_function_explicit<
|
||||
typename Explicit_kernel::Function,
|
||||
typename Interval_kernel::Function,
|
||||
typename Exact_kernel::Function,
|
||||
Interval_function_converter,
|
||||
Exact_function_converter,
|
||||
Exact_interval_function_converter> EVF;
|
||||
public:
|
||||
|
||||
template <class UF>
|
||||
Function function_from_generator(const UF &fc) const
|
||||
{
|
||||
typename Function::VFP vfp= new internal::Virtual_function_generator<UF, This,
|
||||
typename Explicit_kernel::Function,
|
||||
typename Interval_kernel::Function,
|
||||
typename Exact_kernel::Function,
|
||||
Interval_function_converter,
|
||||
Exact_function_converter,
|
||||
Exact_interval_function_converter>(fc, *this);
|
||||
return Function(vfp);
|
||||
}
|
||||
|
||||
//! construct high degree polynomials
|
||||
Function function_object(const NT& a0, const NT& a1=0) const
|
||||
{
|
||||
typename Explicit_kernel::Function f= sk_.function_object(a0, a1);
|
||||
typename Function::VFP vfp= new EVF(f, ifc_, efc_,eifc_);
|
||||
return Function(vfp);
|
||||
}
|
||||
|
||||
//! construct high degree polynomials
|
||||
Function function_object(const NT& a0, const NT& a1,
|
||||
const NT& a2, const NT& a3=0) const
|
||||
{
|
||||
typename Explicit_kernel::Function f= sk_.function_object(a0, a1,a2,a3);
|
||||
typename Function::VFP vfp= new EVF(f, ifc_, efc_, eifc_);
|
||||
return Function(vfp);
|
||||
}
|
||||
|
||||
//! construct high degree polynomials
|
||||
Function function_object(const NT& a0, const NT& a1,
|
||||
const NT& a2, const NT& a3,
|
||||
const NT& a4, const NT& a5=0,
|
||||
const NT& a6=0, const NT& a7=0) const
|
||||
{
|
||||
typename Explicit_kernel::Function f= sk_.function_object(a0, a1,a2,a3,a4,a5,a6,a7);
|
||||
typename Function::VFP vfp= new EVF(f, ifc_, efc_, eifc_);
|
||||
return Function(vfp);
|
||||
}
|
||||
|
||||
//! construct high degree polynomials
|
||||
Function function_object(const NT& a0, const NT& a1,
|
||||
const NT& a2, const NT& a3,
|
||||
const NT& a4, const NT& a5,
|
||||
const NT& a6, const NT& a7,
|
||||
const NT& a8, const NT& a9=0,
|
||||
const NT& a10=0, const NT& a11=0,
|
||||
const NT& a12=0, const NT& a13=0,
|
||||
const NT& a14=0, const NT& a15=0,
|
||||
const NT& a16=0, const NT& a17=0,
|
||||
const NT& a18=0, const NT& a19=0) const
|
||||
{
|
||||
typename Explicit_kernel::Function f= sk_.function_object(a0, a1,a2,a3,a4,a5,a6,a7,a8,a9,a10,
|
||||
a11,a12,a13,a14,a15,a16,a17,a18,a19);
|
||||
typename Function::VFP vfp= new EVF(f, ifc_, efc_, eifc_);
|
||||
return Function(vfp);
|
||||
}
|
||||
|
||||
protected:
|
||||
Explicit_kernel sk_;
|
||||
Interval_kernel ik_;
|
||||
Exact_kernel ek_;
|
||||
Interval_function_converter ifc_;
|
||||
Exact_function_converter efc_;
|
||||
Exact_interval_function_converter eifc_;
|
||||
};
|
||||
|
||||
} } } //namespace CGAL::POLYNOMIAL::internal
|
||||
#endif
|
||||
|
|
@ -21,7 +21,7 @@
|
|||
#ifndef CGAL_POLYNOMIAL_FILTERED_DESCARTES_HAS_ROOT_H
|
||||
#define CGAL_POLYNOMIAL_FILTERED_DESCARTES_HAS_ROOT_H
|
||||
#include <CGAL/Polynomial/basic.h>
|
||||
#include <CGAL/Polynomial/Filtered_rational/Filtered_Descartes_root_counter.h>
|
||||
#include <CGAL/Polynomial/internal/Filtered_rational/Filtered_Descartes_root_counter.h>
|
||||
|
||||
namespace CGAL { namespace POLYNOMIAL { namespace internal {;
|
||||
|
||||
|
|
|
|||
|
|
@ -22,7 +22,7 @@
|
|||
#define CGAL_FILTERED_STANDARD_SEQUENCE_H
|
||||
|
||||
#include <CGAL/Polynomial/basic.h>
|
||||
#include <CGAL/Polynomial/Filtered_rational/Filtered_Sturm_sequence.h>
|
||||
#include <CGAL/Polynomial/internal/Filtered_rational/Filtered_Sturm_sequence.h>
|
||||
|
||||
namespace CGAL { namespace POLYNOMIAL { namespace internal {
|
||||
|
||||
|
|
|
|||
|
|
@ -22,7 +22,6 @@
|
|||
#define CGAL_POLYNOMIAL_INTERNAL_AFTER_AT_ROOT_H
|
||||
|
||||
#include <CGAL/Polynomial/basic.h>
|
||||
//#include <CGAL/Polynomial/internal/Explicit_root.h>
|
||||
#include <CGAL/Polynomial/internal/Rational/Evaluate_polynomial.h>
|
||||
#include <CGAL/Polynomial/internal/Rational/Sign_above_rational.h>
|
||||
|
||||
|
|
|
|||
|
|
@ -22,7 +22,7 @@
|
|||
#define CGAL_POLYNOMIAL_DESCARTES_HAS_ROOT_H
|
||||
|
||||
#include <CGAL/Polynomial/basic.h>
|
||||
#include <CGAL/Polynomial/Tools/Alternation_counter.h>
|
||||
#include <CGAL/Polynomial/internal/Alternation_counter.h>
|
||||
|
||||
namespace CGAL { namespace POLYNOMIAL { namespace internal {;
|
||||
|
||||
|
|
|
|||
|
|
@ -21,8 +21,6 @@
|
|||
#ifndef CGAL_STANDARD_SEQUENCE_H
|
||||
#define CGAL_STANDARD_SEQUENCE_H
|
||||
|
||||
//#include <CGAL/Polynomial/utilities.h>
|
||||
//#include <CGAL/Polynomial/Rational/Sturm_sequence.h>
|
||||
|
||||
namespace CGAL { namespace POLYNOMIAL { namespace internal {
|
||||
|
||||
|
|
|
|||
|
|
@ -26,7 +26,6 @@
|
|||
#include <limits>
|
||||
#include <cfloat>
|
||||
|
||||
//#include <CGAL/Polynomial/internal/Bisection.h>
|
||||
|
||||
|
||||
namespace CGAL { namespace POLYNOMIAL { namespace internal {
|
||||
|
|
|
|||
|
|
@ -37,7 +37,6 @@
|
|||
#include <CGAL/Nef_2/PM_decorator.h>
|
||||
#include <CGAL/Nef_2/PM_io_parser.h>
|
||||
#include <CGAL/Nef_2/PM_overlayer.h>
|
||||
//#include <CGAL/Nef_2/PM_transformer.h>
|
||||
#include <CGAL/Nef_2/PM_point_locator.h>
|
||||
#include <CGAL/Nef_2/Bounding_box_2.h>
|
||||
#include <vector>
|
||||
|
|
|
|||
|
|
@ -22,13 +22,6 @@
|
|||
#define CGAL_NEF_POLYNOMIAL_H
|
||||
|
||||
#include <CGAL/Nef_2/Polynomial.h>
|
||||
//#include <CGAL/basic.h>
|
||||
//#include <CGAL/kernel_assertions.h>
|
||||
//#include <CGAL/Handle_for.h>
|
||||
//#include <CGAL/number_type_basic.h>
|
||||
//#include <CGAL/number_utils.h>
|
||||
//#include <CGAL/Number_type_traits.h>
|
||||
//#include <CGAL/IO/io.h>
|
||||
#include <cstddef>
|
||||
#undef CGAL_NEF_DEBUG
|
||||
#define CGAL_NEF_DEBUG 3
|
||||
|
|
|
|||
|
|
@ -23,12 +23,6 @@
|
|||
|
||||
#include <CGAL/basic.h>
|
||||
#include <CGAL/Nef_3/SNC_intersection.h>
|
||||
#ifdef CGAL_NEF3_POINT_LOCATOR_NAIVE
|
||||
#include <CGAL/Nef_3/SNC_ray_shooter.h>
|
||||
#endif
|
||||
#ifdef CGAL_NEF3_LAZY_KDTREE
|
||||
#include <CGAL/Nef_3/Lazy_k3_tree.h>
|
||||
#endif
|
||||
#include <CGAL/Nef_3/SNC_k3_tree_traits.h>
|
||||
#include <CGAL/Nef_3/K3_tree.h>
|
||||
#include <CGAL/Unique_hash_map.h>
|
||||
|
|
@ -169,11 +163,8 @@ class SNC_point_locator_by_spatial_subdivision :
|
|||
|
||||
public:
|
||||
typedef typename CGAL::SNC_k3_tree_traits<SNC_decorator> K3_tree_traits;
|
||||
#ifdef CGAL_NEF3_LAZY_KDTREE
|
||||
typedef typename CGAL::Lazy_k3_tree<K3_tree_traits> K3_tree;
|
||||
#else
|
||||
|
||||
typedef typename CGAL::K3_tree<K3_tree_traits> K3_tree;
|
||||
#endif
|
||||
typedef K3_tree SNC_candidate_provider;
|
||||
|
||||
typedef typename SNC_structure::Object_handle Object_handle;
|
||||
|
|
@ -408,12 +399,10 @@ public:
|
|||
}
|
||||
if(initialized)
|
||||
delete candidate_provider;
|
||||
#ifdef CGAL_NEF3_LAZY_KDTREE
|
||||
candidate_provider = new SNC_candidate_provider(objects,v_end);
|
||||
#else
|
||||
|
||||
Object_list_iterator oli=objects.begin()+v_end;
|
||||
candidate_provider = new SNC_candidate_provider(objects,oli);
|
||||
#endif
|
||||
|
||||
// CGAL_NEF_TRACEN(*candidate_provider);
|
||||
CGAL_NEF_TIMER(ct_t.stop());
|
||||
#endif // CGAL_NEF_LIST_OF_TRIANGLES
|
||||
|
|
|
|||
|
|
@ -48,15 +48,6 @@
|
|||
#include <CGAL/Modifier_base.h>
|
||||
#include <CGAL/Nef_3/Mark_bounded_volumes.h>
|
||||
|
||||
|
||||
#ifdef CGAL_NEF3_CGAL_NEF3_SM_VISUALIZOR
|
||||
#include <CGAL/Nef_3/SNC_SM_visualizor.h>
|
||||
#endif // CGAL_NEF3_SM_VISUALIZOR
|
||||
|
||||
#ifdef CGAL_NEF3_OLD_VISUALIZATION
|
||||
#include <CGAL/Nef_3/Visualizor_OpenGL_3.h>
|
||||
#endif // CGAL_NEF3_OLD_VISUALIZATION
|
||||
|
||||
#include <CGAL/IO/Verbose_ostream.h>
|
||||
#include <CGAL/Nef_3/polyhedron_3_to_nef_3.h>
|
||||
#include <CGAL/Nef_3/shell_to_nef_3.h>
|
||||
|
|
@ -120,10 +111,6 @@ class Nef_polyhedron_3_rep
|
|||
typedef CGAL::SNC_SM_overlayer<I, SM_decorator> SM_overlayer;
|
||||
typedef CGAL::SM_point_locator<SNC_structure> SM_point_locator;
|
||||
|
||||
#ifdef CGAL_NEF3_SM_VISUALIZOR
|
||||
typedef CGAL::SNC_SM_visualizor<SNC_structure> SM_visualizor;
|
||||
#endif // CGAL_NEF3_SM_VISUALIZOR
|
||||
|
||||
private:
|
||||
SNC_structure snc_;
|
||||
SNC_point_locator* pl_;
|
||||
|
|
@ -238,12 +225,6 @@ protected:
|
|||
typedef typename Nef_rep::SM_overlayer SM_overlayer;
|
||||
typedef typename Nef_rep::SM_point_locator SM_point_locator;
|
||||
typedef typename Nef_rep::SNC_simplify SNC_simplify;
|
||||
#ifdef CGAL_NEF3_SM_VISUALIZOR
|
||||
typedef typename Nef_rep::SM_visualizor SM_visualizor;
|
||||
#endif // CGAL_NEF3_SM_VISUALIZOR
|
||||
#ifdef CGAL_NEF3_OLD_VISUALIZATION
|
||||
typedef CGAL::Nef_Visualizor_OpenGL_3<Nef_polyhedron_3> Visualizor;
|
||||
#endif // CGAL_NEF3_OLD_VISUALIZATION
|
||||
|
||||
typedef typename Nef_rep::Sphere_map Sphere_map;
|
||||
public:
|
||||
|
|
@ -1228,15 +1209,7 @@ protected:
|
|||
}
|
||||
|
||||
public:
|
||||
#ifdef CGAL_NEF3_OLD_VISUALIZATION
|
||||
void visualize() {
|
||||
Visualizor sncv(*this);
|
||||
sncv.draw();
|
||||
//OGL::polyhedra_.back().debug();
|
||||
OLDOGL::start_viewer();
|
||||
}
|
||||
#endif // CGAL_NEF3_OLD_VISUALIZATION
|
||||
|
||||
|
||||
void clear(Content space = EMPTY)
|
||||
{ *this = Nef_polyhedron_3(space); }
|
||||
/*{\Mop makes |\Mvar| the empty set if |space == EMPTY| and the
|
||||
|
|
|
|||
|
|
@ -1,61 +0,0 @@
|
|||
// Copyright (c) 1997-2000 Max-Planck-Institute Saarbruecken (Germany).
|
||||
// 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
|
||||
// General Public License as published by the Free Software Foundation,
|
||||
// either version 3 of the License, or (at your option) any later version.
|
||||
//
|
||||
// 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) : Michael Seel <seel@mpi-sb.mpg.de>
|
||||
|
||||
#ifndef CGAL_NEF_POLYHEDRON_S2_OGLUT_STREAM_H
|
||||
#define CGAL_NEF_POLYHEDRON_S2_OGLUT_STREAM_H
|
||||
|
||||
#include <CGAL/Nef_polyhedron_S2.h>
|
||||
#include <CGAL/Nef_S2/SM_visualizor.h>
|
||||
#include <string>
|
||||
|
||||
namespace CGAL {
|
||||
|
||||
|
||||
struct OGLUT_stream { // dummy class
|
||||
OGLUT_stream() {}
|
||||
void display() { CGAL::OGL::start_viewer(); }
|
||||
};
|
||||
|
||||
static OGLUT_stream ogl;
|
||||
|
||||
template <typename K,typename I,typename M>
|
||||
CGAL::OGLUT_stream& operator<<(CGAL::OGLUT_stream& ogls,
|
||||
const Nef_polyhedron_S2<K,I,M>& P)
|
||||
{
|
||||
typedef Nef_polyhedron_S2<K,I,M> Polyhedron;
|
||||
typedef typename Polyhedron::Sphere_map Sphere_map;
|
||||
typedef typename Polyhedron::Sphere_kernel Sphere_kernel;
|
||||
typedef CGAL::SM_visualizor<Polyhedron> Visualizor;
|
||||
CGAL::OGL::add_sphere();
|
||||
Visualizor V(&P,CGAL::OGL::spheres_.back()); V.draw_map();
|
||||
// CGAL::OGL::spheres_.back().print();
|
||||
return ogls;
|
||||
}
|
||||
|
||||
static CGAL::OGLUT_stream& operator<<(CGAL::OGLUT_stream& ogls,
|
||||
const char* s)
|
||||
{
|
||||
CGAL::OGL::titles_.push_back(std::string(s));
|
||||
return ogls;
|
||||
}
|
||||
|
||||
} //namespace CGAL
|
||||
|
||||
#endif // CGAL_NEF_POLYHEDRON_S2_OGLUT_STREAM_H
|
||||
|
|
@ -1,57 +0,0 @@
|
|||
// Copyright (c) 1997-2000 Max-Planck-Institute Saarbruecken (Germany).
|
||||
// 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
|
||||
// General Public License as published by the Free Software Foundation,
|
||||
// either version 3 of the License, or (at your option) any later version.
|
||||
//
|
||||
// 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) : Peter Hachenberger <hachenberger@mpi-sb.mpg.de>
|
||||
|
||||
#ifndef CGAL_NEF_POLYHEDRON_IOSTREAM_3_H
|
||||
#define CGAL_NEF_POLYHEDRON_IOSTREAM_3_H
|
||||
|
||||
#include <CGAL/Nef_polyhedron_S2.h>
|
||||
#include <CGAL/Nef_3/SM_io_parser.h>
|
||||
|
||||
namespace CGAL {
|
||||
|
||||
/*
|
||||
template <typename Kernel, typename Items, typename Mark, typename Map>
|
||||
std::ostream& operator<<
|
||||
(std::ostream& os, Nef_polyhedron_3<Kernel,Items,Mark>& NP)
|
||||
{
|
||||
typedef typename Nef_polyhedron_3<Kernel,Items, Mark>::SNC_structure SNC_structure;
|
||||
#ifdef CGAL_NEF3_SORT_OUTPUT
|
||||
CGAL::SNC_io_parser<SNC_structure> O(os, NP.snc(), true, true);
|
||||
#else
|
||||
CGAL::SNC_io_parser<SNC_structure> O(os, NP.snc(), false, true);
|
||||
#endif
|
||||
O.print();
|
||||
return os;
|
||||
}
|
||||
*/
|
||||
|
||||
template <typename Kernel, typename Items, typename Mark, typename SMap>
|
||||
std::istream& operator>>
|
||||
(std::istream& is, Nef_polyhedron_S2<Kernel,Items, Mark, SMap>& NP)
|
||||
{
|
||||
typedef typename Nef_polyhedron_S2<Kernel,Items,Mark, SMap>::Sphere_map Sphere_map;
|
||||
CGAL::SM_io_parser<Sphere_map> I(is, NP.sphere_map());
|
||||
I.read();
|
||||
return is;
|
||||
}
|
||||
|
||||
} //namespace CGAL
|
||||
|
||||
#endif //CGAL_NEF_POLYHEDRON_IOSTREAM_3_H
|
||||
|
|
@ -673,7 +673,6 @@ public:
|
|||
#include <CGAL/Homogeneous.h>
|
||||
#include <CGAL/leda_integer.h>
|
||||
#include <CGAL/Nef_polyhedron_S2.h>
|
||||
#include <CGAL/SM_items.h>
|
||||
|
||||
using namespace CGAL;
|
||||
typedef Homogeneous<leda_integer> Kernel;
|
||||
|
|
|
|||
|
|
@ -36,7 +36,6 @@
|
|||
#include <CGAL/NewKernel_d/LA_eigen/LA.h>
|
||||
#else
|
||||
#error Eigen3 is required
|
||||
#include <CGAL/NewKernel_d/LA_default/LA.h>
|
||||
#endif
|
||||
|
||||
namespace CGAL {
|
||||
|
|
|
|||
|
|
@ -33,11 +33,6 @@
|
|||
#include <CGAL/use.h>
|
||||
|
||||
#include <vector>
|
||||
//#include <CGAL/Linear_algebraHd.h>
|
||||
|
||||
|
||||
//#include <CGAL/Linear_algebra.h>
|
||||
//#include <CGAL/number_type_utils.h>
|
||||
|
||||
namespace CGAL {
|
||||
|
||||
|
|
|
|||
|
|
@ -32,7 +32,6 @@
|
|||
|
||||
#include <cmath>
|
||||
#include <CGAL/basic.h>
|
||||
//#include <CGAL/number_type_utils.h>
|
||||
#include <cstdlib>
|
||||
|
||||
namespace CGAL {
|
||||
|
|
|
|||
|
|
@ -30,18 +30,6 @@ Enriched incremental builder for CGAL Polyhedral Surfaces.
|
|||
#define Enriched_polyhedron_incremental_builder_3_H 1
|
||||
|
||||
#include <CGAL/basic.h>
|
||||
// MS Visual C++ 6.0 does not work with the new design.
|
||||
#if defined( _MSC_VER) && (_MSC_VER <= 1200)
|
||||
#ifndef CGAL_USE_POLYHEDRON_DESIGN_TWO
|
||||
#define CGAL_USE_POLYHEDRON_DESIGN_ONE 1
|
||||
#endif
|
||||
#endif
|
||||
|
||||
#ifdef CGAL_USE_POLYHEDRON_DESIGN_ONE
|
||||
#include <CGAL/Polyhedron_old/Polyhedron_incremental_builder_3.h>
|
||||
#else // CGAL_USE_POLYHEDRON_DESIGN_ONE //
|
||||
#define CGAL_USE_POLYHEDRON_DESIGN_TWO 1
|
||||
|
||||
#include <CGAL/Random_access_adaptor.h>
|
||||
#include <CGAL/HalfedgeDS_decorator.h>
|
||||
#include <CGAL/Unique_hash_map.h>
|
||||
|
|
@ -838,6 +826,6 @@ remove_unconnected_vertices( Tag_true) {
|
|||
|
||||
} //namespace CGAL
|
||||
|
||||
#endif // CGAL_USE_POLYHEDRON_DESIGN_ONE //
|
||||
|
||||
#endif // CGAL_Enriched_polyhedron_incremental_builder_3_H //
|
||||
// EOF //
|
||||
|
|
|
|||
|
|
@ -25,9 +25,6 @@
|
|||
#include <CGAL/circulator.h>
|
||||
#include <CGAL/Triangulation_utils_2.h>
|
||||
#include <CGAL/triangulation_assertions.h>
|
||||
// #include <CGAL/Triangulation_face_2.h>
|
||||
// #include <CGAL/Triangulation_vertex_2.h>
|
||||
// #include <CGAL/Triangulation_handles_2.h>
|
||||
|
||||
namespace CGAL {
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue