mirror of https://github.com/CGAL/cgal
Remove code related to CGAL_NEF3_POINT_LOCATOR_NAIVE
This commit is contained in:
parent
bdec4360d3
commit
8b3fab7a91
|
|
@ -530,18 +530,6 @@ class Binary_operation : public CGAL::SNC_decorator<Map> {
|
||||||
}
|
}
|
||||||
CGAL_NEF_TRACEN("\nnumber of vertices (so far...) = "
|
CGAL_NEF_TRACEN("\nnumber of vertices (so far...) = "
|
||||||
<< this->sncp()->number_of_vertices());
|
<< this->sncp()->number_of_vertices());
|
||||||
#elif defined CGAL_NEF3_INTERSECTION_NAIVE
|
|
||||||
|
|
||||||
CGAL::SNC_point_locator_naive<SNC_decorator> pln1;
|
|
||||||
CGAL::SNC_point_locator_naive<SNC_decorator> pln2;
|
|
||||||
pln1.initialize(const_cast<SNC_structure*>(&snc1));
|
|
||||||
pln2.initialize(const_cast<SNC_structure*>(&snc2));
|
|
||||||
Halfedge_iterator e0;
|
|
||||||
CGAL_forall_edges(e0,const_cast<SNC_structure&>(snc1))
|
|
||||||
pln2.intersect_with_edges_and_facets(e0,call_back0);
|
|
||||||
CGAL_forall_edges(e0,const_cast<SNC_structure&>(snc2))
|
|
||||||
pln1.intersect_with_facets( e0, call_back1);
|
|
||||||
|
|
||||||
#else
|
#else
|
||||||
CGAL_NEF_TRACEN("intersection by fast box intersection");
|
CGAL_NEF_TRACEN("intersection by fast box intersection");
|
||||||
binop_intersection_test_segment_tree<SNC_decorator> binop_box_intersection;
|
binop_intersection_test_segment_tree<SNC_decorator> binop_box_intersection;
|
||||||
|
|
|
||||||
|
|
@ -870,142 +870,6 @@ private:
|
||||||
SNC_intersection is;
|
SNC_intersection is;
|
||||||
};
|
};
|
||||||
|
|
||||||
#ifdef CGAL_NEF3_POINT_LOCATOR_NAIVE
|
|
||||||
template <typename SNC_decorator>
|
|
||||||
class SNC_point_locator_naive :
|
|
||||||
public SNC_ray_shooter<SNC_decorator>,
|
|
||||||
public SNC_point_locator<SNC_decorator>
|
|
||||||
{
|
|
||||||
typedef typename SNC_decorator::SNC_structure SNC_structure;
|
|
||||||
typedef SNC_ray_shooter<SNC_decorator> Base;
|
|
||||||
typedef SNC_point_locator_naive<SNC_decorator> Self;
|
|
||||||
typedef SNC_point_locator<SNC_decorator> SNC_point_locator;
|
|
||||||
typedef CGAL::SNC_intersection<SNC_structure> 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<Vertex_handle, bool>& V,
|
|
||||||
Unique_hash_map<Halfedge_handle, bool>& E,
|
|
||||||
Unique_hash_map<Halffacet_handle, bool>& 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 "<<q);
|
|
||||||
call_back( e0, make_object(e), q);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
CGAL_NEF_TIMER(it_t.stop());
|
|
||||||
}
|
|
||||||
|
|
||||||
virtual void intersect_with_facets( 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()));
|
|
||||||
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 "<<f->plane()<<" on "<<q);
|
|
||||||
call_back( e0, make_object(f), q);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
CGAL_NEF_TIMER(it_t.stop());
|
|
||||||
}
|
|
||||||
|
|
||||||
private:
|
|
||||||
bool initialized;
|
|
||||||
};
|
|
||||||
#endif
|
|
||||||
|
|
||||||
} //namespace CGAL
|
} //namespace CGAL
|
||||||
#endif // CGAL_NEF_SNC_POINT_LOCATOR_H
|
#endif // CGAL_NEF_SNC_POINT_LOCATOR_H
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue