mirror of https://github.com/CGAL/cgal
Add a cheap test, namely if one of the two points of segment or ray is in the bbox
make_mesh_3 without mesh optimizer, and criteria only on facets, is 2-4 faster on data sets like fandisk, rocker-arm.off, cheese.off
This commit is contained in:
parent
ab7f9d0047
commit
fa4697ba59
|
|
@ -140,6 +140,16 @@ namespace internal {
|
||||||
const double& bymax = bbox.ymax();
|
const double& bymax = bbox.ymax();
|
||||||
const double& bzmax = bbox.zmax();
|
const double& bzmax = bbox.zmax();
|
||||||
|
|
||||||
|
|
||||||
|
if( ( (px >= bxmin) && (px <= bxmax) &&
|
||||||
|
(py >= bymin) && (py <= bymax) &&
|
||||||
|
(pz >= bzmin) && (pz <= bzmax) ) ||
|
||||||
|
( (qx >= bxmin) && (qx <= bxmax) &&
|
||||||
|
(qy >= bymin) && (qy <= bymax) &&
|
||||||
|
(qz >= bzmin) && (qz <= bzmax) ) ) {
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
// The following code encode t1 and t2 by:
|
// The following code encode t1 and t2 by:
|
||||||
// t1 = tmin/dmin
|
// t1 = tmin/dmin
|
||||||
// t2 = tmax/dmax
|
// t2 = tmax/dmax
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue