mirror of https://github.com/CGAL/cgal
Nef_3: Avoid geometric test
This commit is contained in:
parent
c837828770
commit
f09f38c3f2
|
|
@ -914,7 +914,7 @@ public:
|
|||
number_of_ray_shooting_queries++;
|
||||
timer_ray_shooting.start();
|
||||
#endif
|
||||
Object_handle o = pl->shoot(ray);
|
||||
Object_handle o = pl->shoot(ray, vi);
|
||||
#ifdef CGAL_NEF3_TIMER_POINT_LOCATION
|
||||
timer_ray_shooting.stop();
|
||||
#endif
|
||||
|
|
|
|||
|
|
@ -80,7 +80,7 @@ public:
|
|||
|
||||
virtual Object_handle locate(const Point_3& p) const = 0;
|
||||
|
||||
virtual Object_handle shoot(const Ray_3& s, int mask=255) const = 0;
|
||||
virtual Object_handle shoot(const Ray_3& s, Vertex_handle ray_source_vertex, int mask=255) const = 0;
|
||||
|
||||
virtual void intersect_with_edges( Halfedge_handle edge,
|
||||
const Intersection_call_back& call_back)
|
||||
|
|
@ -216,7 +216,7 @@ public:
|
|||
delete candidate_provider;
|
||||
}
|
||||
|
||||
virtual Object_handle shoot(const Ray_3& ray, int mask=255) const {
|
||||
virtual Object_handle shoot(const Ray_3& ray, Vertex_handle ray_source_vertex, int mask=255) const {
|
||||
CGAL_NEF_TIMER(rs_t.start());
|
||||
CGAL_assertion( initialized);
|
||||
_CGAL_NEF_TRACEN( "shooting: "<<ray);
|
||||
|
|
@ -250,6 +250,8 @@ public:
|
|||
else if( CGAL::assign( e, *o) && ((mask&2) != 0)) {
|
||||
Point_3 q;
|
||||
_CGAL_NEF_TRACEN("trying edge on "<< Segment_3(e->source()->point(),e->twin()->source()->point()));
|
||||
if ((ray_source_vertex != Vertex_handle()) && (ray_source_vertex != e->source()) && (ray_source_vertex != e->twin()->source())) {
|
||||
|
||||
if (is.does_intersect_internally(ray, Segment_3(e->source()->point(),
|
||||
e->twin()->source()->point()), q)) {
|
||||
_CGAL_NEF_TRACEN("ray intersects edge on " << q);
|
||||
|
|
@ -268,6 +270,7 @@ public:
|
|||
_CGAL_NEF_TRACEN("the edge becomes the new hit object");
|
||||
}
|
||||
}
|
||||
}
|
||||
else if( CGAL::assign( f, *o) && ((mask&4) != 0)) {
|
||||
Point_3 q;
|
||||
_CGAL_NEF_TRACEN("trying facet with on plane "<<f->plane()<<
|
||||
|
|
@ -661,7 +664,8 @@ public:
|
|||
private:
|
||||
Volume_handle determine_volume( const Ray_3& ray) const {
|
||||
Halffacet_handle f_below;
|
||||
Object_handle o = shoot(ray);
|
||||
Vertex_handle null_vertex;
|
||||
Object_handle o = shoot(ray, null_vertex);
|
||||
Vertex_handle v;
|
||||
Halfedge_handle e;
|
||||
Halffacet_handle f;
|
||||
|
|
|
|||
Loading…
Reference in New Issue