diff --git a/Point_set_shape_detection_3/include/CGAL/Cylinder_shape.h b/Point_set_shape_detection_3/include/CGAL/Cylinder_shape.h index 959999ae1b0..72b65db8d41 100644 --- a/Point_set_shape_detection_3/include/CGAL/Cylinder_shape.h +++ b/Point_set_shape_detection_3/include/CGAL/Cylinder_shape.h @@ -157,10 +157,10 @@ namespace CGAL { FT u = ((a2 < M_PI_2) ? 2 * M_PI - a1 : a1) * c; - min[0] = std::min(min[0], u); - max[0] = std::max(max[0], u); - min[1] = std::min(min[1], v); - max[1] = std::max(max[1], v); + min[0] = (std::min)(min[0], u); + max[0] = (std::max)(max[0], u); + min[1] = (std::min)(min[1], v); + max[1] = (std::max)(max[1], v); parameterSpace[i] = std::pair(u, v); } @@ -168,7 +168,7 @@ namespace CGAL { void parameter_extend(const Point ¢er, FT width, FT min[2], FT max[2]) const { //V length of axis in box? not enough - FT maxLambda = std::numeric_limits::max(), minLambda = -std::numeric_limits::max(); + FT maxLambda = (std::numeric_limits::max)(), minLambda = -(std::numeric_limits::max)(); Vector a = m_axis.to_vector(); Point p = m_point_on_axis; @@ -179,8 +179,8 @@ namespace CGAL { if (l1 * l2 > 0) { std::cout << "Cylinder::parameterExtend(): dim 0, l1*l2 > 0" << std::endl; } - minLambda = std::max(minLambda, std::min(l1, l2)); - maxLambda = std::min(maxLambda, std::max(l1, l2)); + minLambda = (std::max)(minLambda, (std::min)(l1, l2)); + maxLambda = (std::min)(maxLambda, (std::max)(l1, l2)); } } diff --git a/Point_set_shape_detection_3/include/CGAL/Octree.h b/Point_set_shape_detection_3/include/CGAL/Octree.h index 1edd1ce3bd8..f0bb3dd3d16 100644 --- a/Point_set_shape_detection_3/include/CGAL/Octree.h +++ b/Point_set_shape_detection_3/include/CGAL/Octree.h @@ -612,20 +612,20 @@ namespace CGAL { void buildBoundingCube() { - FT min[] = {std::numeric_limits::max(), std::numeric_limits::max(), std::numeric_limits::max()}; - FT max[] = {std::numeric_limits::min(), std::numeric_limits::min(), std::numeric_limits::min()}; + FT min[] = {(std::numeric_limits::max)(), (std::numeric_limits::max)(), (std::numeric_limits::max)()}; + FT max[] = {(std::numeric_limits::min)(), (std::numeric_limits::min)(), (std::numeric_limits::min)()}; for (unsigned int i = 0;isize();i++) { Point p = get(m_pointPMap, *this->at(i)); - min[0] = std::min(min[0], p.x()); - min[1] = std::min(min[1], p.y()); - min[2] = std::min(min[2], p.z()); - max[0] = std::max(max[0], p.x()); - max[1] = std::max(max[1], p.y()); - max[2] = std::max(max[2], p.z()); + min[0] = (std::min)(min[0], p.x()); + min[1] = (std::min)(min[1], p.y()); + min[2] = (std::min)(min[2], p.z()); + max[0] = (std::max)(max[0], p.x()); + max[1] = (std::max)(max[1], p.y()); + max[2] = (std::max)(max[2], p.z()); } - m_width = std::max(max[0] - min[0], std::max(max[1] - min[1], max[2] - min[2])) * 0.5; + m_width = (std::max)(max[0] - min[0], (std::max)(max[1] - min[1], max[2] - min[2])) * 0.5; // m_center[0] = (min[0] + max[0]) * 0.5; // m_center[1] = (min[1] + max[1]) * 0.5; diff --git a/Point_set_shape_detection_3/include/CGAL/Plane_shape.h b/Point_set_shape_detection_3/include/CGAL/Plane_shape.h index 2ab273cf3f1..62caa224e01 100644 --- a/Point_set_shape_detection_3/include/CGAL/Plane_shape.h +++ b/Point_set_shape_detection_3/include/CGAL/Plane_shape.h @@ -101,10 +101,10 @@ namespace CGAL { Vector p = (get(this->m_pointPMap, *(this->m_first + indices[i])) - m_point_on_primitive); FT u = p * m_base1; FT v = p * m_base2; - min[0] = std::min(min[0], u); - max[0] = std::max(max[0], u); - min[1] = std::min(min[1], v); - max[1] = std::max(max[1], v); + min[0] = (std::min)(min[0], u); + max[0] = (std::max)(max[0], u); + min[1] = (std::min)(min[1], v); + max[1] = (std::max)(max[1], v); parameterSpace[i] = std::pair(u, v); } } @@ -125,10 +125,10 @@ namespace CGAL { Vector p = (corner[i] - m_plane.point()); FT u = p * m_base1; FT v = p * m_base2; - min[0] = std::min(min[0], u); - min[1] = std::min(min[1], v); - max[0] = std::max(max[0], u); - max[1] = std::max(max[1], v); + min[0] = (std::min)(min[0], u); + min[1] = (std::min)(min[1], v); + max[0] = (std::max)(max[0], u); + max[1] = (std::max)(max[1], v); } } diff --git a/Point_set_shape_detection_3/include/CGAL/Shape_base.h b/Point_set_shape_detection_3/include/CGAL/Shape_base.h index 4c62bb1f992..c3eb85d52a5 100644 --- a/Point_set_shape_detection_3/include/CGAL/Shape_base.h +++ b/Point_set_shape_detection_3/include/CGAL/Shape_base.h @@ -47,12 +47,12 @@ namespace CGAL { Shape_base() : m_isValid(true), - m_lowerBound(std::numeric_limits::min()), - m_upperBound(std::numeric_limits::min()), + m_lowerBound((std::numeric_limits::min)()), + m_upperBound((std::numeric_limits::min)()), m_score(0), m_sum_ExpectedValue(0), m_nb_subset_used(0), - m_hasconnected_component(false) { + m_has_connected_component(false) { } virtual ~Shape_base() {} @@ -141,7 +141,7 @@ namespace CGAL { // if (m_hasconnected_component) // return m_score; - m_hasconnected_component = true; + m_has_connected_component = true; if (!supports_connected_component()) return m_indices.size(); @@ -368,7 +368,7 @@ namespace CGAL { FT m_sum_ExpectedValue; int m_nb_subset_used; //count the number of subset used so far for the score, and thus indicate the next one to use - bool m_hasconnected_component; + bool m_has_connected_component; std::vector m_indices; //indices of the points fitting to the candidate inputIterator m_first; diff --git a/Point_set_shape_detection_3/include/CGAL/Shape_detection_3.h b/Point_set_shape_detection_3/include/CGAL/Shape_detection_3.h index 1d74035ffb5..d2dee1e1f78 100644 --- a/Point_set_shape_detection_3/include/CGAL/Shape_detection_3.h +++ b/Point_set_shape_detection_3/include/CGAL/Shape_detection_3.h @@ -177,7 +177,7 @@ refer to schnabels paper //create subsets ------------------------------------------------ //how many subsets ? - m_num_subsets = std::max((int) std::floor(std::log(double(m_numAvailablePoints))/std::log(2.))-9, 2); + m_num_subsets = (std::max)((int) std::floor(std::log(double(m_numAvailablePoints))/std::log(2.))-9, 2); // SUBSET GENERATION -> // approach with increasing subset sizes -> replace with octree later on @@ -615,7 +615,7 @@ refer to schnabels paper } inline FT StopProbability(FT _sizeC, FT _np, FT _dC, FT _l) const { - return std::min(std::pow(1.f - _sizeC / (_np * _l * 3), _dC), 1.); //4 is (1 << (m_reqSamples - 1))) with m_reqSamples=3 (min number of points to create a candidate) + return (std::min)(std::pow(1.f - _sizeC / (_np * _l * 3), _dC), 1.); //4 is (1 << (m_reqSamples - 1))) with m_reqSamples=3 (min number of points to create a candidate) } static bool candComp(const Shape* a, const Shape* b) {