mirror of https://github.com/CGAL/cgal
partial work after Mael's review
This commit is contained in:
parent
1e9cad98a8
commit
c8d2761f45
|
|
@ -128,15 +128,14 @@ public:
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
result_type
|
result_type
|
||||||
operator()(const Tetrahedron_3 &t, const Bbox_3& b) const
|
operator()(const Tetrahedron_3 &t, const Bbox_3& b) const
|
||||||
{
|
{
|
||||||
Get_approx<Point_3> get_approx;
|
Get_approx<Point_3> get_approx;
|
||||||
double px, py, pz;
|
double px, py, pz;
|
||||||
|
|
||||||
{
|
for(int i = 0; i < 4; ++i) {
|
||||||
const Point_3& p = t[0];
|
const Point_3& p = t[i];
|
||||||
if (fit_in_double(get_approx(p).x(), px) && fit_in_double(get_approx(p).y(), py) &&
|
if (fit_in_double(get_approx(p).x(), px) && fit_in_double(get_approx(p).y(), py) &&
|
||||||
fit_in_double(get_approx(p).z(), pz) )
|
fit_in_double(get_approx(p).z(), pz) )
|
||||||
{
|
{
|
||||||
|
|
@ -148,49 +147,18 @@ public:
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
{
|
|
||||||
const Point_3& p = t[1];
|
|
||||||
if (fit_in_double(get_approx(p).x(), px) && fit_in_double(get_approx(p).y(), py) &&
|
|
||||||
fit_in_double(get_approx(p).z(), pz) )
|
|
||||||
{
|
|
||||||
if( (px >= b.xmin() && px <= b.xmax()) && (py >= b.ymin() && py <= b.ymax()) && (pz >= b.zmin() && pz <= b.zmax()) ){
|
|
||||||
return true;
|
|
||||||
}
|
|
||||||
}else{
|
|
||||||
return Base::operator()(t,b);
|
return Base::operator()(t,b);
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
|
result_type
|
||||||
|
operator()(const Bbox_3& b, const Tetrahedron_3 &t) const
|
||||||
{
|
{
|
||||||
const Point_3& p = t[2];
|
return this->operator()(t, b);
|
||||||
if (fit_in_double(get_approx(p).x(), px) && fit_in_double(get_approx(p).y(), py) &&
|
|
||||||
fit_in_double(get_approx(p).z(), pz) )
|
|
||||||
{
|
|
||||||
if( (px >= b.xmin() && px <= b.xmax()) && (py >= b.ymin() && py <= b.ymax()) && (pz >= b.zmin() && pz <= b.zmax()) ){
|
|
||||||
return true;
|
|
||||||
}
|
|
||||||
}else{
|
|
||||||
return Base::operator()(t,b);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
{
|
|
||||||
const Point_3& p = t[3];
|
|
||||||
if (fit_in_double(get_approx(p).x(), px) && fit_in_double(get_approx(p).y(), py) &&
|
|
||||||
fit_in_double(get_approx(p).z(), pz) )
|
|
||||||
{
|
|
||||||
if( (px >= b.xmin() && px <= b.xmax()) && (py >= b.ymin() && py <= b.ymax()) && (pz >= b.zmin() && pz <= b.zmax()) ){
|
|
||||||
return true;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
return Base::operator()(t,b);
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
result_type
|
result_type
|
||||||
operator()(const Bbox_3& b, const Ray_3 &r) const
|
operator()(const Bbox_3& b, const Ray_3 &r) const
|
||||||
{
|
{
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue