diff --git a/Mesh_3/include/CGAL/IO/File_tetgen.h b/Mesh_3/include/CGAL/IO/File_tetgen.h index 39e13ab7768..0eca7bdb760 100644 --- a/Mesh_3/include/CGAL/IO/File_tetgen.h +++ b/Mesh_3/include/CGAL/IO/File_tetgen.h @@ -17,10 +17,11 @@ #include #include +#include +#include #include #include -#include namespace CGAL { diff --git a/Point_set_3/examples/Point_set_3/point_set_advanced.cpp b/Point_set_3/examples/Point_set_3/point_set_advanced.cpp index 8b30e2bbbaa..795cc43f9f8 100644 --- a/Point_set_3/examples/Point_set_3/point_set_advanced.cpp +++ b/Point_set_3/examples/Point_set_3/point_set_advanced.cpp @@ -1,6 +1,7 @@ #include #include +#include #include #include @@ -18,10 +19,11 @@ int main (int argc, char** argv) Point_set point_set; point_set.add_normal_map(); + // Reading input in OFF format - if(!CGAL::read_point_set(filename, point_set.index_back_inserter(), - CGAL::parameters::point_map(point_set.point_push_map()) - .normal_map(point_set.normal_push_map()))) + if(!CGAL::read_points(filename, point_set.index_back_inserter(), + CGAL::parameters::point_map(point_set.point_push_map()) + .normal_map(point_set.normal_push_map()))) { std::cerr << "Can't read input file " << std::endl; return EXIT_FAILURE; diff --git a/Stream_support/include/CGAL/IO/OBJ/File_writer_wavefront.h b/Stream_support/include/CGAL/IO/OBJ/File_writer_wavefront.h index a9fbffc5bbb..c2964a683e3 100644 --- a/Stream_support/include/CGAL/IO/OBJ/File_writer_wavefront.h +++ b/Stream_support/include/CGAL/IO/OBJ/File_writer_wavefront.h @@ -17,8 +17,9 @@ #ifndef CGAL_IO_OBJ_FILE_WRITER_WAVEFRONT_H #define CGAL_IO_OBJ_FILE_WRITER_WAVEFRONT_H -#include +#include +#include #include namespace CGAL { diff --git a/Stream_support/include/CGAL/IO/OFF.h b/Stream_support/include/CGAL/IO/OFF.h index f8c9bfb66ce..16cabfba1dc 100644 --- a/Stream_support/include/CGAL/IO/OFF.h +++ b/Stream_support/include/CGAL/IO/OFF.h @@ -11,6 +11,7 @@ #ifndef CGAL_IO_OFF_H #define CGAL_IO_OFF_H +#include #include #include #include diff --git a/Stream_support/include/CGAL/IO/OFF/Scanner_OFF.h b/Stream_support/include/CGAL/IO/OFF/Scanner_OFF.h index e828f74a431..a7a9617b850 100644 --- a/Stream_support/include/CGAL/IO/OFF/Scanner_OFF.h +++ b/Stream_support/include/CGAL/IO/OFF/Scanner_OFF.h @@ -19,11 +19,12 @@ #define CGAL_IO_OFF_SCANNER_OFF_H 1 #include +#include + #include #include #include #include -#include namespace CGAL { diff --git a/Surface_mesh_deformation/examples/Surface_mesh_deformation/k_ring_roi_translate_rotate_Surface_mesh.cpp b/Surface_mesh_deformation/examples/Surface_mesh_deformation/k_ring_roi_translate_rotate_Surface_mesh.cpp index ca1ced7ea2a..a881936c32b 100644 --- a/Surface_mesh_deformation/examples/Surface_mesh_deformation/k_ring_roi_translate_rotate_Surface_mesh.cpp +++ b/Surface_mesh_deformation/examples/Surface_mesh_deformation/k_ring_roi_translate_rotate_Surface_mesh.cpp @@ -7,16 +7,15 @@ typedef CGAL::Simple_cartesian Kernel; -typedef Kernel::Point_3 Point_3; -typedef CGAL::Surface_mesh Mesh; +typedef Kernel::Point_3 Point_3; +typedef CGAL::Surface_mesh Mesh; -typedef boost::graph_traits::vertex_descriptor vertex_descriptor; -typedef boost::graph_traits::vertex_iterator vertex_iterator; -typedef boost::graph_traits::halfedge_descriptor halfedge_descriptor; -typedef boost::graph_traits::edge_descriptor edge_descriptor; +typedef boost::graph_traits::vertex_descriptor vertex_descriptor; +typedef boost::graph_traits::vertex_iterator vertex_iterator; +typedef boost::graph_traits::halfedge_descriptor halfedge_descriptor; +typedef boost::graph_traits::edge_descriptor edge_descriptor; - -typedef Eigen::Vector3d Vector3d; +typedef Eigen::Vector3d Vector3d; typedef CGAL::Surface_mesh_deformation Surface_mesh_deformation; @@ -45,12 +44,13 @@ std::vector extract_k_ring(const Mesh &P, vertex_descriptor v return Q; } -int main() +int main(int argc, char** argv) { - Mesh mesh; - std::ifstream input("data/plane.off"); + const char* filename = (argc>1) ? argv[1] : "data/plane.off"; - if ( !input || !(input >> mesh) || mesh.is_empty() ) { + Mesh mesh; + if(!CGAL::read_polygon_mesh(filename, mesh)) + { std::cerr<< "Cannot open data/plane.off"; return 1; }