diff --git a/BGL/include/CGAL/boost/graph/IO/OFF.h b/BGL/include/CGAL/boost/graph/IO/OFF.h index 6f43f09ab27..35a9d57cb1e 100644 --- a/BGL/include/CGAL/boost/graph/IO/OFF.h +++ b/BGL/include/CGAL/boost/graph/IO/OFF.h @@ -87,6 +87,14 @@ bool read_OFF_BGL(std::istream& in, \cgalParamBegin{vertex_point_map} the property map with the points associated to the vertices of `g`. If this parameter is omitted, an internal property map for `CGAL::vertex_point_t` should be available in `FaceGraph`\cgalParamEnd + + \cgalParamBegin{vertex_normal_map} the property map with the normals associated to the vertices of `g`.\cgalParamEnd + + \cgalParamBegin{vertex_color_map} the property map with the colors associated to the vertices of `g`.\cgalParamEnd + + \cgalParamBegin{vertex_texture_map} the property map with the textures associated to the vertices of `g`.\cgalParamEnd + + \cgalParamBegin{face_color_map} the property map with the colors associated to the faces of `g`.\cgalParamEnd \cgalNamedParamsEnd \pre The data must represent a 2-manifold @@ -111,6 +119,14 @@ bool read_OFF(std::istream& in, FaceGraph& g, const CGAL_BGL_NP_CLASS& np) \cgalParamBegin{vertex_point_map} the property map with the points associated to the vertices of `g`. If this parameter is omitted, an internal property map for `CGAL::vertex_point_t` should be available in `FaceGraph`\cgalParamEnd + + \cgalParamBegin{vertex_normal_map} the property map with the normals associated to the vertices of `g`.\cgalParamEnd + + \cgalParamBegin{vertex_color_map} the property map with the colors associated to the vertices of `g`.\cgalParamEnd + + \cgalParamBegin{vertex_texture_map} the property map with the textures associated to the vertices of `g`.\cgalParamEnd + + \cgalParamBegin{face_color_map} the property map with the colors associated to the faces of `g`.\cgalParamEnd \cgalNamedParamsEnd \pre The data must represent a 2-manifold @@ -172,9 +188,16 @@ bool write_OFF_BGL(std::ostream& os, \cgalNamedParamsBegin \cgalParamBegin{vertex_point_map} the property map with the points associated to the vertices of `g`. If this parameter is omitted, an internal property map for - `CGAL::vertex_point_t` should be available in `FaceGraph` - \cgalParamEnd - \cgalNamedParamsEnd + `CGAL::vertex_point_t` should be available in `FaceGraph`\cgalParamEnd + + \cgalParamBegin{vertex_normal_map} the property map with the normals associated to the vertices of `g`.\cgalParamEnd + + \cgalParamBegin{vertex_color_map} the property map with the colors associated to the vertices of `g`.\cgalParamEnd + + \cgalParamBegin{vertex_texture_map} the property map with the textures associated to the vertices of `g`.\cgalParamEnd + + \cgalParamBegin{face_color_map} the property map with the colors associated to the faces of `g`.\cgalParamEnd + \cgalNamedParamsEnd \sa Overloads of this function for specific models of the concept `FaceGraph`. @@ -194,9 +217,16 @@ bool write_OFF(std::ostream& os, const FaceGraph& g, const CGAL_BGL_NP_CLASS& np \cgalNamedParamsBegin \cgalParamBegin{vertex_point_map} the property map with the points associated to the vertices of `g`. If this parameter is omitted, an internal property map for - `CGAL::vertex_point_t` should be available in `FaceGraph` - \cgalParamEnd - \cgalNamedParamsEnd + `CGAL::vertex_point_t` should be available in `FaceGraph`\cgalParamEnd + + \cgalParamBegin{vertex_normal_map} the property map with the normals associated to the vertices of `g`.\cgalParamEnd + + \cgalParamBegin{vertex_color_map} the property map with the colors associated to the vertices of `g`.\cgalParamEnd + + \cgalParamBegin{vertex_texture_map} the property map with the textures associated to the vertices of `g`.\cgalParamEnd + + \cgalParamBegin{face_color_map} the property map with the colors associated to the faces of `g`.\cgalParamEnd + \cgalNamedParamsEnd \sa Overloads of this function for specific models of the concept `FaceGraph`. diff --git a/BGL/test/BGL/test_bgl_read_write.cpp b/BGL/test/BGL/test_bgl_read_write.cpp index 050dde0b74a..fa59f5ab624 100644 --- a/BGL/test/BGL/test_bgl_read_write.cpp +++ b/BGL/test/BGL/test_bgl_read_write.cpp @@ -54,6 +54,15 @@ void test_bgl_read_write(const char* filename) CGAL::write_OFF(std::cout, sm); } +void test_bgl_soup_off(const char* filename) +{ + std::vector points; + std::vector > polygons; + std::ifstream in(filename); + CGAL::read_OFF(in,points, polygons); + CGAL::write_OFF(std::cout, points, polygons); +} + #ifdef CGAL_USE_VTK template bool test_bgl_vtp(bool binary = false) @@ -386,6 +395,7 @@ int main(int argc, char** argv) test_bgl_read_write(filename); test_bgl_read_write(filename); test_bgl_read_write(filename); + test_bgl_soup_off(filename); #ifdef CGAL_USE_OPENMESH test_bgl_read_write(filename); #endif diff --git a/Stream_support/include/CGAL/IO/Generic_writer.h b/Stream_support/include/CGAL/IO/Generic_writer.h index 3412143f842..ae38bc4985e 100644 --- a/Stream_support/include/CGAL/IO/Generic_writer.h +++ b/Stream_support/include/CGAL/IO/Generic_writer.h @@ -3,14 +3,14 @@ // ETH Zurich (Switzerland), // INRIA Sophia-Antipolis (France), // Max-Planck-Institute Saarbruecken (Germany), -// and Tel-Aviv University (Israel). All rights reserved. +// and Tel-Aviv University (Israel). All rights reserved. // // This file is part of CGAL (www.cgal.org) // // $URL$ // $Id$ // SPDX-License-Identifier: LGPL-3.0-or-later OR LicenseRef-Commercial -// +// // // Author(s) : Lutz Kettner @@ -53,7 +53,7 @@ public: m_writer.write_facet_header(); for(std::size_t i=0, end=polygons.size(); i @@ -181,6 +191,16 @@ bool read_OFF(std::istream& is, * * reads the content of the file `fname` into `points` and `polygons`, in the OFF format. * + * * \cgalNamedParamsBegin + \cgalParamBegin{vertex_normal_map} the property map with the normals associated to the vertices of `g`.\cgalParamEnd + + \cgalParamBegin{vertex_color_map} the property map with the colors associated to the vertices of `g`.\cgalParamEnd + + \cgalParamBegin{vertex_texture_map} the property map with the textures associated to the vertices of `g`.\cgalParamEnd + + \cgalParamBegin{face_color_map} the property map with the colors associated to the faces of `g`.\cgalParamEnd + \cgalNamedParamsEnd + * * \see \ref IOStreamOFF */ template @@ -232,10 +252,10 @@ template writer(os); - return writer(points, polygons, np); + return writer(points, polygons); } template