mirror of https://github.com/CGAL/cgal
CGAL: Remove some deprecated functions (#9023)
## Summary of Changes I start removing some IO functions which are annoying to find in the search box. More to come. - [x] `CGAL::write_off()` - [x] `CGAL::write_wrl()` - [x] `CGAL::write_vtk()` ### Todo - [ ] remove the test cases. ## Release Management * Affected package(s): BGL, Surface_mesh, Point_set_processing * License and copyright ownership: unchanged
This commit is contained in:
commit
b2eb8d9331
|
|
@ -509,8 +509,7 @@ the requirement for traversal of all faces in a graph.
|
|||
/// I/O Functions for the \ref IOStream3MF
|
||||
/// \ingroup PkgBGLIOFct
|
||||
|
||||
/// \defgroup PkgBGLIOFctDeprecated I/O Functions (Deprecated)
|
||||
/// \ingroup PkgBGLIOFct
|
||||
|
||||
|
||||
/*!
|
||||
\addtogroup PkgBGLPropertiesDynamic
|
||||
|
|
|
|||
|
|
@ -247,36 +247,7 @@ bool read_OFF(const std::string& fname,
|
|||
|
||||
} // namespace IO
|
||||
|
||||
#ifndef CGAL_NO_DEPRECATED_CODE
|
||||
|
||||
/*!
|
||||
\ingroup PkgBGLIOFctDeprecated
|
||||
|
||||
\deprecated This function is deprecated since \cgal 5.3, `CGAL::IO::read_OFF()` should be used instead.
|
||||
*/
|
||||
template <typename Graph, typename CGAL_NP_TEMPLATE_PARAMETERS>
|
||||
CGAL_DEPRECATED bool read_off(std::istream& is, Graph& g, const CGAL_NP_CLASS& np = parameters::default_values())
|
||||
{
|
||||
return IO::read_OFF(is, g, np);
|
||||
}
|
||||
|
||||
/*!
|
||||
\ingroup PkgBGLIOFctDeprecated
|
||||
|
||||
\deprecated This function is deprecated since \cgal 5.3, `CGAL::IO::read_OFF()` should be used instead.
|
||||
*/
|
||||
template <typename Graph, typename CGAL_NP_TEMPLATE_PARAMETERS>
|
||||
CGAL_DEPRECATED bool read_off(const char* fname, Graph& g, const CGAL_NP_CLASS& np = parameters::default_values())
|
||||
{
|
||||
return IO::read_OFF(fname, g, np);
|
||||
}
|
||||
template <typename Graph>
|
||||
CGAL_DEPRECATED bool read_off(const std::string& fname, Graph& g)
|
||||
{
|
||||
return read_off(fname.c_str(), g, parameters::default_values());
|
||||
}
|
||||
|
||||
#endif // CGAL_NO_DEPRECATED_CODE
|
||||
|
||||
////////////////////////////////////////////////////////////////////////////////////////////////////
|
||||
////////////////////////////////////////////////////////////////////////////////////////////////////
|
||||
|
|
@ -453,31 +424,6 @@ bool write_OFF(const std::string& fname,
|
|||
|
||||
} // namespace IO
|
||||
|
||||
#ifndef CGAL_NO_DEPRECATED_CODE
|
||||
|
||||
/*!
|
||||
\ingroup PkgBGLIOFctDeprecated
|
||||
|
||||
\deprecated This function is deprecated since \cgal 5.3, `CGAL::IO::write_OFF()` should be used instead.
|
||||
*/
|
||||
template <typename Graph, typename CGAL_NP_TEMPLATE_PARAMETERS>
|
||||
CGAL_DEPRECATED bool write_off(std::ostream& os, const Graph& g, const CGAL_NP_CLASS& np = parameters::default_values())
|
||||
{
|
||||
return IO::write_OFF(os, g, np);
|
||||
}
|
||||
|
||||
/*!
|
||||
\ingroup PkgBGLIOFctDeprecated
|
||||
|
||||
\deprecated This function is deprecated since \cgal 5.3, `CGAL::IO::write_OFF()` should be used instead.
|
||||
*/
|
||||
template <typename Graph, typename CGAL_NP_TEMPLATE_PARAMETERS>
|
||||
CGAL_DEPRECATED bool write_off(const char* fname, const Graph& g, const CGAL_NP_CLASS& np = parameters::default_values())
|
||||
{
|
||||
return IO::write_OFF(fname, g, np);
|
||||
}
|
||||
|
||||
#endif // CGAL_NO_DEPRECATED_CODE
|
||||
|
||||
} // namespace CGAL
|
||||
|
||||
|
|
|
|||
|
|
@ -529,20 +529,7 @@ bool write_VTP(const std::string& fname, const Graph& g, const CGAL_NP_CLASS& np
|
|||
|
||||
} // namespace IO
|
||||
|
||||
#ifndef CGAL_NO_DEPRECATED_CODE
|
||||
|
||||
/*!
|
||||
\ingroup PkgBGLIOFctDeprecated
|
||||
|
||||
\deprecated This function is deprecated since \cgal 5.3, `CGAL::IO::write_VTP()` should be used instead.
|
||||
*/
|
||||
template <typename Graph, typename CGAL_NP_TEMPLATE_PARAMETERS>
|
||||
CGAL_DEPRECATED bool write_vtp(std::ostream& os, const Graph& g, const CGAL_NP_CLASS& np = parameters::default_values())
|
||||
{
|
||||
return IO::write_VTP(os, g, np);
|
||||
}
|
||||
|
||||
#endif // CGAL_NO_DEPRECATED_CODE
|
||||
|
||||
} // namespace CGAL
|
||||
|
||||
|
|
|
|||
|
|
@ -111,20 +111,7 @@ bool write_WRL(const std::string& fname, const Graph& g, const CGAL_NP_CLASS& np
|
|||
|
||||
} // namespace IO
|
||||
|
||||
#ifndef CGAL_NO_DEPRECATED_CODE
|
||||
|
||||
/*!
|
||||
\ingroup PkgBGLIOFctDeprecated
|
||||
|
||||
\deprecated This function is deprecated since \cgal 5.3, `CGAL::IO::write_WRL()` should be used instead.
|
||||
*/
|
||||
template <typename Graph, typename CGAL_NP_TEMPLATE_PARAMETERS>
|
||||
CGAL_DEPRECATED bool write_wrl(std::ostream& os, const Graph& g, const CGAL_NP_CLASS& np = parameters::default_values())
|
||||
{
|
||||
return IO::write_WRL(os, g, np);
|
||||
}
|
||||
|
||||
#endif // CGAL_NO_DEPRECATED_CODE
|
||||
|
||||
} // namespace CGAL
|
||||
|
||||
|
|
|
|||
|
|
@ -38,7 +38,6 @@ create_single_source_cgal_program("test_graph_traits.cpp")
|
|||
create_single_source_cgal_program("test_Properties.cpp")
|
||||
create_single_source_cgal_program("bench_read_from_stream_vs_add_face_and_add_faces.cpp")
|
||||
create_single_source_cgal_program("graph_traits_inheritance.cpp" )
|
||||
create_single_source_cgal_program("test_deprecated_io.cpp")
|
||||
|
||||
find_package(OpenMesh QUIET)
|
||||
if(OpenMesh_FOUND)
|
||||
|
|
@ -69,8 +68,6 @@ if (VTK_FOUND AND VTK_LIBRARIES)
|
|||
message(STATUS "VTK ${VTK_VERSION} found ${VTK_LIBRARIES}")
|
||||
target_link_libraries(test_bgl_read_write PRIVATE ${VTK_LIBRARIES})
|
||||
target_compile_definitions(test_bgl_read_write PRIVATE -DCGAL_USE_VTK -DNOMINMAX)
|
||||
target_link_libraries(test_deprecated_io PRIVATE ${VTK_LIBRARIES})
|
||||
target_compile_definitions(test_deprecated_io PRIVATE -DCGAL_USE_VTK -DNOMINMAX)
|
||||
else()
|
||||
message(STATUS "Tests that use VTK will not be compiled.")
|
||||
endif() #VTK_FOUND
|
||||
|
|
|
|||
|
|
@ -1,59 +0,0 @@
|
|||
#include <CGAL/Installation/internal/disable_deprecation_warnings_and_errors.h>
|
||||
|
||||
#include <fstream>
|
||||
#include <iostream>
|
||||
#include <CGAL/Surface_mesh.h>
|
||||
#include <CGAL/Simple_cartesian.h>
|
||||
#include <CGAL/boost/graph/generators.h>
|
||||
|
||||
#include <CGAL/boost/graph/IO/OFF.h>
|
||||
#include <CGAL/boost/graph/IO/VTK.h>
|
||||
#include <CGAL/boost/graph/IO/WRL.h>
|
||||
|
||||
|
||||
typedef CGAL::Simple_cartesian<double> Kernel;
|
||||
typedef Kernel::Point_3 Point_3;
|
||||
typedef CGAL::Surface_mesh<Point_3> SM;
|
||||
|
||||
int main()
|
||||
{
|
||||
// OFF
|
||||
SM sm_in, sm_out;
|
||||
Point_3 p0(0,0,0), p1(1,0,0), p2(0,1,0);
|
||||
CGAL::make_triangle(p0, p1, p2, sm_out);
|
||||
bool ok = CGAL::write_off("tmp_deprecated.off", sm_out);
|
||||
assert(ok);
|
||||
ok = CGAL::read_off("tmp_deprecated.off", sm_in);
|
||||
assert(ok);
|
||||
assert(num_vertices(sm_in) == 3 && num_faces(sm_in) == 1);
|
||||
sm_in.clear();
|
||||
|
||||
std::ofstream os("tmp_deprecated.off");
|
||||
ok = CGAL::write_off(os, sm_out);
|
||||
assert(ok);
|
||||
os.close();
|
||||
std::ifstream is("tmp_deprecated.off");
|
||||
ok = CGAL::read_off(is, sm_in);
|
||||
assert(ok);
|
||||
assert(num_vertices(sm_in) == 3 && num_faces(sm_in) == 1);
|
||||
is.close();
|
||||
sm_in.clear();
|
||||
#ifdef CGAL_USE_VTK
|
||||
//vtk
|
||||
os.open("tmp_deprecated.vtp");
|
||||
ok = CGAL::write_vtp(os, sm_out);
|
||||
assert(ok);
|
||||
os.close();
|
||||
|
||||
ok = CGAL::IO::read_VTP("tmp_deprecated.vtp", sm_in);
|
||||
assert(ok);
|
||||
assert(num_vertices(sm_in) == 3 && num_faces(sm_in) == 1);
|
||||
sm_in.clear();
|
||||
#endif
|
||||
//wrl
|
||||
os.open("tmp_deprecated.wrl");
|
||||
ok = CGAL::write_wrl(os, sm_out);
|
||||
assert(ok);
|
||||
os.close();
|
||||
return EXIT_SUCCESS;
|
||||
}
|
||||
|
|
@ -547,91 +547,6 @@ bool read_LAS(const std::string& fname, OutputIterator output, const CGAL_NP_CLA
|
|||
|
||||
} // namespace IO
|
||||
|
||||
#ifndef CGAL_NO_DEPRECATED_CODE
|
||||
|
||||
/// \cond SKIP_IN_MANUAL
|
||||
|
||||
using IO::make_las_point_reader;
|
||||
namespace LAS_property = IO::LAS_property;
|
||||
|
||||
template <typename OutputIteratorValueType,
|
||||
typename OutputIterator,
|
||||
typename PointMap >
|
||||
CGAL_DEPRECATED_MSG("you are using the deprecated V1 API of CGAL::read_las_points(), please update your code")
|
||||
bool read_las_points(std::istream& is, ///< input stream.
|
||||
OutputIterator output, ///< output iterator over points.
|
||||
PointMap point_map) ///< property map: value_type of OutputIterator -> Point_3.
|
||||
{
|
||||
return read_las_points<OutputIteratorValueType>(is, output, CGAL::parameters::point_map (point_map));
|
||||
}
|
||||
|
||||
template <typename OutputIterator,
|
||||
typename PointMap >
|
||||
CGAL_DEPRECATED_MSG("you are using the deprecated V1 API of CGAL::read_las_points(), please update your code")
|
||||
bool read_las_points(std::istream& is, ///< input stream.
|
||||
OutputIterator output, ///< output iterator over points.
|
||||
PointMap point_map) ///< property map: value_type of OutputIterator -> Point_3.
|
||||
{
|
||||
return read_las_points<typename value_type_traits<OutputIterator>::type>(is, output,
|
||||
CGAL::parameters::point_map(point_map));
|
||||
}
|
||||
|
||||
/// \endcond
|
||||
|
||||
|
||||
template <typename OutputIteratorValueType,
|
||||
typename OutputIterator,
|
||||
typename ... PropertyHandler>
|
||||
CGAL_DEPRECATED bool read_las_points_with_properties(std::istream& is,
|
||||
OutputIterator output,
|
||||
PropertyHandler&& ... properties)
|
||||
{
|
||||
return IO::read_LAS_with_properties(is, output, std::forward<PropertyHandler>(properties)...);
|
||||
}
|
||||
|
||||
/// \cond SKIP_IN_MANUAL
|
||||
|
||||
template <typename OutputIterator,
|
||||
typename ... PropertyHandler>
|
||||
CGAL_DEPRECATED bool read_las_points_with_properties(std::istream& is,
|
||||
OutputIterator output,
|
||||
PropertyHandler&& ... properties)
|
||||
{
|
||||
return IO::read_LAS_with_properties<typename value_type_traits<OutputIterator>::type>(is, output, std::forward<PropertyHandler>(properties)...);
|
||||
}
|
||||
|
||||
/// \endcond
|
||||
|
||||
template <typename OutputIteratorValueType,
|
||||
typename OutputIterator,
|
||||
typename CGAL_NP_TEMPLATE_PARAMETERS>
|
||||
CGAL_DEPRECATED bool read_las_points(std::istream& is,
|
||||
OutputIterator output,
|
||||
const CGAL_NP_CLASS& np = parameters::default_values())
|
||||
{
|
||||
using parameters::choose_parameter;
|
||||
using parameters::get_parameter;
|
||||
|
||||
typename CGAL::GetPointMap<Point_set_processing_3::Fake_point_range<OutputIteratorValueType>, CGAL_NP_CLASS>::type point_map =
|
||||
choose_parameter<typename CGAL::GetPointMap<Point_set_processing_3::Fake_point_range<OutputIteratorValueType>, CGAL_NP_CLASS>::type>(get_parameter(np, internal_np::point_map));
|
||||
|
||||
return IO::read_LAS(is, output, make_las_point_reader(point_map));
|
||||
}
|
||||
|
||||
/// \cond SKIP_IN_MANUAL
|
||||
|
||||
|
||||
// variant with default output iterator value type
|
||||
template <typename OutputIterator, typename CGAL_NP_TEMPLATE_PARAMETERS>
|
||||
CGAL_DEPRECATED bool read_las_points(std::istream& is, OutputIterator output, const CGAL_NP_CLASS& np = parameters::default_values())
|
||||
{
|
||||
return IO::read_LAS<typename value_type_traits<OutputIterator>::type>(is, output, np);
|
||||
}
|
||||
|
||||
/// \endcond
|
||||
|
||||
#endif // CGAL_NO_DEPRECATED_CODE
|
||||
|
||||
} // namespace CGAL
|
||||
|
||||
#endif // CGAL_POINT_SET_PROCESSING_READ_LAS_POINTS_H
|
||||
|
|
|
|||
|
|
@ -271,174 +271,6 @@ bool read_OFF(const std::string& fname, OutputIterator output, const CGAL_NP_CLA
|
|||
|
||||
} // namespace IO
|
||||
|
||||
#ifndef CGAL_NO_DEPRECATED_CODE
|
||||
|
||||
/// \cond SKIP_IN_MANUAL
|
||||
|
||||
template <typename OutputIteratorValueType,
|
||||
typename OutputIterator,
|
||||
typename PointPMap,
|
||||
typename NormalPMap,
|
||||
typename Kernel>
|
||||
CGAL_DEPRECATED_MSG("you are using the deprecated V1 API of CGAL::read_off_points_and_normals(), please update your code")
|
||||
bool read_off_points_and_normals(std::istream& is, ///< input stream.
|
||||
OutputIterator output, ///< output iterator over points.
|
||||
PointPMap point_map, ///< property map: value_type of OutputIterator -> Point_3.
|
||||
NormalPMap normal_map, ///< property map: value_type of OutputIterator -> Vector_3.
|
||||
const Kernel& /*kernel*/) ///< geometric traits.
|
||||
{
|
||||
return IO::read_OFF<OutputIteratorValueType>(is, output,
|
||||
parameters::point_map(point_map)
|
||||
.normal_map(normal_map)
|
||||
.geom_traits(Kernel()));
|
||||
}
|
||||
|
||||
template <typename OutputIterator,
|
||||
typename PointPMap,
|
||||
typename NormalPMap,
|
||||
typename Kernel>
|
||||
CGAL_DEPRECATED_MSG("you are using the deprecated V1 API of CGAL::read_off_points_and_normals(), please update your code")
|
||||
bool read_off_points_and_normals(std::istream& is, ///< input stream.
|
||||
OutputIterator output, ///< output iterator over points.
|
||||
PointPMap point_map, ///< property map: value_type of OutputIterator -> Point_3.
|
||||
NormalPMap normal_map, ///< property map: value_type of OutputIterator -> Vector_3.
|
||||
const Kernel& kernel) ///< geometric traits.
|
||||
{
|
||||
return IO::read_OFF<typename value_type_traits<OutputIterator>::type>(is, output,
|
||||
parameters::point_map(point_map)
|
||||
.normal_map(normal_map)
|
||||
.geom_traits(kernel));
|
||||
}
|
||||
|
||||
template <typename OutputIteratorValueType,
|
||||
typename OutputIterator,
|
||||
typename PointPMap,
|
||||
typename NormalPMap>
|
||||
CGAL_DEPRECATED_MSG("you are using the deprecated V1 API of CGAL::read_off_points_and_normals(), please update your code")
|
||||
bool read_off_points_and_normals(std::istream& is, ///< input stream.
|
||||
OutputIterator output, ///< output iterator over points.
|
||||
PointPMap point_map, ///< property map: value_type of OutputIterator -> Point_3.
|
||||
NormalPMap normal_map) ///< property map: value_type of OutputIterator -> Vector_3.
|
||||
{
|
||||
return IO::read_OFF<OutputIteratorValueType>(is, output, parameters::point_map(point_map)
|
||||
.normal_map(normal_map));
|
||||
}
|
||||
|
||||
template <typename OutputIterator,
|
||||
typename PointPMap,
|
||||
typename NormalPMap>
|
||||
CGAL_DEPRECATED_MSG("you are using the deprecated V1 API of CGAL::read_off_points_and_normals(), please update your code")
|
||||
bool read_off_points_and_normals(std::istream& is, ///< input stream.
|
||||
OutputIterator output, ///< output iterator over points.
|
||||
PointPMap point_map, ///< property map: value_type of OutputIterator -> Point_3.
|
||||
NormalPMap normal_map) ///< property map: value_type of OutputIterator -> Vector_3.
|
||||
{
|
||||
return IO::read_OFF<typename value_type_traits<OutputIterator>::type>(is, output,
|
||||
parameters::point_map(point_map)
|
||||
.normal_map(normal_map));
|
||||
}
|
||||
|
||||
template <typename OutputIteratorValueType,
|
||||
typename OutputIterator,
|
||||
typename NormalPMap>
|
||||
CGAL_DEPRECATED_MSG("you are using the deprecated V1 API of CGAL::read_off_points_and_normals(), please update your code")
|
||||
bool read_off_points_and_normals(std::istream& is, ///< input stream.
|
||||
OutputIterator output, ///< output iterator over points.
|
||||
NormalPMap normal_map) ///< property map: value_type of OutputIterator -> Vector_3.
|
||||
{
|
||||
return IO::read_OFF<OutputIteratorValueType>(is, output, parameters::normal_map(normal_map));
|
||||
}
|
||||
|
||||
template <typename OutputIterator,
|
||||
typename NormalPMap>
|
||||
CGAL_DEPRECATED_MSG("you are using the deprecated V1 API of CGAL::read_off_points_and_normals(), please update your code")
|
||||
bool read_off_points_and_normals(std::istream& is, ///< input stream.
|
||||
OutputIterator output, ///< output iterator over points.
|
||||
NormalPMap normal_map) ///< property map: value_type of OutputIterator -> Vector_3.
|
||||
{
|
||||
return IO::read_OFF<typename value_type_traits<OutputIterator>::type>(is, output, parameters::normal_map(normal_map));
|
||||
}
|
||||
|
||||
template <typename OutputIteratorValueType,
|
||||
typename OutputIterator,
|
||||
typename PointPMap,
|
||||
typename Kernel
|
||||
>
|
||||
CGAL_DEPRECATED_MSG("you are using the deprecated V1 API of CGAL::read_off_points(), please update your code")
|
||||
bool read_off_points(std::istream& is, ///< input stream.
|
||||
OutputIterator output, ///< output iterator over points.
|
||||
PointPMap point_map, ///< property map: value_type of OutputIterator -> Point_3.
|
||||
const Kernel& kernel) ///< geometric traits.
|
||||
{
|
||||
return read_off_points<OutputIteratorValueType>(is, output, parameters::point_map(point_map)
|
||||
.geom_traits(kernel));
|
||||
}
|
||||
|
||||
template <typename OutputIterator,
|
||||
typename PointPMap,
|
||||
typename Kernel>
|
||||
CGAL_DEPRECATED_MSG("you are using the deprecated V1 API of CGAL::read_off_points(), please update your code")
|
||||
bool read_off_points(std::istream& is, ///< input stream.
|
||||
OutputIterator output, ///< output iterator over points.
|
||||
PointPMap point_map, ///< property map: value_type of OutputIterator -> Point_3.
|
||||
const Kernel& kernel) ///< geometric traits.
|
||||
{
|
||||
return read_off_points<typename value_type_traits<OutputIterator>::type>(is, output,
|
||||
parameters::point_map(point_map)
|
||||
.geom_traits (kernel));
|
||||
}
|
||||
|
||||
template <typename OutputIteratorValueType,
|
||||
typename OutputIterator,
|
||||
typename PointPMap>
|
||||
CGAL_DEPRECATED_MSG("you are using the deprecated V1 API of CGAL::read_off_points(), please update your code")
|
||||
bool read_off_points(std::istream& is, ///< input stream.
|
||||
OutputIterator output, ///< output iterator over points.
|
||||
PointPMap point_map) ///< property map: value_type of OutputIterator -> Point_3.
|
||||
{
|
||||
return read_off_points<OutputIteratorValueType>(is, output, parameters::point_map (point_map));
|
||||
}
|
||||
|
||||
template <typename OutputIterator, typename PointPMap>
|
||||
CGAL_DEPRECATED_MSG("you are using the deprecated V1 API of CGAL::read_off_points(), please update your code")
|
||||
bool read_off_points(std::istream& is, ///< input stream.
|
||||
OutputIterator output, ///< output iterator over points.
|
||||
PointPMap point_map) ///< property map: value_type of OutputIterator -> Point_3.
|
||||
{
|
||||
return read_off_points<typename value_type_traits<OutputIterator>::type>(is, output, parameters::point_map(point_map));
|
||||
}
|
||||
|
||||
/// \endcond
|
||||
|
||||
template <typename OutputIteratorValueType,
|
||||
typename OutputIterator,
|
||||
typename CGAL_NP_TEMPLATE_PARAMETERS>
|
||||
CGAL_DEPRECATED bool read_off_points(std::istream& is,
|
||||
OutputIterator output,
|
||||
const CGAL_NP_CLASS& np = parameters::default_values())
|
||||
{
|
||||
return IO::read_OFF(is, output, np);
|
||||
}
|
||||
|
||||
/// \cond SKIP_IN_MANUAL
|
||||
|
||||
template <typename OutputIteratorValueType, typename OutputIterator>
|
||||
CGAL_DEPRECATED bool read_off_points(std::istream& is, OutputIterator output)
|
||||
{
|
||||
return IO::read_OFF(is, output);
|
||||
}
|
||||
|
||||
// variant with default output iterator value type
|
||||
template <typename OutputIterator, typename CGAL_NP_TEMPLATE_PARAMETERS>
|
||||
CGAL_DEPRECATED bool read_off_points(std::istream& is, OutputIterator output, const CGAL_NP_CLASS& np = parameters::default_values())
|
||||
{
|
||||
return IO::read_OFF(is, output, np);
|
||||
}
|
||||
|
||||
/// \endcond
|
||||
|
||||
#endif //CGAL_NO_DEPRECATED_CODE
|
||||
|
||||
} // namespace CGAL
|
||||
|
||||
#endif // CGAL_POINT_SET_PROCESSING_READ_OFF_POINTS_H
|
||||
|
|
|
|||
|
|
@ -358,114 +358,6 @@ bool read_PLY(const std::string& fname, OutputIterator output, const CGAL_NP_CLA
|
|||
|
||||
} // namespace IO
|
||||
|
||||
#ifndef CGAL_NO_DEPRECATED_CODE
|
||||
|
||||
/// \cond SKIP_IN_MANUAL
|
||||
|
||||
template <typename OutputIteratorValueType,
|
||||
typename OutputIterator,
|
||||
typename PointMap,
|
||||
typename NormalMap>
|
||||
CGAL_DEPRECATED_MSG("you are using the deprecated V1 API of CGAL::read_ply_points_and_normals(), please update your code")
|
||||
bool read_ply_points_and_normals(std::istream& is, ///< input stream.
|
||||
OutputIterator output, ///< output iterator over points.
|
||||
PointMap point_map, ///< property map: value_type of OutputIterator -> Point_3.
|
||||
NormalMap normal_map) ///< property map: value_type of OutputIterator -> Vector_3.
|
||||
{
|
||||
return IO::read_PLY<OutputIteratorValueType>(is, output, parameters::point_map(point_map)
|
||||
.normal_map(normal_map));
|
||||
}
|
||||
|
||||
template <typename OutputIterator,
|
||||
typename PointMap,
|
||||
typename NormalMap>
|
||||
CGAL_DEPRECATED_MSG("you are using the deprecated V1 API of CGAL::read_ply_points_and_normals(), please update your code")
|
||||
bool read_ply_points_and_normals(std::istream& is, ///< input stream.
|
||||
OutputIterator output, ///< output iterator over points.
|
||||
PointMap point_map, ///< property map: value_type of OutputIterator -> Point_3.
|
||||
NormalMap normal_map) ///< property map: value_type of OutputIterator -> Vector_3.
|
||||
{
|
||||
return IO::read_PLY<typename value_type_traits<OutputIterator>::type>(is, output, parameters::point_map(point_map)
|
||||
.normal_map(normal_map));
|
||||
}
|
||||
|
||||
template <typename OutputIteratorValueType,
|
||||
typename OutputIterator,
|
||||
typename NormalMap>
|
||||
CGAL_DEPRECATED_MSG("you are using the deprecated V1 API of CGAL::read_ply_points_and_normals(), please update your code")
|
||||
bool read_ply_points_and_normals(std::istream& is, ///< input stream.
|
||||
OutputIterator output, ///< output iterator over points.
|
||||
NormalMap normal_map) ///< property map: value_type of OutputIterator -> Vector_3.
|
||||
{
|
||||
return IO::read_PLY<OutputIteratorValueType>(is, output, parameters::normal_map(normal_map));
|
||||
}
|
||||
|
||||
template <typename OutputIterator, typename NormalMap>
|
||||
CGAL_DEPRECATED_MSG("you are using the deprecated V1 API of CGAL::read_ply_points_and_normals(), please update your code")
|
||||
bool read_ply_points_and_normals(std::istream& is, ///< input stream.
|
||||
OutputIterator output, ///< output iterator over points.
|
||||
NormalMap normal_map) ///< property map: value_type of OutputIterator -> Vector_3.
|
||||
{
|
||||
return IO::read_PLY<typename value_type_traits<OutputIterator>::type>(is, output, parameters::normal_map(normal_map));
|
||||
}
|
||||
|
||||
template <typename OutputIteratorValueType,
|
||||
typename OutputIterator,
|
||||
typename PointMap>
|
||||
CGAL_DEPRECATED_MSG("you are using the deprecated V1 API of CGAL::read_ply_points(), please update your code")
|
||||
bool read_ply_points(std::istream& is, ///< input stream.
|
||||
OutputIterator output, ///< output iterator over points.
|
||||
PointMap point_map) ///< property map: value_type of OutputIterator -> Point_3.
|
||||
{
|
||||
return IO::read_PLY<OutputIteratorValueType>(is, output, parameters::point_map(point_map));
|
||||
}
|
||||
|
||||
template <typename OutputIterator,
|
||||
typename PointMap>
|
||||
CGAL_DEPRECATED_MSG("you are using the deprecated V1 API of CGAL::read_ply_points(), please update your code")
|
||||
bool read_ply_points(std::istream& is, ///< input stream.
|
||||
OutputIterator output, ///< output iterator over points.
|
||||
PointMap point_map) ///< property map: value_type of OutputIterator -> Point_3.
|
||||
{
|
||||
return IO::read_PLY<typename value_type_traits<OutputIterator>::type>(is, output, parameters::point_map(point_map));
|
||||
}
|
||||
|
||||
/// \endcond
|
||||
|
||||
template <typename OutputIteratorValueType, typename OutputIterator, typename ... PropertyHandler>
|
||||
CGAL_DEPRECATED bool read_ply_points_with_properties(std::istream& is, OutputIterator output, PropertyHandler&& ... properties)
|
||||
{
|
||||
return IO::read_PLY_with_properties(is, output, std::forward<PropertyHandler>(properties)...);
|
||||
}
|
||||
|
||||
|
||||
template <typename OutputIteratorValueType, typename OutputIterator, typename CGAL_NP_TEMPLATE_PARAMETERS>
|
||||
CGAL_DEPRECATED bool read_ply_points(std::istream& is, OutputIterator output, const CGAL_NP_CLASS& np = parameters::default_values())
|
||||
{
|
||||
return IO::read_PLY(is, output, np);
|
||||
}
|
||||
|
||||
/// \cond SKIP_IN_MANUAL
|
||||
|
||||
template <typename OutputIterator,
|
||||
typename ... PropertyHandler>
|
||||
CGAL_DEPRECATED bool read_ply_points_with_properties(std::istream& is, OutputIterator output, PropertyHandler&& ... properties)
|
||||
{
|
||||
return IO::read_PLY_with_properties<typename value_type_traits<OutputIterator>::type>(is, output, std::forward<PropertyHandler>(properties)...);
|
||||
}
|
||||
|
||||
// variant with default output iterator value type
|
||||
template <typename OutputIterator,
|
||||
typename CGAL_NP_TEMPLATE_PARAMETERS>
|
||||
CGAL_DEPRECATED bool read_ply_points(std::istream& is, OutputIterator output, const CGAL_NP_CLASS& np = parameters::default_values())
|
||||
{
|
||||
return IO::read_PLY<typename value_type_traits<OutputIterator>::type>(is, output, np);
|
||||
}
|
||||
|
||||
/// \endcond
|
||||
|
||||
#endif // CGAL_NO_DEPRECATED_CODE
|
||||
|
||||
} // namespace CGAL
|
||||
|
||||
#undef TRY_TO_GENERATE_POINT_PROPERTY
|
||||
|
|
|
|||
|
|
@ -251,173 +251,6 @@ bool read_XYZ(const std::string& fname, OutputIterator output, const CGAL_NP_CLA
|
|||
|
||||
|
||||
|
||||
#ifndef CGAL_NO_DEPRECATED_CODE
|
||||
|
||||
/// \cond SKIP_IN_MANUAL
|
||||
|
||||
template <typename OutputIteratorValueType,
|
||||
typename OutputIterator,
|
||||
typename PointPMap,
|
||||
typename NormalPMap,
|
||||
typename Kernel>
|
||||
CGAL_DEPRECATED_MSG("you are using the deprecated V1 API of CGAL::read_xyz_points_and_normals(), please update your code")
|
||||
bool read_xyz_points_and_normals(std::istream& is, ///< input stream.
|
||||
OutputIterator output, ///< output iterator over points.
|
||||
PointPMap point_map, ///< property map: value_type of OutputIterator -> Point_3.
|
||||
NormalPMap normal_map, ///< property map: value_type of OutputIterator -> Vector_3.
|
||||
const Kernel& /*kernel*/) ///< geometric traits.
|
||||
{
|
||||
return IO::read_XYZ<OutputIteratorValueType>(is, output,
|
||||
parameters::point_map(point_map)
|
||||
.normal_map(normal_map)
|
||||
.geom_traits(Kernel()));
|
||||
}
|
||||
|
||||
template <typename OutputIterator,
|
||||
typename PointPMap,
|
||||
typename NormalPMap,
|
||||
typename Kernel>
|
||||
CGAL_DEPRECATED_MSG("you are using the deprecated V1 API of CGAL::read_xyz_points_and_normals(), please update your code")
|
||||
bool read_xyz_points_and_normals(std::istream& is, ///< input stream.
|
||||
OutputIterator output, ///< output iterator over points.
|
||||
PointPMap point_map, ///< property map: value_type of OutputIterator -> Point_3.
|
||||
NormalPMap normal_map, ///< property map: value_type of OutputIterator -> Vector_3.
|
||||
const Kernel& kernel) ///< geometric traits.
|
||||
{
|
||||
return IO::read_XYZ<typename value_type_traits<OutputIterator>::type>(is, output,
|
||||
parameters::point_map(point_map)
|
||||
.normal_map(normal_map)
|
||||
.geom_traits(kernel));
|
||||
}
|
||||
|
||||
template <typename OutputIteratorValueType,
|
||||
typename OutputIterator,
|
||||
typename PointPMap,
|
||||
typename NormalPMap>
|
||||
CGAL_DEPRECATED_MSG("you are using the deprecated V1 API of CGAL::read_xyz_points_and_normals(), please update your code")
|
||||
bool read_xyz_points_and_normals(std::istream& is, ///< input stream.
|
||||
OutputIterator output, ///< output iterator over points.
|
||||
PointPMap point_map, ///< property map: value_type of OutputIterator -> Point_3.
|
||||
NormalPMap normal_map) ///< property map: value_type of OutputIterator -> Vector_3.
|
||||
{
|
||||
return IO::read_XYZ<OutputIteratorValueType>(is, output,
|
||||
parameters::point_map(point_map)
|
||||
.normal_map(normal_map));
|
||||
}
|
||||
|
||||
template <typename OutputIterator,
|
||||
typename PointPMap,
|
||||
typename NormalPMap>
|
||||
CGAL_DEPRECATED_MSG("you are using the deprecated V1 API of CGAL::read_xyz_points_and_normals(), please update your code")
|
||||
bool read_xyz_points_and_normals(std::istream& is, ///< input stream.
|
||||
OutputIterator output, ///< output iterator over points.
|
||||
PointPMap point_map, ///< property map: value_type of OutputIterator -> Point_3.
|
||||
NormalPMap normal_map) ///< property map: value_type of OutputIterator -> Vector_3.
|
||||
{
|
||||
return IO::read_XYZ<typename value_type_traits<OutputIterator>::type>(is, output,
|
||||
parameters::point_map(point_map)
|
||||
.normal_map(normal_map));
|
||||
}
|
||||
|
||||
template <typename OutputIteratorValueType,
|
||||
typename OutputIterator,
|
||||
typename NormalPMap>
|
||||
CGAL_DEPRECATED_MSG("you are using the deprecated V1 API of CGAL::read_xyz_points_and_normals(), please update your code")
|
||||
bool read_xyz_points_and_normals(std::istream& is, ///< input stream.
|
||||
OutputIterator output, ///< output iterator over points.
|
||||
NormalPMap normal_map) ///< property map: value_type of OutputIterator -> Vector_3.
|
||||
{
|
||||
return IO::read_XYZ<OutputIteratorValueType>(is, output, parameters::normal_map(normal_map));
|
||||
}
|
||||
|
||||
template <typename OutputIterator,
|
||||
typename NormalPMap>
|
||||
CGAL_DEPRECATED_MSG("you are using the deprecated V1 API of CGAL::read_xyz_points_and_normals(), please update your code")
|
||||
bool read_xyz_points_and_normals(std::istream& is, ///< input stream.
|
||||
OutputIterator output, ///< output iterator over points.
|
||||
NormalPMap normal_map) ///< property map: value_type of OutputIterator -> Vector_3.
|
||||
{
|
||||
return IO::read_XYZ<typename value_type_traits<OutputIterator>::type>(is, output,
|
||||
parameters::normal_map(normal_map));
|
||||
}
|
||||
|
||||
template <typename OutputIteratorValueType,
|
||||
typename OutputIterator,
|
||||
typename PointPMap,
|
||||
typename Kernel>
|
||||
CGAL_DEPRECATED_MSG("you are using the deprecated V1 API of CGAL::read_xyz_points(), please update your code")
|
||||
bool read_xyz_points(std::istream& is, ///< input stream.
|
||||
OutputIterator output, ///< output iterator over points.
|
||||
PointPMap point_map, ///< property map: value_type of OutputIterator -> Point_3.
|
||||
const Kernel& kernel) ///< geometric traits.
|
||||
{
|
||||
return IO::read_XYZ<OutputIteratorValueType>(is, output,
|
||||
parameters::point_map(point_map)
|
||||
.geom_traits(kernel));
|
||||
}
|
||||
|
||||
template <typename OutputIterator,
|
||||
typename PointPMap,
|
||||
typename Kernel>
|
||||
CGAL_DEPRECATED_MSG("you are using the deprecated V1 API of CGAL::read_xyz_points(), please update your code")
|
||||
bool read_xyz_points(std::istream& is, ///< input stream.
|
||||
OutputIterator output, ///< output iterator over points.
|
||||
PointPMap point_map, ///< property map: value_type of OutputIterator -> Point_3.
|
||||
const Kernel& kernel) ///< geometric traits.
|
||||
{
|
||||
return IO::read_XYZ<typename value_type_traits<OutputIterator>::type>(is, output,
|
||||
parameters::point_map(point_map)
|
||||
.geom_traits(kernel));
|
||||
}
|
||||
|
||||
template <typename OutputIteratorValueType,
|
||||
typename OutputIterator,
|
||||
typename PointPMap>
|
||||
CGAL_DEPRECATED_MSG("you are using the deprecated V1 API of CGAL::read_xyz_points(), please update your code")
|
||||
bool read_xyz_points(std::istream& is, ///< input stream.
|
||||
OutputIterator output, ///< output iterator over points.
|
||||
PointPMap point_map) ///< property map: value_type of OutputIterator -> Point_3.
|
||||
{
|
||||
return IO::read_XYZ<OutputIteratorValueType>(is, output, parameters::point_map(point_map));
|
||||
}
|
||||
|
||||
template <typename OutputIterator,
|
||||
typename PointPMap>
|
||||
CGAL_DEPRECATED_MSG("you are using the deprecated V1 API of CGAL::read_xyz_points(), please update your code")
|
||||
bool read_xyz_points(std::istream& is, ///< input stream.
|
||||
OutputIterator output, ///< output iterator over points.
|
||||
PointPMap point_map) ///< property map: value_type of OutputIterator -> Point_3.
|
||||
{
|
||||
return IO::read_XYZ<typename value_type_traits<OutputIterator>::type>(is, output,
|
||||
parameters::point_map(point_map));
|
||||
}
|
||||
|
||||
/// \endcond
|
||||
|
||||
|
||||
template <typename OutputIteratorValueType,
|
||||
typename OutputIterator,
|
||||
typename CGAL_NP_TEMPLATE_PARAMETERS>
|
||||
CGAL_DEPRECATED bool read_xyz_points(std::istream& is,
|
||||
OutputIterator output,
|
||||
const CGAL_NP_CLASS& np = parameters::default_values())
|
||||
{
|
||||
return IO::read_XYZ(is, output, np);
|
||||
}
|
||||
|
||||
/// \cond SKIP_IN_MANUAL
|
||||
template <typename OutputIterator,
|
||||
typename CGAL_NP_TEMPLATE_PARAMETERS>
|
||||
CGAL_DEPRECATED bool read_xyz_points(std::istream& is,
|
||||
OutputIterator output,
|
||||
const CGAL_NP_CLASS& np = parameters::default_values())
|
||||
{
|
||||
return IO::read_XYZ<typename value_type_traits<OutputIterator>::type>(is, output, np);
|
||||
}
|
||||
/// \endcond
|
||||
|
||||
#endif //CGAL_NO_DEPRECATED_CODE
|
||||
|
||||
} // namespace CGAL
|
||||
|
||||
#endif // CGAL_POINT_SET_PROCESSING_READ_XYZ_POINTS_H
|
||||
|
|
|
|||
|
|
@ -379,59 +379,6 @@ bool write_LAS(const std::string& filename,
|
|||
|
||||
} // namespace IO
|
||||
|
||||
#ifndef CGAL_NO_DEPRECATED_CODE
|
||||
|
||||
using IO::make_las_point_writer;
|
||||
|
||||
/// \cond SKIP_IN_MANUAL
|
||||
|
||||
template <typename ForwardIterator,
|
||||
typename PointMap>
|
||||
CGAL_DEPRECATED_MSG("you are using the deprecated V1 API of CGAL::write_las_points(), please update your code")
|
||||
bool write_las_points(std::ostream& os, ///< output stream.
|
||||
ForwardIterator first, ///< first input point.
|
||||
ForwardIterator beyond, ///< past-the-end input point.
|
||||
PointMap point_map) ///< property map: value_type of OutputIterator -> Point_3.
|
||||
{
|
||||
CGAL::Iterator_range<ForwardIterator> points (first, beyond);
|
||||
return IO::write_LAS(os, points, parameters::point_map(point_map));
|
||||
}
|
||||
|
||||
template <typename ForwardIterator>
|
||||
CGAL_DEPRECATED_MSG("you are using the deprecated V1 API of CGAL::write_las_points(), please update your code")
|
||||
bool write_las_points(std::ostream& os, ///< output stream.
|
||||
ForwardIterator first, ///< first input point.
|
||||
ForwardIterator beyond) ///< past-the-end input point.
|
||||
{
|
||||
CGAL::Iterator_range<ForwardIterator> points (first, beyond);
|
||||
return IO::write_LAS(os, points);
|
||||
}
|
||||
|
||||
/// \endcond
|
||||
|
||||
template <typename PointRange,
|
||||
typename PointMap,
|
||||
typename ... PropertyHandler>
|
||||
CGAL_DEPRECATED bool write_las_points_with_properties(std::ostream& os,
|
||||
const PointRange& points,
|
||||
std::tuple<PointMap,
|
||||
IO::LAS_property::X,
|
||||
IO::LAS_property::Y,
|
||||
IO::LAS_property::Z> point_property,
|
||||
PropertyHandler&& ... properties)
|
||||
{
|
||||
return IO::write_LAS_with_properties(os, points, point_property, std::forward<PropertyHandler>(properties)...);
|
||||
}
|
||||
|
||||
|
||||
template <typename PointRange, typename CGAL_NP_TEMPLATE_PARAMETERS>
|
||||
bool write_las_points(std::ostream& os, const PointRange& points, const CGAL_NP_CLASS& np = parameters::default_values())
|
||||
{
|
||||
return IO::write_LAS(os, points, np);
|
||||
}
|
||||
|
||||
#endif //CGAL_NO_DEPRECATED_CODE
|
||||
|
||||
} // namespace CGAL
|
||||
|
||||
#endif // CGAL_POINT_SET_PROCESSING_WRITE_LAS_POINTS_H
|
||||
|
|
|
|||
|
|
@ -198,107 +198,6 @@ bool write_OFF(const std::string& filename,
|
|||
|
||||
} // IO namespace
|
||||
|
||||
#ifndef CGAL_NO_DEPRECATED_CODE
|
||||
|
||||
/// \cond SKIP_IN_MANUAL
|
||||
|
||||
template <typename ForwardIterator,
|
||||
typename PointMap,
|
||||
typename NormalMap,
|
||||
typename Kernel>
|
||||
CGAL_DEPRECATED_MSG("you are using the deprecated V1 API of CGAL::write_off_points_and_normals(), please update your code")
|
||||
bool write_off_points_and_normals(std::ostream& os, ///< output stream.
|
||||
ForwardIterator first, ///< iterator over the first input point.
|
||||
ForwardIterator beyond, ///< past-the-end iterator over the input points.
|
||||
PointMap point_map, ///< property map: value_type of ForwardIterator -> Point_3.
|
||||
NormalMap normal_map, ///< property map: value_type of ForwardIterator -> Vector_3.
|
||||
const Kernel& /*kernel*/) ///< geometric traits.
|
||||
{
|
||||
CGAL::Iterator_range<ForwardIterator> points(first, beyond);
|
||||
return write_off_points(os, points,
|
||||
CGAL::parameters::point_map(point_map)
|
||||
.normal_map(normal_map)
|
||||
.geom_traits(Kernel()));
|
||||
}
|
||||
|
||||
template <typename ForwardIterator,
|
||||
typename PointMap,
|
||||
typename NormalMap
|
||||
>
|
||||
CGAL_DEPRECATED_MSG("you are using the deprecated V1 API of CGAL::write_off_points_and_normals(), please update your code")
|
||||
bool write_off_points_and_normals(std::ostream& os, ///< output stream.
|
||||
ForwardIterator first, ///< first input point.
|
||||
ForwardIterator beyond, ///< past-the-end input point.
|
||||
PointMap point_map, ///< property map: value_type of OutputIterator -> Point_3.
|
||||
NormalMap normal_map) ///< property map: value_type of OutputIterator -> Vector_3.
|
||||
{
|
||||
CGAL::Iterator_range<ForwardIterator> points(first, beyond);
|
||||
return write_off_points(os, points,
|
||||
parameters::point_map(point_map)
|
||||
.normal_map(normal_map));
|
||||
}
|
||||
|
||||
template <typename ForwardIterator,
|
||||
typename NormalMap>
|
||||
CGAL_DEPRECATED_MSG("you are using the deprecated V1 API of CGAL::write_off_points_and_normals(), please update your code")
|
||||
bool write_off_points_and_normals(std::ostream& os, ///< output stream.
|
||||
ForwardIterator first, ///< first input point.
|
||||
ForwardIterator beyond, ///< past-the-end input point.
|
||||
NormalMap normal_map) ///< property map: value_type of OutputIterator -> Vector_3.
|
||||
{
|
||||
CGAL::Iterator_range<ForwardIterator> points(first, beyond);
|
||||
return write_off_points(os, points, parameters::normal_map (normal_map));
|
||||
}
|
||||
|
||||
template <typename ForwardIterator,
|
||||
typename PointMap,
|
||||
typename Kernel>
|
||||
CGAL_DEPRECATED_MSG("you are using the deprecated V1 API of CGAL::write_off_points(), please update your code")
|
||||
bool write_off_points(std::ostream& os, ///< output stream.
|
||||
ForwardIterator first, ///< iterator over the first input point.
|
||||
ForwardIterator beyond, ///< past-the-end iterator over the input points.
|
||||
PointMap point_map, ///< property map: value_type of ForwardIterator -> Point_3.
|
||||
const Kernel&) ///< geometric traits.
|
||||
{
|
||||
CGAL::Iterator_range<ForwardIterator> points(first, beyond);
|
||||
return write_off_points(os, points,
|
||||
parameters::point_map(point_map)
|
||||
.geom_traits(Kernel()));
|
||||
}
|
||||
|
||||
template <typename ForwardIterator,
|
||||
typename PointMap>
|
||||
CGAL_DEPRECATED_MSG("you are using the deprecated V1 API of CGAL::write_off_points(), please update your code")
|
||||
bool write_off_points(std::ostream& os, ///< output stream.
|
||||
ForwardIterator first, ///< first input point.
|
||||
ForwardIterator beyond, ///< past-the-end input point.
|
||||
PointMap point_map) ///< property map: value_type of OutputIterator -> Point_3.
|
||||
{
|
||||
CGAL::Iterator_range<ForwardIterator> points(first, beyond);
|
||||
return write_off_points(os, points, parameters::point_map (point_map));
|
||||
}
|
||||
|
||||
template <typename ForwardIterator
|
||||
>
|
||||
CGAL_DEPRECATED_MSG("you are using the deprecated V1 API of CGAL::write_off_points(), please update your code")
|
||||
bool write_off_points(std::ostream& os, ///< output stream.
|
||||
ForwardIterator first, ///< first input point.
|
||||
ForwardIterator beyond) ///< past-the-end input point.
|
||||
{
|
||||
CGAL::Iterator_range<ForwardIterator> points(first, beyond);
|
||||
return write_off_points(os, points);
|
||||
}
|
||||
|
||||
/// \endcond
|
||||
|
||||
template <typename PointRange, typename CGAL_NP_TEMPLATE_PARAMETERS>
|
||||
CGAL_DEPRECATED bool write_off_points(std::ostream& os, const PointRange& points, const CGAL_NP_CLASS& np = parameters::default_values())
|
||||
{
|
||||
return IO::write_OFF(os, points, np);
|
||||
}
|
||||
|
||||
#endif // CGAL_NO_DEPRECATED_CODE
|
||||
|
||||
} // namespace CGAL
|
||||
|
||||
#endif // CGAL_POINT_SET_PROCESSING_WRITE_OFF_POINTS_H
|
||||
|
|
|
|||
|
|
@ -298,80 +298,6 @@ bool write_PLY(const std::string& filename,
|
|||
|
||||
} // namespace IO
|
||||
|
||||
#ifndef CGAL_NO_DEPRECATED_CODE
|
||||
|
||||
/// \cond SKIP_IN_MANUAL
|
||||
|
||||
template <typename ForwardIterator,
|
||||
typename PointMap,
|
||||
typename VectorMap>
|
||||
CGAL_DEPRECATED_MSG("you are using the deprecated V1 API of CGAL::write_ply_points_and_normals(), please update your code")
|
||||
bool write_ply_points_and_normals(std::ostream& os, ///< output stream.
|
||||
ForwardIterator first, ///< first input point.
|
||||
ForwardIterator beyond, ///< past-the-end input point.
|
||||
PointMap point_map, ///< property map: value_type of OutputIterator -> Point_3.
|
||||
VectorMap normal_map) ///< property map: value_type of OutputIterator -> Vector_3.
|
||||
{
|
||||
CGAL::Iterator_range<ForwardIterator> points (first, beyond);
|
||||
return IO::write_PLY(os, points, parameters::point_map(point_map)
|
||||
.normal_map(normal_map));
|
||||
}
|
||||
|
||||
template <typename ForwardIterator,
|
||||
typename VectorMap>
|
||||
CGAL_DEPRECATED_MSG("you are using the deprecated V1 API of CGAL::write_ply_points_and_normals(), please update your code")
|
||||
bool write_ply_points_and_normals(std::ostream& os, ///< output stream.
|
||||
ForwardIterator first, ///< first input point.
|
||||
ForwardIterator beyond, ///< past-the-end input point.
|
||||
VectorMap normal_map) ///< property map: value_type of OutputIterator -> Vector_3.
|
||||
{
|
||||
CGAL::Iterator_range<ForwardIterator> points(first, beyond);
|
||||
return IO::write_PLY(os, points, parameters::normal_map (normal_map));
|
||||
}
|
||||
|
||||
template <typename ForwardIterator,
|
||||
typename PointMap >
|
||||
CGAL_DEPRECATED_MSG("you are using the deprecated V1 API of CGAL::write_ply_points(), please update your code")
|
||||
bool write_ply_points(std::ostream& os, ///< output stream.
|
||||
ForwardIterator first, ///< first input point.
|
||||
ForwardIterator beyond, ///< past-the-end input point.
|
||||
PointMap point_map) ///< property map: value_type of OutputIterator -> Point_3.
|
||||
{
|
||||
CGAL::Iterator_range<ForwardIterator> points(first, beyond);
|
||||
return IO::write_PLY(os, points, parameters::point_map(point_map));
|
||||
}
|
||||
|
||||
template <typename ForwardIterator >
|
||||
CGAL_DEPRECATED_MSG("you are using the deprecated V1 API of CGAL::write_ply_points(), please update your code")
|
||||
bool write_ply_points(std::ostream& os, ///< output stream.
|
||||
ForwardIterator first, ///< first input point.
|
||||
ForwardIterator beyond) ///< past-the-end input point.
|
||||
{
|
||||
CGAL::Iterator_range<ForwardIterator> points (first, beyond);
|
||||
return IO::write_PLY(os, points);
|
||||
}
|
||||
|
||||
/// \endcond
|
||||
|
||||
|
||||
template <typename PointRange,
|
||||
typename ... PropertyHandler>
|
||||
CGAL_DEPRECATED bool write_ply_points_with_properties(std::ostream& os, ///< output stream.
|
||||
const PointRange& points, ///< input point range.
|
||||
PropertyHandler&& ... properties) ///< parameter pack of property handlers
|
||||
{
|
||||
return IO::write_PLY_with_properties(os, points, std::forward<PropertyHandler>(properties)...);
|
||||
}
|
||||
|
||||
|
||||
template <typename PointRange, typename CGAL_NP_TEMPLATE_PARAMETERS>
|
||||
CGAL_DEPRECATED bool write_ply_points(std::ostream& os, const PointRange& points, const CGAL_NP_CLASS& np = parameters::default_values())
|
||||
{
|
||||
return IO::write_PLY(os, points, np);
|
||||
}
|
||||
|
||||
#endif // CGAL_NO_DEPRECATED_CODE
|
||||
|
||||
} // namespace CGAL
|
||||
|
||||
#endif // CGAL_POINT_SET_PROCESSING_WRITE_PLY_POINTS_H
|
||||
|
|
|
|||
|
|
@ -189,106 +189,6 @@ bool write_XYZ(const std::string& filename,
|
|||
|
||||
} // namespace IO
|
||||
|
||||
#ifndef CGAL_NO_DEPRECATED_CODE
|
||||
|
||||
/// \cond SKIP_IN_MANUAL
|
||||
|
||||
template <typename ForwardIterator,
|
||||
typename PointMap,
|
||||
typename NormalMap,
|
||||
typename Kernel>
|
||||
CGAL_DEPRECATED_MSG("you are using the deprecated V1 API of CGAL::write_xyz_points_and_normals(), please update your code")
|
||||
bool write_xyz_points_and_normals(std::ostream& os, ///< output stream.
|
||||
ForwardIterator first, ///< iterator over the first input point.
|
||||
ForwardIterator beyond, ///< past-the-end iterator over the input points.
|
||||
PointMap point_map, ///< property map: value_type of ForwardIterator -> Point_3.
|
||||
NormalMap normal_map, ///< property map: value_type of ForwardIterator -> Vector_3.
|
||||
const Kernel& /*kernel*/) ///< geometric traits.
|
||||
{
|
||||
CGAL::Iterator_range<ForwardIterator> points(first, beyond);
|
||||
return IO::write_XYZ(os, points,
|
||||
parameters::point_map(point_map)
|
||||
.normal_map(normal_map)
|
||||
.geom_traits(Kernel()));
|
||||
}
|
||||
|
||||
template <typename ForwardIterator,
|
||||
typename PointMap,
|
||||
typename NormalMap>
|
||||
CGAL_DEPRECATED_MSG("you are using the deprecated V1 API of CGAL::write_xyz_points_and_normals(), please update your code")
|
||||
bool write_xyz_points_and_normals(std::ostream& os, ///< output stream.
|
||||
ForwardIterator first, ///< first input point.
|
||||
ForwardIterator beyond, ///< past-the-end input point.
|
||||
PointMap point_map, ///< property map: value_type of OutputIterator -> Point_3.
|
||||
NormalMap normal_map) ///< property map: value_type of OutputIterator -> Vector_3.
|
||||
{
|
||||
CGAL::Iterator_range<ForwardIterator> points (first, beyond);
|
||||
return IO::write_XYZ(os, points,
|
||||
parameters::point_map(point_map)
|
||||
.normal_map(normal_map));
|
||||
}
|
||||
|
||||
template <typename ForwardIterator,
|
||||
typename NormalMap
|
||||
>
|
||||
CGAL_DEPRECATED_MSG("you are using the deprecated V1 API of CGAL::write_xyz_points_and_normals(), please update your code")
|
||||
bool write_xyz_points_and_normals(std::ostream& os, ///< output stream.
|
||||
ForwardIterator first, ///< first input point.
|
||||
ForwardIterator beyond, ///< past-the-end input point.
|
||||
NormalMap normal_map) ///< property map: value_type of ForwardIterator -> Vector_3.
|
||||
{
|
||||
CGAL::Iterator_range<ForwardIterator> points(first, beyond);
|
||||
return IO::write_XYZ(os, points, parameters::normal_map(normal_map));
|
||||
}
|
||||
|
||||
template <typename ForwardIterator,
|
||||
typename PointMap,
|
||||
typename Kernel>
|
||||
CGAL_DEPRECATED_MSG("you are using the deprecated V1 API of CGAL::write_xyz_points(), please update your code")
|
||||
bool write_xyz_points(std::ostream& os, ///< output stream.
|
||||
ForwardIterator first, ///< first input point.
|
||||
ForwardIterator beyond, ///< past-the-end input point.
|
||||
PointMap point_map, ///< property map: value_type of OutputIterator -> Point_3.
|
||||
const Kernel& kernel)
|
||||
{
|
||||
CGAL::Iterator_range<ForwardIterator> points (first, beyond);
|
||||
return IO::write_XYZ(os, points, parameters::point_map(point_map)
|
||||
.geom_traits (kernel));
|
||||
}
|
||||
|
||||
template <typename ForwardIterator,
|
||||
typename PointMap>
|
||||
CGAL_DEPRECATED_MSG("you are using the deprecated V1 API of CGAL::write_xyz_points(), please update your code")
|
||||
bool write_xyz_points(std::ostream& os, ///< output stream.
|
||||
ForwardIterator first, ///< first input point.
|
||||
ForwardIterator beyond, ///< past-the-end input point.
|
||||
PointMap point_map) ///< property map: value_type of OutputIterator -> Point_3.
|
||||
{
|
||||
CGAL::Iterator_range<ForwardIterator> points(first, beyond);
|
||||
return IO::write_XYZ(os, points, parameters::point_map(point_map));
|
||||
}
|
||||
|
||||
template <typename ForwardIterator>
|
||||
CGAL_DEPRECATED_MSG("you are using the deprecated V1 API of CGAL::write_xyz_points(), please update your code")
|
||||
bool write_xyz_points(std::ostream& os, ///< output stream.
|
||||
ForwardIterator first, ///< first input point.
|
||||
ForwardIterator beyond) ///< past-the-end input point.
|
||||
{
|
||||
CGAL::Iterator_range<ForwardIterator> points (first, beyond);
|
||||
return IO::write_XYZ(os, points);
|
||||
}
|
||||
|
||||
/// \endcond
|
||||
|
||||
|
||||
template <typename PointRange, typename CGAL_NP_TEMPLATE_PARAMETERS>
|
||||
CGAL_DEPRECATED bool write_xyz_points(std::ostream& os, const PointRange& points, const CGAL_NP_CLASS& np = parameters::default_values())
|
||||
{
|
||||
return IO::write_XYZ(os, points, np);
|
||||
}
|
||||
|
||||
#endif // CGAL_NO_DEPRECATED_CODE
|
||||
|
||||
} // namespace CGAL
|
||||
|
||||
#endif // CGAL_POINT_SET_PROCESSING_WRITE_XYZ_POINTS_H
|
||||
|
|
|
|||
|
|
@ -22,7 +22,6 @@ endif()
|
|||
# Executables that do *not* require Eigen
|
||||
create_single_source_cgal_program( "read_test.cpp" )
|
||||
create_single_source_cgal_program( "test_read_write_point_set.cpp" )
|
||||
create_single_source_cgal_program( "test_deprecated_io_point_set.cpp" )
|
||||
create_single_source_cgal_program( "test_poisson_eliminate.cpp" )
|
||||
create_single_source_cgal_program( "read_test_with_different_pmaps.cpp" )
|
||||
create_single_source_cgal_program( "analysis_test.cpp" )
|
||||
|
|
@ -39,7 +38,6 @@ if(NOT MSVC_VERSION OR MSVC_VERSION GREATER_EQUAL 1919 OR MSVC_VERSION LESS 1910
|
|||
include(CGAL_LASLIB_support)
|
||||
if (TARGET CGAL::LASLIB_support)
|
||||
target_link_libraries(test_read_write_point_set PRIVATE ${CGAL_libs} CGAL::LASLIB_support)
|
||||
target_link_libraries(test_deprecated_io_point_set PRIVATE ${CGAL_libs} CGAL::LASLIB_support)
|
||||
else()
|
||||
message(STATUS "NOTICE: the LAS reader test requires LASlib and will not be compiled.")
|
||||
endif()
|
||||
|
|
|
|||
|
|
@ -1,241 +0,0 @@
|
|||
#include <CGAL/Installation/internal/disable_deprecation_warnings_and_errors.h>
|
||||
|
||||
#include <CGAL/Simple_cartesian.h>
|
||||
|
||||
#include <CGAL/Point_set_3.h>
|
||||
#include <CGAL/IO/read_points.h>
|
||||
#include <CGAL/IO/write_points.h>
|
||||
|
||||
// Just to try and create ambiguities
|
||||
#include <CGAL/boost/graph/io.h>
|
||||
#include <CGAL/IO/io.h>
|
||||
|
||||
#include <CGAL/property_map.h>
|
||||
|
||||
#include <vector>
|
||||
#include <cassert>
|
||||
#include <string>
|
||||
#include <sstream>
|
||||
|
||||
typedef CGAL::Simple_cartesian<double> Kernel;
|
||||
typedef Kernel::Point_3 Point_3;
|
||||
typedef Kernel::Vector_3 Vector_3;
|
||||
typedef std::array<unsigned short, 4> Color;
|
||||
typedef std::pair<Point_3, Color> PointWithColor;
|
||||
typedef CGAL::Nth_of_tuple_property_map<1, PointWithColor> Color_map;
|
||||
|
||||
struct GetRedMap
|
||||
{
|
||||
typedef PointWithColor key_type;
|
||||
typedef unsigned short value_type;
|
||||
typedef const value_type& reference;
|
||||
typedef boost::lvalue_property_map_tag category;
|
||||
};
|
||||
unsigned short get(const GetRedMap&, const PointWithColor& p)
|
||||
{
|
||||
return p.second[0];
|
||||
}
|
||||
|
||||
struct GetGreenMap
|
||||
{
|
||||
typedef PointWithColor key_type;
|
||||
typedef unsigned short value_type;
|
||||
typedef const value_type& reference;
|
||||
typedef boost::lvalue_property_map_tag category;
|
||||
};
|
||||
unsigned short get(const GetGreenMap&, const PointWithColor& p)
|
||||
{
|
||||
return p.second[1];
|
||||
}
|
||||
|
||||
struct GetBlueMap
|
||||
{
|
||||
typedef PointWithColor key_type;
|
||||
typedef unsigned short value_type;
|
||||
typedef const value_type& reference;
|
||||
typedef boost::lvalue_property_map_tag category;
|
||||
};
|
||||
unsigned short get(const GetBlueMap&, const PointWithColor& p)
|
||||
{
|
||||
return p.second[2];
|
||||
}
|
||||
|
||||
struct GetAlphaMap
|
||||
{
|
||||
typedef PointWithColor key_type;
|
||||
typedef unsigned short value_type;
|
||||
typedef const value_type& reference;
|
||||
typedef boost::lvalue_property_map_tag category;
|
||||
};
|
||||
|
||||
unsigned short get(const GetAlphaMap&, const PointWithColor& p)
|
||||
{
|
||||
return p.second[3];
|
||||
}
|
||||
|
||||
int main()
|
||||
{
|
||||
std::vector<PointWithColor> points(3);
|
||||
points[0] = std::make_pair(Point_3(1,0,0), Color{255,0,0,255});
|
||||
points[1] = std::make_pair(Point_3(0,1,0), Color{0,255,0,255});
|
||||
points[2] = std::make_pair(Point_3(0,0,1), Color{0,0,255,255});
|
||||
|
||||
bool ok;
|
||||
std::vector<Point_3> ps;
|
||||
ps.push_back(Point_3(1,0,0));
|
||||
ps.push_back(Point_3(0,1,0));
|
||||
ps.push_back(Point_3(0,0,1));
|
||||
|
||||
std::string input;
|
||||
|
||||
//LAS
|
||||
#ifdef CGAL_LINKED_WITH_LASLIB
|
||||
|
||||
{
|
||||
std::ostringstream os(std::ios::binary);
|
||||
ok = CGAL::write_las_points_with_properties(os, points,
|
||||
CGAL::make_las_point_writer(CGAL::First_of_pair_property_map<PointWithColor>()),
|
||||
std::make_pair(GetRedMap(),CGAL::LAS_property::R()),
|
||||
std::make_pair(GetGreenMap(), CGAL::LAS_property::G()),
|
||||
std::make_pair(GetBlueMap(), CGAL::LAS_property::B()),
|
||||
std::make_pair(GetAlphaMap(), CGAL::LAS_property::I())
|
||||
);
|
||||
assert(ok);
|
||||
os.flush();
|
||||
input = os.str();
|
||||
|
||||
}
|
||||
|
||||
{
|
||||
points.clear();
|
||||
std::istringstream is(input, std::ios::binary);
|
||||
ok = CGAL::read_las_points_with_properties(is, std::back_inserter (points),
|
||||
CGAL::make_las_point_reader(CGAL::First_of_pair_property_map<PointWithColor>()),
|
||||
std::make_tuple(CGAL::Second_of_pair_property_map<PointWithColor>(),
|
||||
CGAL::Construct_array(),
|
||||
CGAL::LAS_property::R(),
|
||||
CGAL::LAS_property::G(),
|
||||
CGAL::LAS_property::B(),
|
||||
CGAL::LAS_property::I()));
|
||||
assert(ok);
|
||||
assert(points.size() == 3);
|
||||
assert(points[1].second[1] == 255);
|
||||
}
|
||||
|
||||
{
|
||||
std::ostringstream os(std::ios_base::binary);
|
||||
CGAL::write_las_points(os, ps);
|
||||
assert(ok);
|
||||
os.flush();
|
||||
input = os.str();
|
||||
}
|
||||
|
||||
{
|
||||
ps.clear();
|
||||
std::istringstream is(input, std::ios::binary);
|
||||
ok = CGAL::read_las_points(is, std::back_inserter (ps));
|
||||
assert(ok);
|
||||
assert(ps.size() == 3);
|
||||
}
|
||||
#endif
|
||||
|
||||
//PLY
|
||||
{
|
||||
std::ostringstream os;
|
||||
assert(os.good());
|
||||
ok = CGAL::write_ply_points_with_properties(os, points,
|
||||
CGAL::make_ply_point_writer (CGAL::First_of_pair_property_map<PointWithColor>()),
|
||||
std::make_pair(GetRedMap(),CGAL::PLY_property<unsigned short>("red")),
|
||||
std::make_pair(GetGreenMap(), CGAL::PLY_property<unsigned short>("green")),
|
||||
std::make_pair(GetBlueMap(), CGAL::PLY_property<unsigned short>("blue")),
|
||||
std::make_pair(GetAlphaMap(), CGAL::PLY_property<unsigned short>("alpha"))
|
||||
);
|
||||
assert(! os.fail());
|
||||
assert(ok);
|
||||
os.flush();
|
||||
input = os.str();
|
||||
}
|
||||
|
||||
{
|
||||
std::istringstream is(input);
|
||||
assert(is.good());
|
||||
points.clear();
|
||||
ok = CGAL::read_ply_points_with_properties(is, std::back_inserter (points),
|
||||
CGAL::make_ply_point_reader(CGAL::First_of_pair_property_map<PointWithColor>()),
|
||||
std::make_tuple(CGAL::Second_of_pair_property_map<PointWithColor>(),
|
||||
CGAL::Construct_array(),
|
||||
CGAL::PLY_property<unsigned short>("red"),
|
||||
CGAL::PLY_property<unsigned short>("green"),
|
||||
CGAL::PLY_property<unsigned short>("blue"),
|
||||
CGAL::PLY_property<unsigned short>("alpha")));
|
||||
assert(! is.fail());
|
||||
assert(ok);
|
||||
assert(points.size() == 3);
|
||||
assert(points[1].second[1] == 255);
|
||||
}
|
||||
|
||||
{
|
||||
std::ostringstream os;
|
||||
assert(os.good());
|
||||
ok = CGAL::write_ply_points(os, ps);
|
||||
assert(! os.fail());
|
||||
assert(ok);
|
||||
os.flush();
|
||||
input = os.str();
|
||||
}
|
||||
|
||||
{
|
||||
std::istringstream is(input);
|
||||
assert(is.good());
|
||||
ps.clear();
|
||||
ok = CGAL::read_ply_points(is, std::back_inserter (ps));
|
||||
assert(! is.fail());
|
||||
assert(ok);
|
||||
assert(ps.size() == 3);
|
||||
}
|
||||
|
||||
//OFF
|
||||
{
|
||||
std::ostringstream os;
|
||||
assert(os.good());
|
||||
ok = CGAL::write_off_points(os, ps);
|
||||
assert(! os.fail());
|
||||
assert(ok);
|
||||
os.flush();
|
||||
input = os.str();
|
||||
}
|
||||
|
||||
{
|
||||
std::istringstream is(input);
|
||||
assert(is.good());
|
||||
ps.clear();
|
||||
ok = CGAL::read_off_points(is, std::back_inserter (ps));
|
||||
assert(! is.fail());
|
||||
assert(ok);
|
||||
assert(ps.size() == 3);
|
||||
}
|
||||
|
||||
//XYZ
|
||||
{
|
||||
std::ostringstream os;
|
||||
assert(os.good());
|
||||
ok = CGAL::write_xyz_points(os, ps);
|
||||
assert(! os.fail());
|
||||
assert(ok);
|
||||
os.flush();
|
||||
input = os.str();
|
||||
}
|
||||
|
||||
{
|
||||
std::istringstream is(input);
|
||||
assert(is.good());
|
||||
ps.clear();
|
||||
ok = CGAL::read_xyz_points(is, std::back_inserter (ps));
|
||||
assert(! is.fail());
|
||||
assert(ok);
|
||||
assert(ps.size() == 3);
|
||||
}
|
||||
|
||||
std::cout << "Done" << std::endl;
|
||||
return EXIT_SUCCESS;
|
||||
}
|
||||
|
|
@ -34,13 +34,6 @@ polyhedral surface.
|
|||
template <class Traits>
|
||||
bool read_OFF( std::istream& in, CGAL::Polyhedron_3<Traits>& P);
|
||||
|
||||
/*!
|
||||
\deprecated This function is deprecated since \cgal 5.3,
|
||||
\ref read_OFF(std::istream&, Polyhedron_3<Traits>&) should be used instead.
|
||||
*/
|
||||
template <class Traits>
|
||||
bool read_off( std::istream& in, CGAL::Polyhedron_3<Traits>& P);
|
||||
|
||||
} // namespace IO
|
||||
|
||||
/*!
|
||||
|
|
@ -79,12 +72,6 @@ This function overloads the generic function \link PkgBGLIoFuncsOFF `write_OFF(s
|
|||
template <class Traits>
|
||||
bool write_OFF( std::ostream& out, const CGAL::Polyhedron_3<Traits>& P);
|
||||
|
||||
/*!
|
||||
\deprecated This function is deprecated since \cgal 5.3,
|
||||
\ref CGAL::IO::write_OFF(std::ostream&, const Polyhedron_3<Traits>&) should be used instead.
|
||||
*/
|
||||
template <class Traits>
|
||||
bool write_off( std::ostream& out, const CGAL::Polyhedron_3<Traits>& P);
|
||||
|
||||
} // namespace IO
|
||||
|
||||
|
|
|
|||
|
|
@ -22,34 +22,5 @@
|
|||
|
||||
#include <CGAL/boost/graph/io.h>
|
||||
|
||||
#include <string>
|
||||
|
||||
namespace CGAL {
|
||||
|
||||
#ifndef CGAL_NO_DEPRECATED_CODE
|
||||
|
||||
/*!
|
||||
\ingroup PkgSurfaceMeshIOFuncDeprecated
|
||||
\deprecated This function is deprecated since \cgal 5.3, `CGAL::IO::read_polygon_mesh()` should be used instead.
|
||||
*/
|
||||
template <typename K>
|
||||
CGAL_DEPRECATED bool read_mesh(Surface_mesh<K>& sm, const std::string& filename)
|
||||
{
|
||||
return IO::read_polygon_mesh(filename, sm);
|
||||
}
|
||||
|
||||
/*!
|
||||
\ingroup PkgSurfaceMeshIOFuncDeprecated
|
||||
\deprecated This function is deprecated since \cgal 5.3, `CGAL::IO::write_polygon_mesh()` should be used instead.
|
||||
*/
|
||||
template <typename K>
|
||||
CGAL_DEPRECATED bool write_mesh(const Surface_mesh<K>& mesh, const std::string& filename)
|
||||
{
|
||||
return IO::write_polygon_mesh(filename, mesh);
|
||||
}
|
||||
|
||||
#endif // CGAL_NO_DEPRECATED_CODE
|
||||
|
||||
} // namespace CGAL
|
||||
|
||||
#endif // CGAL_SURFACE_MESH_IO_H
|
||||
|
|
|
|||
|
|
@ -137,20 +137,6 @@ bool read_3MF(const std::string& filename,
|
|||
|
||||
} // namespace IO
|
||||
|
||||
#ifndef CGAL_NO_DEPRECATED_CODE
|
||||
|
||||
/*!
|
||||
\ingroup PkgSurfaceMeshIOFuncDeprecated
|
||||
\deprecated This function is deprecated since \cgal 5.3, `CGAL::IO::read_3MF()` should be used instead.
|
||||
*/
|
||||
template<typename Point>
|
||||
CGAL_DEPRECATED int read_3mf(const std::string& filename, std::vector<CGAL::Surface_mesh<Point> >& output)
|
||||
{
|
||||
return IO::read_3MF(filename, output);
|
||||
}
|
||||
|
||||
#endif // CGAL_NO_DEPRECATED_CODE
|
||||
|
||||
} // namespace CGAL
|
||||
|
||||
#endif // defined(CGAL_LINKED_WITH_3MF) || defined(DOXYGEN_RUNNING)
|
||||
|
|
|
|||
|
|
@ -347,30 +347,6 @@ bool read_OFF(const std::string& fname,
|
|||
|
||||
} // namespace IO
|
||||
|
||||
#ifndef CGAL_NO_DEPRECATED_CODE
|
||||
|
||||
/*!
|
||||
\ingroup PkgSurfaceMeshIOFuncDeprecated
|
||||
\deprecated This function is deprecated since \cgal 5.3, `CGAL::IO::read_OFF(std::istream&, const Surface_mesh<Point>&)` should be used instead.
|
||||
*/
|
||||
template <typename Point, typename CGAL_NP_TEMPLATE_PARAMETERS>
|
||||
CGAL_DEPRECATED bool read_off(std::istream& is, Surface_mesh<Point>& sm, const CGAL_NP_CLASS& np = parameters::default_values())
|
||||
{
|
||||
return IO::read_OFF(is, sm, np);
|
||||
}
|
||||
|
||||
/*!
|
||||
\ingroup PkgSurfaceMeshIOFuncDeprecated
|
||||
\deprecated This function is deprecated since \cgal 5.3, `CGAL::IO::read_OFF(std::istream&, const Surface_mesh<Point>&)` should be used instead.
|
||||
*/
|
||||
template <typename Point>
|
||||
CGAL_DEPRECATED bool read_off(Surface_mesh<Point>& sm, const std::string& filename)
|
||||
{
|
||||
return IO::read_OFF(filename, sm, parameters::default_values());
|
||||
}
|
||||
#endif // CGAL_NO_DEPRECATED_CODE
|
||||
|
||||
////////////////////////////////////////////////////////////////////////////////////////////////////
|
||||
////////////////////////////////////////////////////////////////////////////////////////////////////
|
||||
// Write
|
||||
|
||||
|
|
@ -549,30 +525,6 @@ bool write_OFF(std::ostream& os,
|
|||
|
||||
} // namespace IO
|
||||
|
||||
#ifndef CGAL_NO_DEPRECATED_CODE
|
||||
|
||||
/*!
|
||||
\ingroup PkgSurfaceMeshIOFuncDeprecated
|
||||
\deprecated This function is deprecated since \cgal 5.3, `CGAL::IO::write_OFF(std::ostream&, const Surface_mesh<Point>&)` should be used instead.
|
||||
*/
|
||||
template <typename Point, typename CGAL_NP_TEMPLATE_PARAMETERS>
|
||||
CGAL_DEPRECATED bool write_off(std::ostream& os, const Surface_mesh<Point>& sm, const CGAL_NP_CLASS& np = parameters::default_values())
|
||||
{
|
||||
return IO::write_OFF(os, sm, np);
|
||||
}
|
||||
|
||||
/*!
|
||||
\ingroup PkgSurfaceMeshIOFuncDeprecated
|
||||
\deprecated This function is deprecated since \cgal 5.3, `CGAL::IO::write_OFF(std::ostream&, const Surface_mesh<Point>&)` should be used instead.
|
||||
*/
|
||||
template <typename Point>
|
||||
CGAL_DEPRECATED bool write_off(const Surface_mesh<Point>& sm, const std::string& filename)
|
||||
{
|
||||
return IO::write_OFF(filename, sm, parameters::default_values());
|
||||
}
|
||||
|
||||
#endif // CGAL_NO_DEPRECATED_CODE
|
||||
|
||||
} // namespace CGAL
|
||||
|
||||
#endif // CGAL_SURFACE_MESH_IO_OFF_H
|
||||
|
|
|
|||
|
|
@ -169,10 +169,7 @@ public:
|
|||
const std::string& name = property->name();
|
||||
if(name == "vertex1" || name == "vertex2")
|
||||
return true;
|
||||
#ifndef CGAL_NO_DEPRECATED_CODE
|
||||
if(name == "v0" || name == "v1")
|
||||
return true;
|
||||
#endif
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
|
|
@ -888,21 +885,7 @@ bool read_PLY(std::istream& is, Surface_mesh<P>& sm)
|
|||
|
||||
} // namespace IO
|
||||
|
||||
#ifndef CGAL_NO_DEPRECATED_CODE
|
||||
|
||||
/*!
|
||||
\ingroup PkgSurfaceMeshIOFuncDeprecated
|
||||
\deprecated This function is deprecated since \cgal 5.3, `CGAL::IO::read_PLY(std::ostream&, const Surface_mesh<Point>&)` should be used instead.
|
||||
*/
|
||||
template <typename P>
|
||||
CGAL_DEPRECATED bool read_ply(std::istream& is, Surface_mesh<P>& sm, std::string& comments)
|
||||
{
|
||||
return IO::read_PLY(is, sm, comments);
|
||||
}
|
||||
|
||||
#endif // CGAL_NO_DEPRECATED_CODE
|
||||
|
||||
////////////////////////////////////////////////////////////////////////////////////////////////////
|
||||
////////////////////////////////////////////////////////////////////////////////////////////////////
|
||||
// Write
|
||||
|
||||
|
|
@ -1155,26 +1138,6 @@ bool write_PLY(std::ostream& os, const Surface_mesh<P>& sm, const CGAL_NP_CLASS&
|
|||
|
||||
} // namespace IO
|
||||
|
||||
#ifndef CGAL_NO_DEPRECATED_CODE
|
||||
|
||||
/*!
|
||||
\ingroup PkgSurfaceMeshIOFuncDeprecated
|
||||
\deprecated This function is deprecated since \cgal 5.3, `CGAL::IO::write_PLY(std::ostream&, const Surface_mesh<Point>&)` should be used instead.
|
||||
*/
|
||||
|
||||
template <typename P>
|
||||
CGAL_DEPRECATED bool write_ply(std::ostream& os, const Surface_mesh<P>& sm, const std::string& comments)
|
||||
{
|
||||
return IO::write_PLY(os, sm, comments);
|
||||
}
|
||||
|
||||
template <typename P>
|
||||
CGAL_DEPRECATED bool write_ply(std::ostream& os, const Surface_mesh<P>& sm)
|
||||
{
|
||||
return write_PLY(os, sm, "");
|
||||
}
|
||||
#endif // CGAL_NO_DEPRECATED_CODE
|
||||
|
||||
} // namespace CGAL
|
||||
|
||||
#endif // CGAL_SURFACE_MESH_IO_PLY_H
|
||||
|
|
|
|||
|
|
@ -15,15 +15,3 @@ foreach(cppfile ${cppfiles})
|
|||
create_single_source_cgal_program("${cppfile}")
|
||||
endforeach()
|
||||
|
||||
find_path(3MF_INCLUDE_DIR
|
||||
NAMES Model/COM/NMR_DLLInterfaces.h
|
||||
DOC "Path to lib3MF headers"
|
||||
)
|
||||
find_library(3MF_LIBRARIES NAMES 3MF DOC "Path to the lib3MF library")
|
||||
if(3MF_LIBRARIES AND 3MF_INCLUDE_DIR AND EXISTS "${3MF_INCLUDE_DIR}/Model/COM/NMR_DLLInterfaces.h")
|
||||
include_directories(${3MF_INCLUDE_DIR})
|
||||
target_link_libraries(test_deprecated_io_sm PRIVATE ${3MF_LIBRARIES})
|
||||
target_compile_definitions(test_deprecated_io_sm PRIVATE -DCGAL_LINKED_WITH_3MF)
|
||||
else()
|
||||
message(STATUS "NOTICE: read_3mf requires the lib3MF library, and will not be tested.")
|
||||
endif()
|
||||
|
|
|
|||
|
|
@ -1,70 +0,0 @@
|
|||
#include <CGAL/Installation/internal/disable_deprecation_warnings_and_errors.h>
|
||||
#include <fstream>
|
||||
#include <iostream>
|
||||
#include <CGAL/Surface_mesh.h>
|
||||
#include <CGAL/Simple_cartesian.h>
|
||||
#include <CGAL/boost/graph/generators.h>
|
||||
#include <CGAL/Surface_mesh/IO/3MF.h>
|
||||
#include <CGAL/Surface_mesh/IO/OFF.h>
|
||||
#include <CGAL/Surface_mesh/IO/PLY.h>
|
||||
|
||||
|
||||
typedef CGAL::Simple_cartesian<double> Kernel;
|
||||
typedef Kernel::Point_3 Point_3;
|
||||
typedef CGAL::Surface_mesh<Point_3> SM;
|
||||
|
||||
int main()
|
||||
{
|
||||
// OFF
|
||||
SM sm_in, sm_out;
|
||||
Point_3 p0(0,0,0), p1(1,0,0), p2(0,1,0);
|
||||
CGAL::make_triangle(p0, p1, p2, sm_out);
|
||||
bool ok = CGAL::write_off(sm_out, "tmp.off");
|
||||
assert(ok);
|
||||
ok = CGAL::read_off(sm_in, "tmp.off");
|
||||
assert(ok);
|
||||
assert(num_vertices(sm_in) == 3 && num_faces(sm_in) == 1);
|
||||
sm_in.clear();
|
||||
|
||||
std::ofstream os("tmp.off");
|
||||
ok = CGAL::write_off(os, sm_out);
|
||||
assert(ok);
|
||||
os.close();
|
||||
std::ifstream is("tmp.off");
|
||||
ok = CGAL::read_off(is, sm_in);
|
||||
assert(ok);
|
||||
assert(num_vertices(sm_in) == 3 && num_faces(sm_in) == 1);
|
||||
is.close();
|
||||
sm_in.clear();
|
||||
|
||||
//PLY
|
||||
os.open("tmp.ply");
|
||||
std::string comments;
|
||||
ok = CGAL::write_ply(os, sm_out, comments);
|
||||
assert(ok);
|
||||
os.close();
|
||||
is.open("tmp.ply");
|
||||
ok = CGAL::read_ply(is, sm_in, comments);
|
||||
assert(ok);
|
||||
assert(num_vertices(sm_in) == 3 && num_faces(sm_in) == 1);
|
||||
is.close();
|
||||
sm_in.clear();
|
||||
|
||||
#ifdef CGAL_LINKED_WITH_3MF
|
||||
// 3mf
|
||||
std::vector<SM> output_3mf;
|
||||
ok = CGAL::read_3mf("test.3mf", output_3mf);
|
||||
assert(ok);
|
||||
assert(output_3mf.size() == 2);
|
||||
sm_in.clear();
|
||||
#endif
|
||||
|
||||
//others
|
||||
ok = CGAL::write_mesh(sm_out, "tmp.off");
|
||||
assert(ok);
|
||||
ok = CGAL::read_mesh(sm_in, "tmp.ply");
|
||||
assert(ok);
|
||||
assert(num_vertices(sm_in) == 3 && num_faces(sm_in) == 1);
|
||||
sm_in.clear();
|
||||
return EXIT_SUCCESS;
|
||||
}
|
||||
Loading…
Reference in New Issue