From d2abab4c5aa24efcf48687835cff77152c7139e8 Mon Sep 17 00:00:00 2001 From: Paolo Cignoni cignoni Date: Fri, 1 Oct 2010 18:53:39 +0000 Subject: [PATCH] Make filter_csg more robust against rounding issues. --- src/fgt/filter_csg/intercept.h | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/src/fgt/filter_csg/intercept.h b/src/fgt/filter_csg/intercept.h index b848a06d8..655701f77 100644 --- a/src/fgt/filter_csg/intercept.h +++ b/src/fgt/filter_csg/intercept.h @@ -660,12 +660,12 @@ namespace vcg { public: template inline InterceptSet3(const MeshType &m, const Point3x &d, int subCellPrecision=32, vcg::CallBackPos *cb=vcg::DummyCallBackPos) : delta(d), - bbox(Point3i(floor(m.bbox.min.X() / d.X()) -1, - floor(m.bbox.min.Y() / d.Y()) -1, - floor(m.bbox.min.Z() / d.Z()) -1), - Point3i(ceil(m.bbox.max.X() / d.X()), - ceil(m.bbox.max.Y() / d.Y()), - ceil(m.bbox.max.Z() / d.Z()))) + bbox(Point3i(floor(m.bbox.min.X() / d.X()) - 1, + floor(m.bbox.min.Y() / d.Y()) - 1, + floor(m.bbox.min.Z() / d.Z()) - 1), + Point3i(ceil(m.bbox.max.X() / d.X()) + 1, + ceil(m.bbox.max.Y() / d.Y()) + 1, + ceil(m.bbox.max.Z() / d.Z()) + 1)) { const Point3x invDelta(Scalar(1) / delta.X(), Scalar(1) / delta.Y(),