// Copyright (c) 2020 Geometry Factory // All rights reserved. // // This file is part of CGAL (www.cgal.org). // // $URL$ // $Id$ // SPDX-License-Identifier: GPL-3.0-or-later OR LicenseRef-Commercial // // Author(s) : Maxime Gimeno #ifndef CGAL_READ_POINTS_H #define CGAL_READ_POINTS_H #ifdef CGAL_LINKED_WITH_LASLIB #include #endif #include #include #include namespace CGAL { template bool read_points(const std::string& fname, OutputIterator output, const NamedParameters& np) { if (fname.find(".xyz") != std::string::npos) { return read_XYZ(fname, output, np); } if (fname.find(".off") != std::string::npos) { return read_OFF(fname, output, np); } if (fname.find(".ply") != std::string::npos) { return read_PLY(fname, output, np); } #ifdef CGAL_LINKED_WITH_LASLIB if (fname.find(".las") != std::string::npos) { return read_LASfname, output, np); } #endif return false; } //variant with default OutputIteratorType template bool read_points(const std::string& fname, OutputIterator output, const NamedParameters& np) { return read_points::type>(fname, output, np); } //variant with default np template bool read_points(const std::string& fname, OutputIterator output) { return read_points(fname, output, parameters::all_default()); } //variant with all default template bool read_points(const std::string& fname, OutputIterator output) { return read_points::type>(fname, output, parameters::all_default()); } //variants with char* template bool read_points(const char* fname, OutputIterator output, const NamedParameters& np) { return read_points(std::string(fname), output, np); } template bool read_points(const char* fname, OutputIterator output, const NamedParameters& np) { return read_points::type>(fname, output, np); } template bool read_points(const char* fname, OutputIterator output) { return read_points(fname, output, parameters::all_default()); } template bool read_points(const char* fname, OutputIterator output) { return read_points::type>(fname, output, parameters::all_default()); } }//end CGAL #endif // CGAL_READ_POINTS_H