From 8b3fab7a91a352893227f3a9c2a815ebee0f3834 Mon Sep 17 00:00:00 2001 From: Giles Bathgate Date: Tue, 29 Jun 2021 17:33:46 +0100 Subject: [PATCH] Remove code related to CGAL_NEF3_POINT_LOCATOR_NAIVE --- Nef_3/include/CGAL/Nef_3/Binary_operation.h | 12 -- Nef_3/include/CGAL/Nef_3/SNC_point_locator.h | 136 ------------------- 2 files changed, 148 deletions(-) diff --git a/Nef_3/include/CGAL/Nef_3/Binary_operation.h b/Nef_3/include/CGAL/Nef_3/Binary_operation.h index 58c1af82722..61c86bca0d7 100644 --- a/Nef_3/include/CGAL/Nef_3/Binary_operation.h +++ b/Nef_3/include/CGAL/Nef_3/Binary_operation.h @@ -530,18 +530,6 @@ class Binary_operation : public CGAL::SNC_decorator { } CGAL_NEF_TRACEN("\nnumber of vertices (so far...) = " << this->sncp()->number_of_vertices()); -#elif defined CGAL_NEF3_INTERSECTION_NAIVE - - CGAL::SNC_point_locator_naive pln1; - CGAL::SNC_point_locator_naive pln2; - pln1.initialize(const_cast(&snc1)); - pln2.initialize(const_cast(&snc2)); - Halfedge_iterator e0; - CGAL_forall_edges(e0,const_cast(snc1)) - pln2.intersect_with_edges_and_facets(e0,call_back0); - CGAL_forall_edges(e0,const_cast(snc2)) - pln1.intersect_with_facets( e0, call_back1); - #else CGAL_NEF_TRACEN("intersection by fast box intersection"); binop_intersection_test_segment_tree binop_box_intersection; diff --git a/Nef_3/include/CGAL/Nef_3/SNC_point_locator.h b/Nef_3/include/CGAL/Nef_3/SNC_point_locator.h index 26116cc643a..36013bf3538 100644 --- a/Nef_3/include/CGAL/Nef_3/SNC_point_locator.h +++ b/Nef_3/include/CGAL/Nef_3/SNC_point_locator.h @@ -870,142 +870,6 @@ private: SNC_intersection is; }; -#ifdef CGAL_NEF3_POINT_LOCATOR_NAIVE -template -class SNC_point_locator_naive : - public SNC_ray_shooter, - public SNC_point_locator -{ - typedef typename SNC_decorator::SNC_structure SNC_structure; - typedef SNC_ray_shooter Base; - typedef SNC_point_locator_naive Self; - typedef SNC_point_locator SNC_point_locator; - typedef CGAL::SNC_intersection SNC_intersection; - typedef typename SNC_decorator::Decorator_traits Decorator_traits; - typedef typename Decorator_traits::SM_decorator SM_decorator; - -public: - typedef typename SNC_decorator::Object_handle Object_handle; - typedef typename SNC_decorator::Point_3 Point_3; - typedef typename SNC_decorator::Segment_3 Segment_3; - typedef typename SNC_decorator::Ray_3 Ray_3; - typedef typename SNC_structure::Aff_transformation_3 - Aff_transformation_3; - - typedef typename Decorator_traits::Vertex_handle Vertex_handle; - typedef typename Decorator_traits::Halfedge_handle Halfedge_handle; - typedef typename Decorator_traits::Halffacet_handle Halffacet_handle; - typedef typename Decorator_traits::Volume_handle Volume_handle; - typedef typename Decorator_traits::Vertex_iterator Vertex_iterator; - typedef typename Decorator_traits::Halfedge_iterator Halfedge_iterator; - typedef typename Decorator_traits::Halffacet_iterator Halffacet_iterator; - -public: - SNC_point_locator_naive() : initialized(false) {} - virtual void initialize(SNC_structure* W) { - CGAL_NEF_TIMER(ct_t.start()); - this->version_ = std::string("Naive Point Locator (tm)"); - CGAL_NEF_CLOG(version()); - CGAL_assertion( W != nullptr); - Base::initialize(W); - initialized = true; - CGAL_NEF_TIMER(ct_t.stop()); - } - - virtual Self* clone() const { - return new Self; - } - - virtual bool update( Unique_hash_map& V, - Unique_hash_map& E, - Unique_hash_map& F) { - CGAL_NEF_TIMER(ct_t.start()); - CGAL_assertion( initialized); - CGAL_NEF_TIMER(ct_t.stop()); - return false; - } - - virtual ~SNC_point_locator_naive() {} - - virtual Object_handle locate(const Point_3& p) const { - CGAL_NEF_TIMER(pl_t.start()); - CGAL_assertion( initialized); - CGAL_NEF_TIMER(pl_t.stop()); - return Base::locate(p); - } - - virtual Object_handle shoot(const Ray_3& r, int mask=0) const { - CGAL_NEF_TIMER(rs_t.start()); - CGAL_assertion( initialized); - CGAL_NEF_TIMER(rs_t.stop()); - return Base::shoot(r); - } - - virtual void transform(const Aff_transformation_3& aff) {} - - virtual void intersect_with_edges_and_facets(Halfedge_handle e0, - const typename SNC_point_locator::Intersection_call_back& call_back) const { - intersect_with_edges(e0,call_back); - intersect_with_facets(e0,call_back); - } - - virtual void intersect_with_edges( Halfedge_handle e0, - const typename SNC_point_locator::Intersection_call_back& call_back) const { - CGAL_NEF_TIMER(it_t.start()); - CGAL_assertion( initialized); - CGAL_NEF_TRACEN( "intersecting edge: "<< Segment_3(e0->source()->point(), - e0->twin()->source()->point())); - SNC_intersection is(*this->sncp()); - Segment_3 s(Segment_3(e0->source()->point(),e0->twin()->source()->point())); - Halfedge_iterator e; - CGAL_forall_edges( e, *this->sncp()) { - -#ifdef CGAL_NEF3_DUMP_STATISTICS - ++number_of_intersection_candidates; -#endif - - Point_3 q; - if( is.does_intersect_internally( s, Segment_3(e->source()->point(), - e->twin()->source()->point()), q)) { - q = normalized(q); - CGAL_NEF_TRACEN("edge intersects edge "<< Segment_3(e->source()->point(), - e->twin()->source()->point()) <<" on "<source()->point(), - e0->twin()->source()->point())); - SNC_intersection is(*this->sncp()); - Segment_3 s(Segment_3(e0->source()->point(), - e0->twin()->source()->point())); - Halffacet_iterator f; - CGAL_forall_facets( f, *this->sncp()) { - -#ifdef CGAL_NEF3_DUMP_STATISTICS - ++number_of_intersection_candidates; -#endif - - Point_3 q; - if( is.does_intersect_internally( s, f, q) ) { - q = normalized(q); - CGAL_NEF_TRACEN("edge intersects facet on plane "<plane()<<" on "<