mirror of https://github.com/CGAL/cgal
Merge pull request #4338 from sloriot/CGAL-remove_remaining_foreach
Remove BOOST_FOREACH added by recent PRs
This commit is contained in:
commit
3c84d28c45
|
|
@ -99,7 +99,7 @@ public:
|
|||
/// \cond SKIP_IN_MANUAL
|
||||
virtual float value (std::size_t pt_index)
|
||||
{
|
||||
cpp11::array<double, 3> c = get(color_map, *(input.begin()+pt_index)).to_hsv();
|
||||
std::array<double, 3> c = get(color_map, *(input.begin()+pt_index)).to_hsv();
|
||||
return float(c[std::size_t(m_channel)]);
|
||||
}
|
||||
/// \endcond
|
||||
|
|
|
|||
|
|
@ -244,7 +244,7 @@ MainWindow::open(QString fileName)
|
|||
#if BOOST_VERSION >= 105600 && (! defined(BOOST_GCC) || BOOST_GCC >= 40500)
|
||||
std::vector<K::Point_3> point_3_s;
|
||||
CGAL::read_multi_point_WKT(ifs, point_3_s);
|
||||
BOOST_FOREACH(const K::Point_3& point_3, point_3_s)
|
||||
for(const K::Point_3& point_3 : point_3_s)
|
||||
{
|
||||
points.push_back(Apollonius_site_2(K::Point_2(point_3.x(), point_3.y()), point_3.z()));
|
||||
}
|
||||
|
|
|
|||
|
|
@ -499,7 +499,7 @@ MainWindow::open(QString fileName)
|
|||
{
|
||||
#if BOOST_VERSION >= 105600 && (! defined(BOOST_GCC) || BOOST_GCC >= 40500)
|
||||
CGAL::read_multi_point_WKT(ifs, points);
|
||||
BOOST_FOREACH(K::Point_2 p, points)
|
||||
for(K::Point_2 p : points)
|
||||
{
|
||||
mc.insert(p);
|
||||
me.insert(p);
|
||||
|
|
|
|||
|
|
@ -358,7 +358,7 @@ MainWindow::loadWKTConstraints(QString
|
|||
do{
|
||||
std::vector<Polygon> polygons;
|
||||
CGAL::read_multi_polygon_WKT(ifs, polygons);
|
||||
BOOST_FOREACH(const Polygon& poly, polygons)
|
||||
for(const Polygon& poly : polygons)
|
||||
{
|
||||
if(poly.outer_boundary().is_empty())
|
||||
continue;
|
||||
|
|
@ -388,7 +388,7 @@ MainWindow::loadWKTConstraints(QString
|
|||
do{
|
||||
std::vector<LineString > linestrings;
|
||||
CGAL::read_multi_linestring_WKT(ifs, linestrings);
|
||||
BOOST_FOREACH(const LineString& ls, linestrings)
|
||||
for(const LineString& ls : linestrings)
|
||||
{
|
||||
bool first_pass=true;
|
||||
LineString::const_iterator it = ls.begin();
|
||||
|
|
|
|||
|
|
@ -401,7 +401,7 @@ MainWindow::loadWKT(QString
|
|||
{
|
||||
std::vector<K::Point_2> mpts;
|
||||
CGAL::read_multi_point_WKT(ifs, mpts);
|
||||
BOOST_FOREACH(const K::Point_2& p, mpts)
|
||||
for(const K::Point_2& p : mpts)
|
||||
svd.insert(p);
|
||||
}while(ifs.good() && !ifs.eof());
|
||||
//Lines
|
||||
|
|
@ -412,7 +412,7 @@ MainWindow::loadWKT(QString
|
|||
typedef std::vector<K::Point_2> LineString;
|
||||
std::vector<LineString> mls;
|
||||
CGAL::read_multi_linestring_WKT(ifs, mls);
|
||||
BOOST_FOREACH(const LineString& ls, mls)
|
||||
for(const LineString& ls : mls)
|
||||
{
|
||||
if(ls.empty())
|
||||
continue;
|
||||
|
|
@ -450,7 +450,7 @@ MainWindow::loadWKT(QString
|
|||
typedef CGAL::Polygon_with_holes_2<K> Polygon;
|
||||
std::vector<Polygon> mps;
|
||||
CGAL::read_multi_polygon_WKT(ifs, mps);
|
||||
BOOST_FOREACH(const Polygon& poly, mps)
|
||||
for(const Polygon& poly : mps)
|
||||
{
|
||||
if(poly.outer_boundary().is_empty())
|
||||
continue;
|
||||
|
|
|
|||
|
|
@ -273,7 +273,7 @@ MainWindow::open(QString fileName)
|
|||
#if BOOST_VERSION >= 105600 && (! defined(BOOST_GCC) || BOOST_GCC >= 40500)
|
||||
std::vector<std::vector<Point_2> > mls;
|
||||
CGAL::read_multi_linestring_WKT(ifs, mls);
|
||||
BOOST_FOREACH(const std::vector<Point_2>& ls, mls)
|
||||
for(const std::vector<Point_2>& ls : mls)
|
||||
{
|
||||
if(ls.size() > 2)
|
||||
continue;
|
||||
|
|
@ -315,7 +315,7 @@ MainWindow::on_actionSaveSegments_triggered()
|
|||
{
|
||||
#if BOOST_VERSION >= 105600 && (! defined(BOOST_GCC) || BOOST_GCC >= 40500)
|
||||
std::vector<std::vector<Point_2> >mls;
|
||||
BOOST_FOREACH(const Segment_2& seg, input)
|
||||
for(const Segment_2& seg : input)
|
||||
{
|
||||
std::vector<Point_2> ls(2);
|
||||
ls[0] = seg.source();
|
||||
|
|
|
|||
|
|
@ -572,12 +572,12 @@ MainWindow::loadWKT(QString
|
|||
typedef CGAL::Point_2<K> Point;
|
||||
std::vector<Polygon> mps;
|
||||
CGAL::read_multi_polygon_WKT(ifs, mps);
|
||||
BOOST_FOREACH(const Polygon& p, mps)
|
||||
for(const Polygon& p : mps)
|
||||
{
|
||||
if(p.outer_boundary().is_empty())
|
||||
continue;
|
||||
|
||||
BOOST_FOREACH(Point point, p.outer_boundary().container())
|
||||
for(Point point : p.outer_boundary().container())
|
||||
cdt.insert(point);
|
||||
for(Polygon::General_polygon_2::Edge_const_iterator
|
||||
e_it=p.outer_boundary().edges_begin(); e_it != p.outer_boundary().edges_end(); ++e_it)
|
||||
|
|
@ -586,7 +586,7 @@ MainWindow::loadWKT(QString
|
|||
for(Polygon::Hole_const_iterator h_it =
|
||||
p.holes_begin(); h_it != p.holes_end(); ++h_it)
|
||||
{
|
||||
BOOST_FOREACH(Point point, h_it->container())
|
||||
for(Point point : h_it->container())
|
||||
cdt.insert(point);
|
||||
for(Polygon::General_polygon_2::Edge_const_iterator
|
||||
e_it=h_it->edges_begin(); e_it != h_it->edges_end(); ++e_it)
|
||||
|
|
@ -604,7 +604,7 @@ MainWindow::loadWKT(QString
|
|||
typedef std::vector<K::Point_2> LineString;
|
||||
std::vector<LineString> mls;
|
||||
CGAL::read_multi_linestring_WKT(ifs, mls);
|
||||
BOOST_FOREACH(const LineString& ls, mls)
|
||||
for(const LineString& ls : mls)
|
||||
{
|
||||
if(ls.empty())
|
||||
continue;
|
||||
|
|
@ -642,7 +642,7 @@ MainWindow::loadWKT(QString
|
|||
{
|
||||
std::vector<K::Point_2> mpts;
|
||||
CGAL::read_multi_point_WKT(ifs, mpts);
|
||||
BOOST_FOREACH(const K::Point_2& p, mpts)
|
||||
for(const K::Point_2& p : mpts)
|
||||
{
|
||||
cdt.insert(p);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -260,7 +260,7 @@ MainWindow::on_actionLoadPoints_triggered()
|
|||
#if BOOST_VERSION >= 105600 && (! defined(BOOST_GCC) || BOOST_GCC >= 40500)
|
||||
std::vector<K::Point_3> points_3;
|
||||
CGAL::read_multi_point_WKT(ifs, points_3);
|
||||
BOOST_FOREACH(const K::Point_3& p, points_3)
|
||||
for(const K::Point_3& p : points_3)
|
||||
{
|
||||
points.push_back(Weighted_point_2(K::Point_2(p.x(), p.y()), p.z()));
|
||||
}
|
||||
|
|
|
|||
|
|
@ -30,7 +30,7 @@ struct Nth_iterator_element : private Store_kernel<K> {
|
|||
typedef typename Get_type<K, typename iterator_tag_traits<T>::value_tag>::type result_type;
|
||||
template<class U> result_type operator()(U&& u, int i) const {
|
||||
typename Get_functor<K, Construct_ttag<T> >::type ci(this->kernel());
|
||||
return *cpp0x::next(ci(std::forward<U>(u),Begin_tag()),i);
|
||||
return *std::next(ci(std::forward<U>(u),Begin_tag()),i);
|
||||
}
|
||||
};
|
||||
//typedef typename Functor<typename iterator_tag_traits<T>::nth_element>::type nth_elem;
|
||||
|
|
|
|||
|
|
@ -70,7 +70,7 @@ int main (int, char**)
|
|||
parameters.normal_threshold = 0.9;
|
||||
ransac.detect(parameters);
|
||||
|
||||
BOOST_FOREACH(boost::shared_ptr<Efficient_ransac::Shape> shape, ransac.shapes())
|
||||
for(boost::shared_ptr<Efficient_ransac::Shape> shape : ransac.shapes())
|
||||
if (Sphere* sphere = dynamic_cast<Sphere*>(shape.get()))
|
||||
std::cerr << "Detected sphere of center " << sphere->center() // Center should be approx 0, 0, 0
|
||||
<< " and of radius " << sphere->radius() << std::endl; // Radius should be approx 1
|
||||
|
|
|
|||
|
|
@ -445,7 +445,7 @@ class Polygon_2 {
|
|||
Point_2& vertex(std::size_t i)
|
||||
{
|
||||
CGAL_precondition( i < d_container.size() );
|
||||
return *(cpp11::next(d_container.begin(), i));
|
||||
return *(std::next(d_container.begin(), i));
|
||||
}
|
||||
/// Returns a reference to the `i`-th vertex.
|
||||
Point_2& operator[](std::size_t i)
|
||||
|
|
|
|||
|
|
@ -1259,7 +1259,7 @@ public:
|
|||
// non-manifold vertices would not be duplicated in interior
|
||||
// vertices of patche)
|
||||
// special code to handle non-manifold vertices on the boundary
|
||||
BOOST_FOREACH (vertex_descriptor vd, vertices(tm1))
|
||||
for (vertex_descriptor vd : vertices(tm1))
|
||||
{
|
||||
boost::optional<halfedge_descriptor> op_h = is_border(vd, tm1);
|
||||
if (op_h == boost::none) continue;
|
||||
|
|
@ -1629,12 +1629,12 @@ public:
|
|||
}
|
||||
|
||||
// Code dedicated to the handling of non-manifold vertices
|
||||
BOOST_FOREACH(vertex_descriptor vd, border_nm_vertices)
|
||||
for(vertex_descriptor vd : border_nm_vertices)
|
||||
{
|
||||
// first check if at least one incident patch will be kept
|
||||
boost::unordered_set<std::size_t> id_p_rm;
|
||||
bool all_removed=true;
|
||||
BOOST_FOREACH(halfedge_descriptor h, halfedges_around_target(vd, tm1))
|
||||
for(halfedge_descriptor h : halfedges_around_target(vd, tm1))
|
||||
{
|
||||
face_descriptor f = face(h, tm1);
|
||||
if ( f != GT::null_face() )
|
||||
|
|
@ -1649,7 +1649,7 @@ public:
|
|||
if (all_removed)
|
||||
id_p_rm.erase(id_p_rm.begin());
|
||||
// remove the vertex from the interior vertices of patches to be removed
|
||||
BOOST_FOREACH(std::size_t pid, id_p_rm)
|
||||
for(std::size_t pid : id_p_rm)
|
||||
patches_of_tm1[pid].interior_vertices.erase(vd);
|
||||
|
||||
// we now need to update the next/prev relationship induced by the future removal of patches
|
||||
|
|
@ -1694,7 +1694,7 @@ public:
|
|||
else
|
||||
{
|
||||
// we push-back the halfedge for the next round only if it was not the first
|
||||
if (h != *cpp11::prev(hit))
|
||||
if (h != *std::prev(hit))
|
||||
--hit;
|
||||
break;
|
||||
}
|
||||
|
|
@ -1703,7 +1703,7 @@ public:
|
|||
while(true);
|
||||
if (hit == end) break;
|
||||
}
|
||||
BOOST_FOREACH ( const Hedge_pair& p, hedges_to_link)
|
||||
for(const Hedge_pair& p : hedges_to_link)
|
||||
set_next(p.first, p.second, tm1);
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -28,7 +28,7 @@ bool is_ccw(int xi, int yi,
|
|||
CGAL::Polygon_2<K> polygon;
|
||||
if(polyline.front() == polyline.back())
|
||||
{
|
||||
BOOST_FOREACH(const typename K::Point_3& p, polyline)
|
||||
for(const typename K::Point_3& p : polyline)
|
||||
{
|
||||
polygon.push_back(typename K::Point_2(p[xi], p[yi]));
|
||||
}
|
||||
|
|
|
|||
|
|
@ -296,7 +296,7 @@ void test()
|
|||
ss.str(std::string());
|
||||
ss << "OFF\n 7 4 0\n 0 0 0\n2 0 0\n4 0 0\n4 1 0\n0 1 0\n3 1 0\n 1 1 0\n3 0 1 4\n3 1 2 3\n3 1 5 6\n3 1 3 5\n";
|
||||
ss >> tm1;
|
||||
CGAL::Euler::remove_face(halfedge(*CGAL::cpp11::prev(faces(tm1).end()),tm1),tm1);
|
||||
CGAL::Euler::remove_face(halfedge(*std::prev(faces(tm1).end()),tm1),tm1);
|
||||
PMP::clip(tm1, K::Plane_3(-1,0,0,2));
|
||||
assert(vertices(tm1).size()==6);
|
||||
CGAL::clear(tm1);
|
||||
|
|
@ -305,7 +305,7 @@ void test()
|
|||
ss << "OFF\n 9 7 0\n 0 0 0\n2 0 0\n4 0 0\n4 1 0\n0 1 0\n3 1 0\n 1 1 0\n3 -1 0\n1 -1 0\n3 0 1 4\n3 1 2 3\n3 1 5 6\n3 1 8 7\n3 1 3 5\n3 1 6 4\n3 1 0 8\n";
|
||||
ss >> tm1;
|
||||
for (int i=0;i<3;++i)
|
||||
CGAL::Euler::remove_face(halfedge(*CGAL::cpp11::prev(faces(tm1).end()),tm1),tm1);
|
||||
CGAL::Euler::remove_face(halfedge(*std::prev(faces(tm1).end()),tm1),tm1);
|
||||
PMP::clip(tm1, K::Plane_3(-1,0,0,2));
|
||||
assert(vertices(tm1).size()==7);
|
||||
CGAL::clear(tm1);
|
||||
|
|
@ -314,7 +314,7 @@ void test()
|
|||
ss << "OFF\n 9 7 0\n 0 0 0\n2 0 0\n4 0 0\n4 1 0\n0 1 0\n3 1 0\n 1 1 0\n3 -1 0\n1 -1 0\n3 0 1 4\n3 1 2 3\n3 1 5 6\n3 1 8 7\n3 1 3 5\n3 1 6 4\n3 1 0 8\n";
|
||||
ss >> tm1;
|
||||
for (int i=0;i<3;++i)
|
||||
CGAL::Euler::remove_face(halfedge(*CGAL::cpp11::prev(faces(tm1).end()),tm1),tm1);
|
||||
CGAL::Euler::remove_face(halfedge(*std::prev(faces(tm1).end()),tm1),tm1);
|
||||
PMP::clip(tm1, K::Plane_3(0,1,0,0));
|
||||
assert(vertices(tm1).size()==3);
|
||||
CGAL::clear(tm1);
|
||||
|
|
@ -323,7 +323,7 @@ void test()
|
|||
ss << "OFF\n 9 7 0\n 0 0 0\n2 0 0\n4 0 0\n4 1 0\n0 1 0\n3 1 0\n 1 1 0\n3 -1 0\n1 -1 0\n3 0 1 4\n3 1 2 3\n3 1 5 6\n3 1 8 7\n3 1 3 5\n3 1 6 4\n3 1 0 8\n";
|
||||
ss >> tm1;
|
||||
for (int i=0;i<3;++i)
|
||||
CGAL::Euler::remove_face(halfedge(*CGAL::cpp11::prev(faces(tm1).end()),tm1),tm1);
|
||||
CGAL::Euler::remove_face(halfedge(*std::prev(faces(tm1).end()),tm1),tm1);
|
||||
PMP::clip(tm1, K::Plane_3(0,-1,0,0));
|
||||
assert(vertices(tm1).size()==7);
|
||||
CGAL::clear(tm1);
|
||||
|
|
|
|||
|
|
@ -6,8 +6,6 @@
|
|||
#include <CGAL/boost/graph/named_params_helper.h>
|
||||
#include <CGAL/Polygon_mesh_processing/repair.h>
|
||||
|
||||
#include <boost/foreach.hpp>
|
||||
|
||||
#include <cassert>
|
||||
#include <fstream>
|
||||
#include <map>
|
||||
|
|
|
|||
|
|
@ -258,7 +258,7 @@ public:
|
|||
is_tree_empty = tree.empty();
|
||||
nb_lines = positions_lines.size();
|
||||
setEdgeContainer(0, new Ec(Vi::PROGRAM_NO_SELECTION, false));
|
||||
BOOST_FOREACH(auto v, CGAL::QGLViewer::QGLViewerPool())
|
||||
for(auto v : CGAL::QGLViewer::QGLViewerPool())
|
||||
{
|
||||
CGAL::Three::Viewer_interface* viewer = static_cast<CGAL::Three::Viewer_interface*>(v);
|
||||
initGL(viewer);
|
||||
|
|
@ -488,7 +488,7 @@ public:
|
|||
setEdgeContainer(0, new Ec(Vi::PROGRAM_NO_SELECTION, false));
|
||||
texture = new ::Texture(m_grid_size,m_grid_size);
|
||||
getTriangleContainer(0)->setTextureSize(QSize(m_grid_size, m_grid_size));
|
||||
BOOST_FOREACH(auto v, CGAL::QGLViewer::QGLViewerPool())
|
||||
for(auto v : CGAL::QGLViewer::QGLViewerPool())
|
||||
{
|
||||
CGAL::Three::Viewer_interface* viewer = static_cast<CGAL::Three::Viewer_interface*>(v);
|
||||
initGL(viewer);
|
||||
|
|
|
|||
|
|
@ -64,7 +64,7 @@ public:
|
|||
bbox.xmax(),bbox.ymax(),bbox.zmax()));
|
||||
|
||||
nb_points = points.size();
|
||||
BOOST_FOREACH(auto v, CGAL::QGLViewer::QGLViewerPool())
|
||||
for(auto v : CGAL::QGLViewer::QGLViewerPool())
|
||||
{
|
||||
CGAL::Three::Viewer_interface* viewer = static_cast<CGAL::Three::Viewer_interface*>(v);
|
||||
initGL(viewer);
|
||||
|
|
|
|||
|
|
@ -305,7 +305,7 @@ Scene_alpha_shape_item::Scene_alpha_shape_item(Scene_points_with_normal_item *po
|
|||
vertices.push_back(it->point().y()+offset.y);
|
||||
vertices.push_back(it->point().z()+offset.z);
|
||||
}
|
||||
BOOST_FOREACH(auto v, CGAL::QGLViewer::QGLViewerPool())
|
||||
for(auto v : CGAL::QGLViewer::QGLViewerPool())
|
||||
{
|
||||
CGAL::Three::Viewer_interface* viewer = static_cast<CGAL::Three::Viewer_interface*>(v);
|
||||
if(!isInit(viewer))
|
||||
|
|
|
|||
|
|
@ -532,7 +532,7 @@ void Scene_c3t3_item::common_constructor(bool is_surface)
|
|||
setEdgeContainer(Grid_edges, new Ec(Vi::PROGRAM_NO_SELECTION, false));
|
||||
setEdgeContainer(C3t3_edges, new Ec(Vi::PROGRAM_C3T3_EDGES, false));
|
||||
setPointContainer(C3t3_points, new Pc(Vi::PROGRAM_C3T3_EDGES, false));
|
||||
BOOST_FOREACH(auto v, CGAL::QGLViewer::QGLViewerPool())
|
||||
for(auto v : CGAL::QGLViewer::QGLViewerPool())
|
||||
{
|
||||
v->installEventFilter(this);
|
||||
}
|
||||
|
|
@ -611,7 +611,7 @@ void Scene_c3t3_item::updateCutPlane()
|
|||
if(!d)
|
||||
return;
|
||||
if(d->need_changed) {
|
||||
BOOST_FOREACH(auto v, CGAL::QGLViewer::QGLViewerPool())
|
||||
for(auto v : CGAL::QGLViewer::QGLViewerPool())
|
||||
{
|
||||
CGAL::Three::Viewer_interface* viewer = static_cast<CGAL::Three::Viewer_interface*>(v);
|
||||
d->are_intersection_buffers_filled[viewer] = false;
|
||||
|
|
@ -1581,7 +1581,7 @@ Scene_c3t3_item::setColor(QColor c)
|
|||
d->compute_color_map(c);
|
||||
invalidateOpenGLBuffers();
|
||||
d->invalidate_stats();
|
||||
BOOST_FOREACH(auto v, CGAL::QGLViewer::QGLViewerPool())
|
||||
for(auto v : CGAL::QGLViewer::QGLViewerPool())
|
||||
{
|
||||
CGAL::Three::Viewer_interface* viewer = static_cast<CGAL::Three::Viewer_interface*>(v);
|
||||
d->are_intersection_buffers_filled[viewer] = false;
|
||||
|
|
@ -1636,7 +1636,7 @@ void Scene_c3t3_item::show_intersection(bool b)
|
|||
d->intersection->setRenderingMode(renderingMode());
|
||||
connect(d->intersection, SIGNAL(destroyed()), this, SLOT(reset_intersection_item()));
|
||||
|
||||
BOOST_FOREACH(auto v, CGAL::QGLViewer::QGLViewerPool())
|
||||
for(auto v : CGAL::QGLViewer::QGLViewerPool())
|
||||
{
|
||||
CGAL::Three::Viewer_interface* viewer = static_cast<CGAL::Three::Viewer_interface*>(v);
|
||||
d->are_intersection_buffers_filled[viewer] = false;
|
||||
|
|
|
|||
|
|
@ -1295,7 +1295,7 @@ void Scene_surface_mesh_item::invalidate(Gl_data_names name)
|
|||
getEdgeContainer(0)->reset_vbos(name);
|
||||
getPointContainer(0)->reset_vbos(name);
|
||||
bool has_been_init = false;
|
||||
BOOST_FOREACH(CGAL::QGLViewer* v, CGAL::QGLViewer::QGLViewerPool())
|
||||
for(CGAL::QGLViewer* v : CGAL::QGLViewer::QGLViewerPool())
|
||||
{
|
||||
CGAL::Three::Viewer_interface* viewer = static_cast<CGAL::Three::Viewer_interface*>(v);
|
||||
if(!isInit(viewer))
|
||||
|
|
|
|||
|
|
@ -165,7 +165,7 @@ void Scene_textured_surface_mesh_item::common_constructor()
|
|||
setEdgeContainer(0, new Ec(Vi::PROGRAM_WITH_TEXTURED_EDGES, false));//edges
|
||||
getTriangleContainer(0)->setTextureSize(QSize(d->texture.GetWidth(), d->texture.GetHeight()));
|
||||
getEdgeContainer(0)->setTextureSize(QSize(d->texture.GetWidth(), d->texture.GetHeight()));
|
||||
BOOST_FOREACH(auto v, CGAL::QGLViewer::QGLViewerPool())
|
||||
for(auto v : CGAL::QGLViewer::QGLViewerPool())
|
||||
{
|
||||
CGAL::Three::Viewer_interface* viewer = static_cast<CGAL::Three::Viewer_interface*>(v);
|
||||
initGL(viewer);
|
||||
|
|
|
|||
|
|
@ -266,7 +266,7 @@ namespace CGAL{
|
|||
{
|
||||
has_uv = true;
|
||||
}
|
||||
cpp11::tuple<unsigned int, unsigned int, float, float, float> new_hedge;
|
||||
std::tuple<unsigned int, unsigned int, float, float, float> new_hedge;
|
||||
for (std::size_t j = 0; j < element.number_of_items(); ++ j)
|
||||
{
|
||||
for (std::size_t k = 0; k < element.number_of_properties(); ++ k)
|
||||
|
|
|
|||
|
|
@ -406,12 +406,12 @@ void MainWindow::loadWKT(QString
|
|||
if(! points.empty()){
|
||||
std::cout << "Ignore " << points.size() << " isolated points" << std::endl;
|
||||
}
|
||||
BOOST_FOREACH(LineString poly, polylines){
|
||||
for(LineString poly : polylines){
|
||||
if ( poly.size() > 2 ){
|
||||
m_pct.insert_constraint(poly.begin(), poly.end());
|
||||
}
|
||||
}
|
||||
BOOST_FOREACH(Polygon_with_holes_2 poly, polygons){
|
||||
for(Polygon_with_holes_2 poly : polygons){
|
||||
m_pct.insert_constraint(poly.outer_boundary().vertices_begin(), poly.outer_boundary().vertices_end());
|
||||
for(Polygon_with_holes_2::Hole_const_iterator it = poly.holes_begin(); it != poly.holes_end(); ++it){
|
||||
const Polygon_2& hole = *it;
|
||||
|
|
|
|||
|
|
@ -13,8 +13,8 @@
|
|||
#define CGAL_ITERATOR_RANGE_H
|
||||
|
||||
#include <CGAL/tuple.h>
|
||||
#include <boost/foreach.hpp>
|
||||
#include <utility>
|
||||
#include <boost/foreach.hpp>
|
||||
|
||||
namespace CGAL {
|
||||
|
||||
|
|
|
|||
|
|
@ -6,7 +6,6 @@
|
|||
#include <fstream>
|
||||
|
||||
#include <CGAL/IO/WKT.h>
|
||||
#include <boost/foreach.hpp> //must be included before WKT for some reason
|
||||
#include <CGAL/Simple_cartesian.h>
|
||||
#include <CGAL/Exact_predicates_exact_constructions_kernel.h>
|
||||
#include <vector>
|
||||
|
|
@ -27,7 +26,7 @@ int main(int argc, char* argv[])
|
|||
CGAL::read_linestring_WKT(is, ls);
|
||||
is.close();
|
||||
}
|
||||
BOOST_FOREACH(Point p, ls)
|
||||
for(Point p : ls)
|
||||
std::cout<<p<<std::endl;
|
||||
ls.clear();
|
||||
MultiLineString mls;
|
||||
|
|
@ -36,9 +35,9 @@ int main(int argc, char* argv[])
|
|||
CGAL::read_multi_linestring_WKT(is, mls);
|
||||
is.close();
|
||||
}
|
||||
BOOST_FOREACH(LineString l, mls)
|
||||
for(LineString l : mls)
|
||||
{
|
||||
BOOST_FOREACH(const Point& p, l)
|
||||
for(const Point& p : l)
|
||||
std::cout<<p<<std::endl;
|
||||
}
|
||||
return 0;
|
||||
|
|
|
|||
|
|
@ -9,8 +9,6 @@
|
|||
#include <CGAL/Simple_cartesian.h>
|
||||
#include <CGAL/Exact_predicates_exact_constructions_kernel.h>
|
||||
|
||||
#include <boost/foreach.hpp>
|
||||
|
||||
#include <vector>
|
||||
|
||||
//typedef CGAL::Simple_cartesian<CGAL::Gmpq> Kernel;
|
||||
|
|
@ -26,7 +24,7 @@ int main(int argc, char* argv[])
|
|||
std::ifstream is((argc>1)?argv[1]:"data/multipoint.wkt");
|
||||
MultiPoint mp;
|
||||
CGAL::read_multi_point_WKT(is, mp);
|
||||
BOOST_FOREACH(const Point& p, mp)
|
||||
for(const Point& p : mp)
|
||||
{
|
||||
std::cout<<p<<std::endl;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -10,8 +10,6 @@
|
|||
#include <CGAL/Simple_cartesian.h>
|
||||
#include <CGAL/Exact_predicates_exact_constructions_kernel.h>
|
||||
|
||||
#include <boost/foreach.hpp>
|
||||
|
||||
#include <vector>
|
||||
#include <deque>
|
||||
|
||||
|
|
@ -35,7 +33,7 @@ int main(int argc, char* argv[])
|
|||
if(!p.outer_boundary().is_empty())
|
||||
polys.push_back(p);
|
||||
}while(is.good() && !is.eof());
|
||||
BOOST_FOREACH(Polygon p, polys)
|
||||
for(Polygon p : polys)
|
||||
std::cout<<p<<std::endl;
|
||||
}
|
||||
|
||||
|
|
@ -43,7 +41,7 @@ int main(int argc, char* argv[])
|
|||
std::ifstream is((argc>2)?argv[2]:"data/multipolygon.wkt");
|
||||
MultiPolygon mp;
|
||||
CGAL::read_multi_polygon_WKT(is, mp);
|
||||
BOOST_FOREACH(Polygon p, mp)
|
||||
for(Polygon p : mp)
|
||||
std::cout<<p<<std::endl;
|
||||
}
|
||||
return 0;
|
||||
|
|
|
|||
|
|
@ -10,8 +10,6 @@
|
|||
#include <CGAL/Simple_cartesian.h>
|
||||
#include <CGAL/Exact_predicates_exact_constructions_kernel.h>
|
||||
|
||||
#include <boost/foreach.hpp>
|
||||
|
||||
#include <vector>
|
||||
|
||||
//typedef CGAL::Simple_cartesian<CGAL::Gmpq> Kernel;
|
||||
|
|
@ -35,12 +33,12 @@ int main(int argc, char* argv[])
|
|||
MultiPolygon polygons;
|
||||
CGAL::read_WKT(is, points,polylines,polygons);
|
||||
|
||||
BOOST_FOREACH(Point p, points)
|
||||
for(Point p : points)
|
||||
std::cout<<p<<std::endl;
|
||||
BOOST_FOREACH(LineString ls, polylines)
|
||||
BOOST_FOREACH(Point p, ls)
|
||||
for(LineString ls : polylines)
|
||||
for(Point p : ls)
|
||||
std::cout<<p<<std::endl;
|
||||
BOOST_FOREACH(Polygon p, polygons)
|
||||
for(Polygon p : polygons)
|
||||
std::cout<<p<<std::endl;
|
||||
|
||||
}
|
||||
|
|
|
|||
|
|
@ -48,7 +48,7 @@ class Color
|
|||
{
|
||||
private:
|
||||
|
||||
cpp11::array<unsigned char, 4> m_data;
|
||||
std::array<unsigned char, 4> m_data;
|
||||
|
||||
public:
|
||||
|
||||
|
|
@ -159,21 +159,21 @@ public:
|
|||
/*!
|
||||
returns the array with rgba values.
|
||||
*/
|
||||
const cpp11::array<unsigned char, 4>& to_rgba() const { return m_data; }
|
||||
const std::array<unsigned char, 4>& to_rgba() const { return m_data; }
|
||||
|
||||
/*!
|
||||
returns the array with rgb values.
|
||||
*/
|
||||
const cpp11::array<unsigned char, 3>& to_rgb() const
|
||||
const std::array<unsigned char, 3>& to_rgb() const
|
||||
{
|
||||
return reinterpret_cast<const cpp11::array<unsigned char, 3>&>(m_data);
|
||||
return reinterpret_cast<const std::array<unsigned char, 3>&>(m_data);
|
||||
}
|
||||
|
||||
/*!
|
||||
computes the hsv (hue, saturation, value) values and returns an
|
||||
array representing them as float values between 0 and 1.
|
||||
*/
|
||||
cpp11::array<double, 3> to_hsv() const
|
||||
std::array<double, 3> to_hsv() const
|
||||
{
|
||||
double r = (double)(m_data[0]) / 255.;
|
||||
double g = (double)(m_data[1]) / 255.;
|
||||
|
|
|
|||
|
|
@ -9,8 +9,6 @@
|
|||
#include <CGAL/Simple_cartesian.h>
|
||||
#include <CGAL/Exact_predicates_inexact_constructions_kernel.h>
|
||||
|
||||
#include <boost/foreach.hpp>
|
||||
|
||||
#include <vector>
|
||||
|
||||
typedef CGAL::Exact_predicates_inexact_constructions_kernel Kernel;
|
||||
|
|
|
|||
|
|
@ -11,8 +11,6 @@
|
|||
#include <CGAL/Exact_predicates_inexact_constructions_kernel.h>
|
||||
#include <CGAL/Simple_cartesian.h>
|
||||
|
||||
#include <boost/foreach.hpp>
|
||||
|
||||
#include <vector>
|
||||
|
||||
typedef CGAL::Exact_predicates_inexact_constructions_kernel Kernel;
|
||||
|
|
|
|||
|
|
@ -4,7 +4,6 @@
|
|||
#include <CGAL/Polygon_mesh_processing/triangulate_faces.h>
|
||||
#include <fstream>
|
||||
#include <string>
|
||||
#include <boost/foreach.hpp>
|
||||
#include "draw_surface_mesh_small_faces.h"
|
||||
|
||||
typedef CGAL::Simple_cartesian<double> K;
|
||||
|
|
@ -26,7 +25,7 @@ int main(int argc, char* argv[])
|
|||
boost::tie(faces_size, created)=sm.add_property_map<face_descriptor, FT>("f:size",0.);
|
||||
CGAL_assertion(created);
|
||||
|
||||
BOOST_FOREACH(face_descriptor fd, sm.faces())
|
||||
for(face_descriptor fd : sm.faces())
|
||||
{ faces_size[fd]=CGAL::Polygon_mesh_processing::face_area(fd, sm); }
|
||||
|
||||
draw_surface_mesh_with_small_faces(sm);
|
||||
|
|
|
|||
|
|
@ -280,7 +280,7 @@ void Surface_sweep_2<Vis>::_handle_overlaps_in_right_curves()
|
|||
Subcurve_iterator next_after = this->m_currentEvent->get_curve_after_on_right(it->first);
|
||||
for (std::size_t i=0; i<nbc; ++i)
|
||||
{
|
||||
_intersect(it->second[i], *cpp11::prev(next_after), this->m_currentEvent);
|
||||
_intersect(it->second[i], *std::prev(next_after), this->m_currentEvent);
|
||||
CGAL_assertion(it->second.size()==nbc); // make sure the container was not updated
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in New Issue