rename IO functions in point_set packages

This commit is contained in:
Maxime Gimeno 2020-03-30 17:06:48 +02:00
parent 8a535e5e55
commit 69a2a23cc6
67 changed files with 1395 additions and 759 deletions

View File

@ -115,7 +115,7 @@ int main (int argc, char* argv[])
std::ifstream stream(fname);
if (!stream ||
!CGAL::read_xyz_points(stream,
!CGAL::read_XYZ(stream,
std::back_inserter(points),
CGAL::parameters::point_map(Point_map()).
normal_map(Normal_map())))

View File

@ -53,7 +53,7 @@ int main (int argc, char** argv)
std::cerr << "Reading input" << std::endl;
if (!in
|| !(CGAL::read_ply_points (in, std::back_inserter (pts))))
|| !(CGAL::read_PLY (in, std::back_inserter (pts))))
{
std::cerr << "Error: cannot read " << filename << std::endl;
return EXIT_FAILURE;

View File

@ -72,7 +72,7 @@ int main (int argc, char** argv)
std::cerr << "Reading input" << std::endl;
if (!in
|| !(CGAL::read_ply_points (in, std::back_inserter (pts))))
|| !(CGAL::read_PLY_points (in, std::back_inserter (pts))))
{
std::cerr << "Error: cannot read " << filename << std::endl;
return EXIT_FAILURE;

View File

@ -16,7 +16,7 @@ int main (int argc, char** argv)
Point_set point_set;
// Reading input in XYZ format
if (!f || !CGAL::read_xyz_point_set (f, point_set))
if (!f || !CGAL::read_XYZ (f, point_set))
{
std::cerr<<"Can't read input file "
<<(argc > 1 ? argv[1] : "data/oni.xyz")<< std::endl;

View File

@ -19,7 +19,7 @@ int main (int argc, char** argv)
Point_set point_set;
if (!f || !CGAL::read_ply_point_set (f, point_set)) // same as `f >> point_set`
if (!f || !CGAL::read_PLY (f, point_set)) // same as `f >> point_set`
{
std::cerr << "Can't read input file " << std::endl;
}

View File

@ -19,7 +19,7 @@ int main (int argc, char** argv)
Point_set point_set;
// Reading input in XYZ format
if (!f || !CGAL::read_xyz_point_set (f, point_set))
if (!f || !CGAL::read_XYZ (f, point_set))
{
std::cerr << "Can't read input file " << std::endl;
return EXIT_FAILURE;
@ -39,7 +39,7 @@ int main (int argc, char** argv)
// Writing result in OFF format
std::ofstream out("normalized_normals.off");
out.precision(17);
if (!out || !CGAL::write_off_point_set (out, point_set))
if (!out || !CGAL::write_OFF (out, point_set))
{
return EXIT_FAILURE;
}

View File

@ -29,8 +29,12 @@
#include <CGAL/IO/PLY.h>
namespace CGAL {
namespace IO {
namespace internal {
namespace IO
{
namespace internal
{
template <typename Point,
typename Vector = typename Kernel_traits<Point>::Kernel::Vector_3>
@ -93,7 +97,7 @@ public:
for (std::size_t j = 0; j < element.number_of_properties(); ++ j)
{
PLY_read_number* property = element.property(j);
IO::internal::PLY_read_number* property = element.property(j);
const std::string& name = property->name();
if (name == "x" ||
@ -208,15 +212,16 @@ public:
}
};
} // namespace internal
} // namespace IO
}
}
/*!
\ingroup PkgPointSet3IO
*/
template <typename Point, typename Vector>
bool
read_xyz_point_set(
read_XYZ(
std::istream& stream, ///< input stream.
CGAL::Point_set_3<Point, Vector>& point_set) ///< point set
{
@ -248,13 +253,13 @@ read_xyz_point_set(
*/
template <typename Point, typename Vector>
bool
read_off_point_set(
read_OFF(
std::istream& stream, ///< input stream.
CGAL::Point_set_3<Point, Vector>& point_set) ///< point set
{
point_set.add_normal_map();
bool out = CGAL::read_off_points
bool out = CGAL::read_OFF
(stream,
point_set.index_back_inserter(),
CGAL::parameters::point_map(point_set.point_push_map()).
@ -279,12 +284,12 @@ read_off_point_set(
/// \cond SKIP_IN_MANUAL
template <typename Point, typename Vector>
bool
read_ply_point_set(
read_PLY(
std::istream& stream, ///< input stream.
CGAL::Point_set_3<Point, Vector>& point_set) ///< point set
{
std::string dummy;
return read_ply_point_set (stream, point_set, dummy);
return read_PLY (stream, point_set, dummy);
}
/// \endcond
@ -308,7 +313,7 @@ read_ply_point_set(
*/
template <typename Point, typename Vector>
bool
read_ply_point_set(
read_PLY(
std::istream& stream, ///< input stream.
CGAL::Point_set_3<Point, Vector>& point_set, ///< point set
std::string& comments) ///< PLY comments.
@ -374,7 +379,7 @@ read_ply_point_set(
*/
template <typename Point, typename Vector>
bool
write_ply_point_set(
write_PLY(
std::ostream& stream, ///< output stream.
const CGAL::Point_set_3<Point, Vector>& point_set, ///< point set.
const std::string& comments = std::string()) ///< PLY comments.
@ -598,7 +603,7 @@ namespace internal
*/
template <typename Point, typename Vector>
bool
read_las_point_set(
read_LAS(
std::istream& stream, ///< input stream.
CGAL::Point_set_3<Point, Vector>& point_set) ///< point set
{
@ -635,7 +640,7 @@ read_las_point_set(
Ushort_map I = point_set.template add_property_map<unsigned short>("I", 0).first;
bool okay
= read_las_points_with_properties
= read_LAS_with_properties
(stream, point_set.index_back_inserter(),
make_las_point_reader (point_set.point_push_map()),
std::make_pair (point_set.push_property_map (intensity), LAS_property::Intensity()),
@ -684,7 +689,7 @@ read_las_point_set(
*/
template <typename Point, typename Vector>
bool
write_las_point_set(
write_LAS(
std::ostream& stream, ///< output stream.
CGAL::Point_set_3<Point, Vector>& point_set) ///< point set
{
@ -810,7 +815,7 @@ write_las_point_set(
}
bool okay
= write_las_points_with_properties
= write_LAS
(stream, point_set,
make_las_point_writer (point_set.point_map()),
std::make_pair (intensity, LAS_property::Intensity()),
@ -861,17 +866,17 @@ write_las_point_set(
*/
template <typename Point, typename Vector>
bool
write_xyz_point_set(
write_XYZ(
std::ostream& stream, ///< output stream.
const CGAL::Point_set_3<Point, Vector>& point_set) ///< point set
{
if (point_set.has_normal_map())
return CGAL::write_xyz_points
return CGAL::write_XYZ
(stream, point_set,
CGAL::parameters::point_map(point_set.point_map()).
normal_map(point_set.normal_map()));
return CGAL::write_xyz_points
return CGAL::write_XYZ
(stream, point_set,
CGAL::parameters::point_map(point_set.point_map()));
}
@ -881,17 +886,17 @@ write_xyz_point_set(
*/
template <typename Point, typename Vector>
bool
write_off_point_set(
write_OFF(
std::ostream& stream, ///< output stream.
const CGAL::Point_set_3<Point, Vector>& point_set) ///< point set
{
if (point_set.has_normal_map())
return CGAL::write_off_points
return CGAL::write_OFF
(stream, point_set,
CGAL::parameters::point_map(point_set.point_map()).
normal_map(point_set.normal_map()));
return CGAL::write_off_points
return CGAL::write_OFF
(stream, point_set,
CGAL::parameters::point_map(point_set.point_map()));
}
@ -924,15 +929,15 @@ std::istream& operator>>(std::istream& is,
is.seekg(0);
if (line.find("OFF") == 0 || line.find("NOFF") == 0)
CGAL::read_off_point_set (is, ps);
CGAL::read_OFF (is, ps);
else if (line.find("ply") == 0)
CGAL::read_ply_point_set (is, ps);
CGAL::read_PLY (is, ps);
#ifdef CGAL_LINKED_WITH_LASLIB
else if (line.find("LASF") == 0)
CGAL::read_las_point_set (is, ps);
#endif // LAS
else
CGAL::read_xyz_point_set (is, ps);
CGAL::read_XYZ (is, ps);
return is;
}
@ -954,7 +959,147 @@ std::ostream& operator<<(std::ostream& os,
return os;
}
#ifndef CGAL_NO_DEPRECATED_CODE
/*!
\ingroup PkgPointSet3IO
@todo update version
\deprecated This function is deprecated since \cgal 5.1, `CGAL::read_OFF()` should be used instead.
*/
template <typename Point, typename Vector>
CGAL_DEPRECATED bool
read_off_point_set(
std::istream& stream, ///< input stream.
CGAL::Point_set_3<Point, Vector>& point_set) ///< point set
{
return read_OFF(stream, point_set);
}
/*!
\ingroup PkgPointSet3IO
@todo update version
\deprecated This function is deprecated since \cgal 5.1, `CGAL::read_XYZ()` should be used instead.
*/
template <typename Point, typename Vector>
CGAL_DEPRECATED bool
read_xyz_point_set(
std::istream& stream, ///< input stream.
CGAL::Point_set_3<Point, Vector>& point_set) ///< point set
{
return read_XYZ(stream, point_set);
}
/*!
\ingroup PkgPointSet3IO
@todo update version
\deprecated This function is deprecated since \cgal 5.1, `CGAL::read_PLY()` should be used instead.
Reads a point set with properties from an input stream in Ascii or
Binary PLY format.
- the operator reads the vertex `point` property;
- if three PLY properties `nx`, `ny` and `nz` with type `float`
or `double` are found, the normal map is added;
- if any other PLY property is found, a "[name]" property map is
added, where `[name]` is the name of the PLY property.
The `comments` parameter can be omitted. If provided, it will be
used to store the potential comments found in the PLY
header. Each line starting by "comment " in the header is
appended to the `comments` string (without the "comment " word).
*/
template <typename Point, typename Vector>
CGAL_DEPRECATED bool
read_ply_point_set(
std::istream& stream, ///< input stream.
CGAL::Point_set_3<Point, Vector>& point_set, ///< point set
std::string& comments) ///< PLY comments.
{
return read_PLY(stream, point_set, comments);
}
/// \cond SKIP_IN_MANUAL
template <typename Point, typename Vector>
CGAL_DEPRECATED bool
read_ply_point_set(
std::istream& stream, ///< input stream.
CGAL::Point_set_3<Point, Vector>& point_set) ///< point set
{
std::string dummy;
return read_PLY(stream, point_set, dummy);
}
/// \endcond
#if defined(CGAL_LINKED_WITH_LASLIB) || defined(DOXYGEN_RUNNING)
/*!
\ingroup PkgPointSet3IO
@todo update version
\deprecated This function is deprecated since \cgal 5.1, `CGAL::read_LAS()` should be used instead.
*/
template <typename Point, typename Vector>
CGAL_DEPRECATED bool
read_las_point_set(
std::istream& stream, ///< input stream.
CGAL::Point_set_3<Point, Vector>& point_set) ///< point set
{
return read_LAS(stream, point_set);
}
/*!
\ingroup PkgPointSet3IO
@todo update version
\deprecated This function is deprecated since \cgal 5.1, `CGAL::write_OFF()` should be used instead.
*/
template <typename Point, typename Vector>
CGAL_DEPRECATED bool
write_las_point_set(
std::ostream& stream, ///< output stream.
CGAL::Point_set_3<Point, Vector>& point_set) ///< point set
{
return write_LAS(stram, point_set);
}
#endif
/*!
\ingroup PkgPointSet3IO
@todo update version
\deprecated This function is deprecated since \cgal 5.1, `CGAL::write_OFF()` should be used instead.
*/
template <typename Point, typename Vector>
CGAL_DEPRECATED bool
write_off_point_set(
std::ostream& stream, ///< output stream.
const CGAL::Point_set_3<Point, Vector>& point_set) ///< point set
{
return write_OFF(stream, point_set);
}
/*!
\ingroup PkgPointSet3IO
@todo update version
\deprecated This function is deprecated since \cgal 5.1, `CGAL::write_XYZ()` should be used instead.
*/
template <typename Point, typename Vector>
CGAL_DEPRECATED bool
write_xyz_point_set(
std::ostream& stream,
const CGAL::Point_set_3<Point, Vector>& point_set)
{
return write_XYZ(stream, point_set);
}
/*!
\ingroup PkgPointSet3IO
@todo update version
\deprecated This function is deprecated since \cgal 5.1, `CGAL::write_PLY()` should be used instead.
*/
template <typename Point, typename Vector>
CGAL_DEPRECATED bool
write_ply_point_set(
std::ostream& stream,
const CGAL::Point_set_3<Point, Vector>& point_set,
const std::string& comments = std::string())
{
return write_PLY(stream, point_set, comments);
}
#endif //CGAL_NO_DEPRECATED_CODE
} // namespace CGAL

View File

@ -37,7 +37,7 @@ int main (int, char**)
test (point_set.has_normal_map(), "point set should have normals.");
std::ifstream f ("data/oni.pwn");
CGAL::read_xyz_point_set(f, point_set);
CGAL::read_XYZ(f, point_set);
f.close ();

View File

@ -28,7 +28,7 @@ int main(int argc, char*argv[])
std::vector<IndexedPointWithColorTuple> points;
std::ifstream stream(fname);
if (!stream ||
!CGAL::read_xyz_points(
!CGAL::read_XYZ(
stream, std::back_inserter(points),
CGAL::parameters::point_map(CGAL::Nth_of_tuple_property_map<1,IndexedPointWithColorTuple>())))
{

View File

@ -28,7 +28,7 @@ int main(int argc, char*argv[])
std::vector<PointVectorPair> points;
std::ifstream stream(input_filename);
if (!stream ||
!CGAL::read_xyz_points(stream,
!CGAL::read_XYZ(stream,
std::back_inserter(points),
CGAL::parameters::point_map(CGAL::First_of_pair_property_map<PointVectorPair>()).
normal_map(CGAL::Second_of_pair_property_map<PointVectorPair>())))
@ -59,7 +59,7 @@ int main(int argc, char*argv[])
std::ofstream out(output_filename);
out.precision(17);
if (!out ||
!CGAL::write_xyz_points(
!CGAL::write_XYZ(
out, points,
CGAL::parameters::point_map(CGAL::First_of_pair_property_map<PointVectorPair>()).
normal_map(CGAL::Second_of_pair_property_map<PointVectorPair>())))

View File

@ -28,7 +28,7 @@ int main(int argc, char* argv[])
std::ifstream stream(input_filename);
if (!stream ||
!CGAL::read_xyz_points(stream,
!CGAL::read_XYZ(stream,
std::back_inserter(points),
CGAL::parameters::point_map(CGAL::First_of_pair_property_map<PointVectorPair>()).
normal_map(CGAL::Second_of_pair_property_map<PointVectorPair>())))
@ -58,7 +58,7 @@ int main(int argc, char* argv[])
std::ofstream out(output_filename);
out.precision(17);
if (!out ||
!CGAL::write_xyz_points(
!CGAL::write_XYZ(
out, points,
CGAL::parameters::point_map(CGAL::First_of_pair_property_map<PointVectorPair>()).
normal_map(CGAL::Second_of_pair_property_map<PointVectorPair>())))

View File

@ -24,7 +24,7 @@ int main (int , char**) {
std::list<PointVectorPair> points;
std::ifstream stream("data/fandisk.off");
if (!stream ||
!CGAL::read_off_points(stream,
!CGAL::read_OFF(stream,
std::back_inserter(points),
CGAL::parameters::point_map(CGAL::First_of_pair_property_map<PointVectorPair>())))
{

View File

@ -16,7 +16,7 @@ int main(int argc, char*argv[])
const char* fname = (argc>1)?argv[1]:"data/oni.xyz";
std::ifstream stream(fname);
if (!stream ||
!CGAL::read_xyz_points(stream, std::back_inserter(points)))
!CGAL::read_XYZ(stream, std::back_inserter(points)))
{
std::cerr << "Error: cannot read file " << fname << std::endl;
return EXIT_FAILURE;

View File

@ -19,7 +19,7 @@ int main(int argc, char*argv[])
const char* fname = (argc>1)?argv[1]:"data/oni.xyz";
std::ifstream stream(fname);
if (!stream ||
!CGAL::read_xyz_points(stream, std::back_inserter(points)))
!CGAL::read_XYZ(stream, std::back_inserter(points)))
{
std::cerr << "Error: cannot read file " << fname << std::endl;
return EXIT_FAILURE;
@ -42,7 +42,7 @@ int main(int argc, char*argv[])
std::ofstream f ("out.xyz");
f.precision(17);
CGAL::write_xyz_points (f, points);
CGAL::write_XYZ (f, points);
return EXIT_SUCCESS;
}

View File

@ -254,7 +254,7 @@ int main(int argc, char * argv[])
{
std::ifstream stream(input_filename.c_str());
success = stream &&
CGAL::read_off_points(stream,
CGAL::read_OFF(stream,
std::back_inserter(points),
CGAL::parameters::point_map(CGAL::First_of_pair_property_map<PointVectorPair>()));
}
@ -264,7 +264,7 @@ int main(int argc, char * argv[])
{
std::ifstream stream(input_filename.c_str());
success = stream &&
CGAL::read_xyz_points(stream,
CGAL::read_XYZ(stream,
std::back_inserter(points),
CGAL::parameters::point_map(CGAL::First_of_pair_property_map<PointVectorPair>()));
}
@ -321,7 +321,7 @@ int main(int argc, char * argv[])
std::ofstream stream(output_filename.c_str());
stream.precision(17);
if (!stream ||
!CGAL::write_xyz_points(stream,
!CGAL::write_XYZ(stream,
points,
CGAL::parameters::point_map(CGAL::First_of_pair_property_map<PointVectorPair>()).
normal_map(CGAL::Second_of_pair_property_map<PointVectorPair>())))

View File

@ -27,7 +27,7 @@ int main(int argc, char*argv[])
std::list<PointVectorPair> points;
std::ifstream stream(fname);
if (!stream ||
!CGAL::read_xyz_points(stream,
!CGAL::read_XYZ(stream,
std::back_inserter(points),
CGAL::parameters::point_map(CGAL::First_of_pair_property_map<PointVectorPair>())))
{

View File

@ -18,7 +18,7 @@ int main(int argc, char*argv[])
std::vector<Point> points;
std::ifstream stream(fname);
if (!stream ||
!CGAL::read_xyz_points(stream, std::back_inserter(points)))
!CGAL::read_XYZ(stream, std::back_inserter(points)))
{
std::cerr << "Error: cannot read file " << fname << std::endl;
return EXIT_FAILURE;
@ -36,7 +36,7 @@ int main(int argc, char*argv[])
std::ofstream out((argc>2)?argv[2]:"Three_lady_copy.xyz");
out.precision(17);
if (!out ||
!CGAL::write_xyz_points(
!CGAL::write_XYZ(
out, points))
{
return EXIT_FAILURE;

View File

@ -22,7 +22,7 @@ int main(int argc, char*argv[])
std::ifstream in(fname, std::ios_base::binary);
if (!in ||
!CGAL::read_las_points_with_properties
!CGAL::read_LAS_with_properties
(in,
std::back_inserter (points),
CGAL::make_las_point_reader (CGAL::First_of_pair_property_map<PointWithColor>()),

View File

@ -29,7 +29,7 @@ int main(int argc, char*argv[])
std::ifstream in(fname);
if (!in ||
!CGAL::read_ply_points_with_properties
!CGAL::read_PLY_with_properties
(in,
std::back_inserter (points),
CGAL::make_ply_point_reader (Point_map()),

View File

@ -20,13 +20,13 @@ int main(int argc, char*argv[])
{
const char* fname = (argc>1)?argv[1]:"data/oni.xyz";
// Reads a .xyz point set file in points[].
// Note: read_xyz_points() requires an output iterator
// Note: read_XYZ() requires an output iterator
// over points and as well as property maps to access each
// point position and normal.
std::vector<Pwn> points;
std::ifstream in(fname);
if (!in ||
!CGAL::read_xyz_points(
!CGAL::read_XYZ(
in,std::back_inserter(points),
CGAL::parameters::point_map (CGAL::First_of_pair_property_map<Pwn>()).
normal_map (CGAL::Second_of_pair_property_map<Pwn>())))
@ -41,7 +41,7 @@ int main(int argc, char*argv[])
std::ofstream out("oni_copy.xyz");
out.precision(17);
if (!out ||
!CGAL::write_xyz_points(
!CGAL::write_XYZ(
out, points,
CGAL::parameters::point_map(CGAL::First_of_pair_property_map<Pwn>()).
normal_map(CGAL::Second_of_pair_property_map<Pwn>())))

View File

@ -27,7 +27,7 @@ int main(int argc, const char** argv)
std::vector<Pwn> pwns1, pwns2;
std::ifstream input(fname1);
if (!input ||
!CGAL::read_ply_points(input, std::back_inserter(pwns1),
!CGAL::read_PLY_points(input, std::back_inserter(pwns1),
CGAL::parameters::point_map (CGAL::First_of_pair_property_map<Pwn>()).
normal_map (Normal_map())))
{
@ -38,7 +38,7 @@ int main(int argc, const char** argv)
input.open(fname2);
if (!input ||
!CGAL::read_ply_points(input, std::back_inserter(pwns2),
!CGAL::read_PLY_points(input, std::back_inserter(pwns2),
CGAL::parameters::point_map (Point_map()).
normal_map (Normal_map())))
{
@ -71,7 +71,7 @@ int main(int argc, const char** argv)
std::ofstream out("pwns2_aligned.ply");
if (!out ||
!CGAL::write_ply_points(
!CGAL::write_PLY(
out, pwns2,
CGAL::parameters::point_map(Point_map()).
normal_map(Normal_map())))

View File

@ -30,7 +30,7 @@ int main(int argc, const char** argv)
std::vector<Pwn> pwns1, pwns2;
std::ifstream input(fname1);
if (!input ||
!CGAL::read_ply_points(input, std::back_inserter(pwns1),
!CGAL::read_PLY_points(input, std::back_inserter(pwns1),
CGAL::parameters::point_map (CGAL::First_of_pair_property_map<Pwn>()).
normal_map (Normal_map())))
{
@ -41,7 +41,7 @@ int main(int argc, const char** argv)
input.open(fname2);
if (!input ||
!CGAL::read_ply_points(input, std::back_inserter(pwns2),
!CGAL::read_PLY_points(input, std::back_inserter(pwns2),
CGAL::parameters::point_map (Point_map()).
normal_map (Normal_map())))
{
@ -73,7 +73,7 @@ int main(int argc, const char** argv)
std::ofstream out("pwns2_aligned.ply");
if (!out ||
!CGAL::write_ply_points(
!CGAL::write_PLY(
out, pwns2,
CGAL::parameters::point_map(Point_map()).
normal_map(Normal_map())))

View File

@ -30,7 +30,7 @@ int main(int argc, const char** argv)
std::vector<Pwn> pwns1, pwns2;
std::ifstream input(fname1);
if (!input ||
!CGAL::read_ply_points(input, std::back_inserter(pwns1),
!CGAL::read_PLY(input, std::back_inserter(pwns1),
CGAL::parameters::point_map (CGAL::First_of_pair_property_map<Pwn>()).
normal_map (Normal_map())))
{
@ -41,7 +41,7 @@ int main(int argc, const char** argv)
input.open(fname2);
if (!input ||
!CGAL::read_ply_points(input, std::back_inserter(pwns2),
!CGAL::read_PLY(input, std::back_inserter(pwns2),
CGAL::parameters::point_map (Point_map()).
normal_map (Normal_map())))
{
@ -143,7 +143,7 @@ int main(int argc, const char** argv)
std::ofstream out("pwns2_aligned.ply");
if (!out ||
!CGAL::write_ply_points(
!CGAL::write_PLY(
out, pwns2,
CGAL::parameters::point_map(Point_map()).
normal_map(Normal_map())))

View File

@ -20,7 +20,7 @@ int main(int argc, char*argv[])
std::vector<Point> points;
std::ifstream stream(fname);
if (!stream ||
!CGAL::read_xyz_points(stream, std::back_inserter(points),
!CGAL::read_XYZ(stream, std::back_inserter(points),
CGAL::parameters::point_map(CGAL::Identity_property_map<Point>())))
{
std::cerr << "Error: cannot read file " << fname << std::endl;

View File

@ -31,7 +31,7 @@ int main (int argc, char** argv)
// read input
if (!(stream
&& CGAL::read_xyz_points(stream, std::back_inserter(points))))
&& CGAL::read_XYZ(stream, std::back_inserter(points))))
{
std::cerr << "Error: can't read input file" << std::endl;
return EXIT_FAILURE;

View File

@ -33,7 +33,7 @@ int main (int argc, char** argv)
std::ifstream stream(argc>1 ? argv[1] : "data/cube.pwn");
if (!stream ||
!CGAL::read_xyz_points(stream,
!CGAL::read_XYZ(stream,
std::back_inserter(points),
CGAL::parameters::point_map(Point_map()).
normal_map(Normal_map())))
@ -67,7 +67,7 @@ int main (int argc, char** argv)
<< " structured point(s) generated." << std::endl;
std::ofstream out ("out.pwn");
CGAL::write_xyz_points (out, structured_pts,
CGAL::write_XYZ (out, structured_pts,
CGAL::parameters::point_map(Point_map()).normal_map(Normal_map()));
out.close();

View File

@ -23,7 +23,7 @@ int main(int argc, char** argv)
std::vector<Point> points;
std::ifstream stream(input_filename);
if (!stream || !CGAL::read_xyz_points(stream, std::back_inserter(points)))
if (!stream || !CGAL::read_XYZ(stream, std::back_inserter(points)))
{
std::cerr << "Error: cannot read file " << input_filename << std::endl;
@ -43,7 +43,7 @@ int main(int argc, char** argv)
std::ofstream out(output_filename);
out.precision(17);
if (!out || !CGAL::write_xyz_points(
if (!out || !CGAL::write_XYZ(
out, output))
{
return EXIT_FAILURE;

View File

@ -54,7 +54,7 @@ int main(int, char**)
std::ofstream f("out.ply", std::ios::binary);
CGAL::set_binary_mode(f); // The PLY file will be written in the binary format
CGAL::write_ply_points_with_properties
CGAL::write_PLY_with_properties
(f, points,
CGAL::make_ply_point_writer (Point_map()),
std::make_tuple(Color_map(),

View File

@ -128,7 +128,7 @@ namespace CGAL {
constructed from the input the using 3 %LAS properties
`LAS_property::X`, `LAS_property::Y` and `LAS_property::Z`.
\sa `read_las_points_with_properties()`
\sa `read_LAS_with_properties()`
\tparam PointMap the property map used to store points.
*/
@ -376,7 +376,7 @@ namespace internal {
template <typename OutputIteratorValueType,
typename OutputIterator,
typename ... PropertyHandler>
bool read_las_points_with_properties (std::istream& stream,
bool read_LAS_with_properties (std::istream& stream,
OutputIterator output,
PropertyHandler&& ... properties)
{
@ -405,13 +405,13 @@ bool read_las_points_with_properties (std::istream& stream,
/// \cond SKIP_IN_MANUAL
template <typename OutputIterator,
typename ... PropertyHandler>
bool read_las_points_with_properties (std::istream& stream,
bool read_LAS_with_properties (std::istream& stream,
OutputIterator output,
PropertyHandler&& ... properties)
{
typedef typename value_type_traits<OutputIterator>::type OutputValueType;
return read_las_points_with_properties<OutputValueType>
return read_LAS_with_properties<OutputValueType>
(stream, output, std::forward<PropertyHandler>(properties)...);
}
/// \endcond
@ -448,7 +448,7 @@ template < typename OutputIteratorValueType,
typename CGAL_BGL_NP_TEMPLATE_PARAMETERS
#endif
>
bool read_las_points(std::istream& stream,
bool read_LAS(std::istream& stream,
OutputIterator output,
#ifdef DOXYGEN_RUNNING
const NamedParameters& np)
@ -464,7 +464,7 @@ bool read_las_points(std::istream& stream,
typedef typename CGAL::GetPointMap<PointRange, CGAL_BGL_NP_CLASS>::type PointMap;
PointMap point_map = choose_parameter<PointMap>(get_parameter(np, internal_np::point_map));
return read_las_points_with_properties (stream, output,
return read_LAS_with_properties (stream, output,
make_las_point_reader (point_map));
}
@ -473,11 +473,11 @@ bool read_las_points(std::istream& stream,
template <typename OutputIteratorValueType,
typename OutputIterator>
bool
read_las_points(
read_LAS(
std::istream& stream, ///< input stream.
OutputIterator output) ///< output iterator over points.
{
return read_las_points<OutputIteratorValueType>
return read_LAS<OutputIteratorValueType>
(stream, output, CGAL::parameters::all_default());
}
@ -485,23 +485,23 @@ read_las_points(
template <typename OutputIterator,
typename CGAL_BGL_NP_TEMPLATE_PARAMETERS>
bool
read_las_points(
read_LAS(
std::istream& stream, ///< input stream.
OutputIterator output,
const CGAL_BGL_NP_CLASS& np)
{
return read_las_points<typename value_type_traits<OutputIterator>::type>
return read_LAS<typename value_type_traits<OutputIterator>::type>
(stream, output, np);
}
// variant with default NP and output iterator value type
template <typename OutputIterator>
bool
read_las_points(
read_LAS(
std::istream& stream, ///< input stream.
OutputIterator output)
{
return read_las_points<typename value_type_traits<OutputIterator>::type>
return read_LAS<typename value_type_traits<OutputIterator>::type>
(stream, output, CGAL::parameters::all_default());
}
@ -536,6 +536,109 @@ bool read_las_points(std::istream& stream, ///< input stream.
/// \endcond
#ifndef CGAL_NO_DEPRECATED_CODE
/**
\ingroup PkgPointSetProcessing3IOLas
@todo update version
\deprecated This function is deprecated since \cgal 5.1, `CGAL::read_LAS_with_properties()` should be used instead.
*/
template <typename OutputIteratorValueType,
typename OutputIterator,
typename ... PropertyHandler>
CGAL_DEPRECATED bool read_las_points_with_properties (std::istream& stream,
OutputIterator output,
PropertyHandler&& ... properties)
{
return read_LAS(stream, output, std::forward<PropertyHandler>(properties)...);
}
/// \cond SKIP_IN_MANUAL
template <typename OutputIterator,
typename ... PropertyHandler>
CGAL_DEPRECATED bool read_las_points_with_properties (std::istream& stream,
OutputIterator output,
PropertyHandler&& ... properties)
{
typedef typename value_type_traits<OutputIterator>::type OutputValueType;
return read_LAS<OutputValueType>
(stream, output, std::forward<PropertyHandler>(properties)...);
}
/// \endcond
/**
\ingroup PkgPointSetProcessing3IOLas
@todo update version
\deprecated This function is deprecated since \cgal 5.1, `CGAL::read_LAS()` should be used instead.
*/
template < typename OutputIteratorValueType,
typename OutputIterator,
#ifdef DOXYGEN_RUNNING
typename NamedParameters
#else
typename CGAL_BGL_NP_TEMPLATE_PARAMETERS
#endif
>
CGAL_DEPRECATED bool read_las_points(std::istream& stream,
OutputIterator output,
#ifdef DOXYGEN_RUNNING
const NamedParameters& np)
#else
const CGAL_BGL_NP_CLASS& np)
#endif
{
using parameters::choose_parameter;
using parameters::get_parameter;
typedef Point_set_processing_3::Fake_point_range<OutputIteratorValueType> PointRange;
typedef typename CGAL::GetPointMap<PointRange, CGAL_BGL_NP_CLASS>::type PointMap;
PointMap point_map = choose_parameter<PointMap>(get_parameter(np, internal_np::point_map));
return read_LAS (stream, output,
make_las_point_reader (point_map));
}
/// \cond SKIP_IN_MANUAL
// variant with default NP
template <typename OutputIteratorValueType,
typename OutputIterator>
CGAL_DEPRECATED bool
read_las_points(
std::istream& stream, ///< input stream.
OutputIterator output) ///< output iterator over points.
{
return read_LAS<OutputIteratorValueType>
(stream, output, CGAL::parameters::all_default());
}
// variant with default output iterator value type
template <typename OutputIterator,
typename CGAL_BGL_NP_TEMPLATE_PARAMETERS>
CGAL_DEPRECATED bool
read_las_points(
std::istream& stream, ///< input stream.
OutputIterator output,
const CGAL_BGL_NP_CLASS& np)
{
return read_LAS<typename value_type_traits<OutputIterator>::type>
(stream, output, np);
}
// variant with default NP and output iterator value type
template <typename OutputIterator>
CGAL_DEPRECATED bool
read_las_points(
std::istream& stream, ///< input stream.
OutputIterator output)
{
return read_LAS<typename value_type_traits<OutputIterator>::type>
(stream, output, CGAL::parameters::all_default());
}
#endif // CGAL_NO_DEPRECATED_CODE
} //namespace CGAL
#endif // CGAL_READ_LAS_POINTS_H

View File

@ -67,7 +67,7 @@ template <typename OutputIteratorValueType,
#endif
>
bool
read_off_points(
read_OFF(
std::istream& stream,
OutputIterator output,
#ifdef DOXYGEN_RUNNING
@ -186,11 +186,11 @@ read_off_points(
template <typename OutputIteratorValueType,
typename OutputIterator>
bool
read_off_points(
read_OFF(
std::istream& stream, ///< input stream.
OutputIterator output) ///< output iterator over points.
{
return read_off_points<OutputIteratorValueType>
return read_OFF<OutputIteratorValueType>
(stream, output, CGAL::parameters::all_default());
}
@ -198,23 +198,23 @@ read_off_points(
template <typename OutputIterator,
typename CGAL_BGL_NP_TEMPLATE_PARAMETERS>
bool
read_off_points(
read_OFF(
std::istream& stream, ///< input stream.
OutputIterator output,
const CGAL_BGL_NP_CLASS& np)
{
return read_off_points<typename value_type_traits<OutputIterator>::type>
return read_OFF<typename value_type_traits<OutputIterator>::type>
(stream, output, np);
}
// variant with default NP and output iterator value type
template <typename OutputIterator>
bool
read_off_points(
read_OFF(
std::istream& stream, ///< input stream.
OutputIterator output)
{
return read_off_points<typename value_type_traits<OutputIterator>::type>
return read_OFF<typename value_type_traits<OutputIterator>::type>
(stream, output, CGAL::parameters::all_default());
}
@ -235,7 +235,7 @@ read_off_points_and_normals(
NormalPMap normal_map, ///< property map: value_type of OutputIterator -> Vector_3.
const Kernel& /*kernel*/) ///< geometric traits.
{
return read_off_points<OutputIteratorValueType>
return read_OFF<OutputIteratorValueType>
(stream, output,
CGAL::parameters::point_map (point_map).
normal_map (normal_map).
@ -257,7 +257,7 @@ read_off_points_and_normals(
NormalPMap normal_map, ///< property map: value_type of OutputIterator -> Vector_3.
const Kernel& kernel) ///< geometric traits.
{
return read_off_points<typename value_type_traits<OutputIterator>::type>
return read_OFF<typename value_type_traits<OutputIterator>::type>
(stream, output,
CGAL::parameters::point_map (point_map).
normal_map (normal_map).
@ -278,7 +278,7 @@ read_off_points_and_normals(
PointPMap point_map, ///< property map: value_type of OutputIterator -> Point_3.
NormalPMap normal_map) ///< property map: value_type of OutputIterator -> Vector_3.
{
return read_off_points<OutputIteratorValueType>
return read_OFF<OutputIteratorValueType>
(stream, output,
CGAL::parameters::point_map (point_map).
normal_map (normal_map));
@ -297,7 +297,7 @@ read_off_points_and_normals(
PointPMap point_map, ///< property map: value_type of OutputIterator -> Point_3.
NormalPMap normal_map) ///< property map: value_type of OutputIterator -> Vector_3.
{
return read_off_points<typename value_type_traits<OutputIterator>::type>
return read_OFF<typename value_type_traits<OutputIterator>::type>
(stream, output,
CGAL::parameters::point_map (point_map).
normal_map (normal_map));
@ -315,7 +315,7 @@ read_off_points_and_normals(
OutputIterator output, ///< output iterator over points.
NormalPMap normal_map) ///< property map: value_type of OutputIterator -> Vector_3.
{
return read_off_points<OutputIteratorValueType>
return read_OFF<OutputIteratorValueType>
(stream, output,
CGAL::parameters::normal_map (normal_map));
}
@ -331,7 +331,7 @@ read_off_points_and_normals(
OutputIterator output, ///< output iterator over points.
NormalPMap normal_map) ///< property map: value_type of OutputIterator -> Vector_3.
{
return read_off_points<typename value_type_traits<OutputIterator>::type>
return read_OFF<typename value_type_traits<OutputIterator>::type>
(stream, output,
CGAL::parameters::normal_map (normal_map));
}
@ -411,6 +411,67 @@ read_off_points(
/// \endcond
#ifndef CGAL_NO_DEPRECATED_CODE
/*!
/**
\ingroup PkgPointSetProcessing3IO
@todo update version
\deprecated This function is deprecated since \cgal 5.1, `CGAL::read_OFF()` should be used instead.
*/
template <typename OutputIteratorValueType,
typename OutputIterator,
#ifdef DOXYGEN_RUNNING
typename NamedParameters
#else
typename CGAL_BGL_NP_TEMPLATE_PARAMETERS
#endif
>
CGAL_DEPRECATED bool
read_off_points(
std::istream& stream,
OutputIterator output,
#ifdef DOXYGEN_RUNNING
const NamedParameters& np)
#else
const CGAL_BGL_NP_CLASS& np)
#endif
{
return read_OFF(stream, output, np);
}
template <typename OutputIteratorValueType,
typename OutputIterator>
CGAL_DEPRECATED bool
read_off_points(
std::istream& stream, ///< input stream.
OutputIterator output) ///< output iterator over points.
{
return read_OFF(stream, output);
}
// variant with default output iterator value type
template <typename OutputIterator,
typename CGAL_BGL_NP_TEMPLATE_PARAMETERS>
CGAL_DEPRECATED bool
read_off_points(
std::istream& stream, ///< input stream.
OutputIterator output,
const CGAL_BGL_NP_CLASS& np)
{
return read_OFF(stream, output, np);
}
// variant with default NP and output iterator value type
template <typename OutputIterator>
CGAL_DEPRECATED bool
read_off_points(
std::istream& stream, ///< input stream.
OutputIterator output)
{
return read_OFF(stream, output, CGAL::parameters::all_default());
}
#endif //CGAL_NO_DEPRECATED_CODE
} //namespace CGAL
#endif // CGAL_READ_OFF_POINTS_H

View File

@ -43,7 +43,7 @@ namespace CGAL {
Class used to identify a %PLY property as a type and a name.
\sa `read_ply_points_with_properties()`
\sa `read_PLY_with_properties()`
*/
template <typename T>
struct PLY_property
@ -61,7 +61,7 @@ namespace CGAL {
and named `x`, `y` and `z`. `FT` is `float` if the points use
`CGAL::Simple_cartesian<float>` and `double` otherwise.
\sa `read_ply_points_with_properties()`
\sa `read_PLY_with_properties()`
\tparam PointMap the property map used to store points.
*/
@ -80,7 +80,7 @@ namespace CGAL {
is `float` if the points use `CGAL::Simple_cartesian<float>` and
`double` otherwise.
\sa `read_ply_points_with_properties()`
\sa `read_PLY_with_properties()`
\tparam VectorMap the property map used to store vectors.
*/
@ -128,7 +128,7 @@ namespace CGAL {
template <typename OutputIteratorValueType,
typename OutputIterator,
typename ... PropertyHandler>
bool read_ply_points_with_properties (std::istream& stream,
bool read_PLY_with_properties (std::istream& stream,
OutputIterator output,
PropertyHandler&& ... properties)
{
@ -178,13 +178,13 @@ bool read_ply_points_with_properties (std::istream& stream,
/// \cond SKIP_IN_MANUAL
template <typename OutputIterator,
typename ... PropertyHandler>
bool read_ply_points_with_properties (std::istream& stream,
bool read_PLY_with_properties (std::istream& stream,
OutputIterator output,
PropertyHandler&& ... properties)
{
typedef typename value_type_traits<OutputIterator>::type OutputValueType;
return read_ply_points_with_properties<OutputValueType>
return read_PLY_with_properties<OutputValueType>
(stream, output, std::forward<PropertyHandler>(properties)...);
}
/// \endcond
@ -224,7 +224,7 @@ template < typename OutputIteratorValueType,
typename CGAL_BGL_NP_TEMPLATE_PARAMETERS
#endif
>
bool read_ply_points(std::istream& stream,
bool read_PLY(std::istream& stream,
OutputIterator output,
#ifdef DOXYGEN_RUNNING
const NamedParameters& np)
@ -248,11 +248,11 @@ bool read_ply_points(std::istream& stream,
NormalMap normal_map = choose_parameter<NormalMap>(get_parameter(np, internal_np::normal_map));
if (has_normals)
return read_ply_points_with_properties (stream, output,
return read_PLY_with_properties (stream, output,
make_ply_point_reader (point_map),
make_ply_normal_reader (normal_map));
// else
return read_ply_points_with_properties (stream, output,
return read_PLY_with_properties (stream, output,
make_ply_point_reader (point_map));
}
@ -262,11 +262,11 @@ bool read_ply_points(std::istream& stream,
template <typename OutputIteratorValueType,
typename OutputIterator>
bool
read_ply_points(
read_PLY(
std::istream& stream, ///< input stream.
OutputIterator output) ///< output iterator over points.
{
return read_ply_points<OutputIteratorValueType>
return read_PLY<OutputIteratorValueType>
(stream, output, CGAL::parameters::all_default());
}
@ -274,23 +274,23 @@ read_ply_points(
template <typename OutputIterator,
typename CGAL_BGL_NP_TEMPLATE_PARAMETERS>
bool
read_ply_points(
read_PLY(
std::istream& stream, ///< input stream.
OutputIterator output,
const CGAL_BGL_NP_CLASS& np)
{
return read_ply_points<typename value_type_traits<OutputIterator>::type>
return read_PLY<typename value_type_traits<OutputIterator>::type>
(stream, output, np);
}
// variant with default NP and output iterator value type
template <typename OutputIterator>
bool
read_ply_points(
read_PLY(
std::istream& stream, ///< input stream.
OutputIterator output)
{
return read_ply_points<typename value_type_traits<OutputIterator>::type>
return read_PLY<typename value_type_traits<OutputIterator>::type>
(stream, output, CGAL::parameters::all_default());
}
@ -306,7 +306,7 @@ bool read_ply_points_and_normals(std::istream& stream, ///< input stream.
PointMap point_map, ///< property map: value_type of OutputIterator -> Point_3.
NormalMap normal_map) ///< property map: value_type of OutputIterator -> Vector_3.
{
return read_ply_points<OutputIteratorValueType>
return read_PLY<OutputIteratorValueType>
(stream, output,
CGAL::parameters::point_map (point_map).
normal_map (normal_map));
@ -322,7 +322,7 @@ bool read_ply_points_and_normals(std::istream& stream, ///< input stream.
PointMap point_map, ///< property map: value_type of OutputIterator -> Point_3.
NormalMap normal_map) ///< property map: value_type of OutputIterator -> Vector_3.
{
return read_ply_points<typename value_type_traits<OutputIterator>::type>
return read_PLY<typename value_type_traits<OutputIterator>::type>
(stream, output,
CGAL::parameters::point_map (point_map).
normal_map (normal_map));
@ -337,7 +337,7 @@ bool read_ply_points_and_normals(std::istream& stream, ///< input stream.
OutputIterator output, ///< output iterator over points.
NormalMap normal_map) ///< property map: value_type of OutputIterator -> Vector_3.
{
return read_ply_points<OutputIteratorValueType>
return read_PLY<OutputIteratorValueType>
(stream, output,
CGAL::parameters::normal_map (normal_map));
}
@ -350,7 +350,7 @@ bool read_ply_points_and_normals(std::istream& stream, ///< input stream.
OutputIterator output, ///< output iterator over points.
NormalMap normal_map) ///< property map: value_type of OutputIterator -> Vector_3.
{
return read_ply_points<typename value_type_traits<OutputIterator>::type>
return read_PLY<typename value_type_traits<OutputIterator>::type>
(stream, output,
CGAL::parameters::normal_map (normal_map));
}
@ -367,7 +367,7 @@ read_ply_points(
OutputIterator output, ///< output iterator over points.
PointMap point_map) ///< property map: value_type of OutputIterator -> Point_3.
{
return read_ply_points<OutputIteratorValueType>
return read_PLY<OutputIteratorValueType>
(stream, output,
CGAL::parameters::point_map (point_map));
}
@ -380,14 +380,106 @@ bool read_ply_points(std::istream& stream, ///< input stream.
OutputIterator output, ///< output iterator over points.
PointMap point_map) ///< property map: value_type of OutputIterator -> Point_3.
{
return read_ply_points<typename value_type_traits<OutputIterator>::type>
return read_PLY<typename value_type_traits<OutputIterator>::type>
(stream, output,
CGAL::parameters::point_map (point_map));
}
#endif // CGAL_NO_DEPRECATED_CODE
/// \endcond
#ifndef CGAL_NO_DEPRECATED_CODE
/**
\ingroup PkgPointSetProcessingIOPly
@todo update version
\deprecated This function is deprecated since \cgal 5.1, `CGAL::read_PLY_with_properties()` should be used instead.
*/
template <typename OutputIteratorValueType,
typename OutputIterator,
typename ... PropertyHandler>
CGAL_DEPRECATED bool
read_ply_points_with_properties (std::istream& stream,
OutputIterator output,
PropertyHandler&& ... properties)
{
return read_PLY(stream, output, std::forward<PropertyHandler>(properties)...);
}
/**
\ingroup PkgPointSetProcessingIOPly
@todo update version
\deprecated This function is deprecated since \cgal 5.1, `CGAL::read_PLY()` should be used instead.
*/
template < typename OutputIteratorValueType,
typename OutputIterator,
#ifdef DOXYGEN_RUNNING
typename NamedParameters
#else
typename CGAL_BGL_NP_TEMPLATE_PARAMETERS
#endif
>
CGAL_DEPRECATED bool
read_ply_points(std::istream& stream,
OutputIterator output,
#ifdef DOXYGEN_RUNNING
const NamedParameters& np)
#else
const CGAL_BGL_NP_CLASS& np)
#endif
{
return read_PLY(stream, output, np);
}
/// \cond SKIP_IN_MANUAL
template <typename OutputIterator,
typename ... PropertyHandler>
CGAL_DEPRECATED bool
read_ply_points_with_properties (std::istream& stream,
OutputIterator output,
PropertyHandler&& ... properties)
{
typedef typename value_type_traits<OutputIterator>::type OutputValueType;
return read_PLY<OutputValueType>
(stream, output, std::forward<PropertyHandler>(properties)...);
}
template <typename OutputIteratorValueType,
typename OutputIterator>
CGAL_DEPRECATED bool
read_ply_points(
std::istream& stream, ///< input stream.
OutputIterator output) ///< output iterator over points.
{
return read_PLY<OutputIteratorValueType>
(stream, output, CGAL::parameters::all_default());
}
// variant with default output iterator value type
template <typename OutputIterator,
typename CGAL_BGL_NP_TEMPLATE_PARAMETERS>
CGAL_DEPRECATED bool
read_ply_points(
std::istream& stream, ///< input stream.
OutputIterator output,
const CGAL_BGL_NP_CLASS& np)
{
return read_PLY<typename value_type_traits<OutputIterator>::type>
(stream, output, np);
}
// variant with default NP and output iterator value type
template <typename OutputIterator>
CGAL_DEPRECATED bool
read_ply_points(
std::istream& stream, ///< input stream.
OutputIterator output)
{
return read_PLY<typename value_type_traits<OutputIterator>::type>
(stream, output, CGAL::parameters::all_default());
}
/// \endcond
#endif // CGAL_NO_DEPRECATED_CODE
} //namespace CGAL
#undef TRY_TO_GENERATE_POINT_PROPERTY

View File

@ -66,7 +66,7 @@ template <typename OutputIteratorValueType,
#endif
>
bool
read_xyz_points(
read_XYZ(
std::istream& stream,
OutputIterator output,
#ifdef DOXYGEN_RUNNING
@ -178,11 +178,11 @@ read_xyz_points(
template <typename OutputIteratorValueType,
typename OutputIterator>
bool
read_xyz_points(
read_XYZ(
std::istream& stream, ///< input stream.
OutputIterator output) ///< output iterator over points.
{
return read_xyz_points<OutputIteratorValueType>
return read_XYZ<OutputIteratorValueType>
(stream, output, CGAL::parameters::all_default());
}
@ -190,23 +190,23 @@ read_xyz_points(
template <typename OutputIterator,
typename CGAL_BGL_NP_TEMPLATE_PARAMETERS>
bool
read_xyz_points(
read_XYZ(
std::istream& stream, ///< input stream.
OutputIterator output,
const CGAL_BGL_NP_CLASS& np)
{
return read_xyz_points<typename value_type_traits<OutputIterator>::type>
return read_XYZ<typename value_type_traits<OutputIterator>::type>
(stream, output, np);
}
// variant with default NP and output iterator value type
template <typename OutputIterator>
bool
read_xyz_points(
read_XYZ(
std::istream& stream, ///< input stream.
OutputIterator output)
{
return read_xyz_points<typename value_type_traits<OutputIterator>::type>
return read_XYZ<typename value_type_traits<OutputIterator>::type>
(stream, output, CGAL::parameters::all_default());
}
@ -227,7 +227,7 @@ read_xyz_points_and_normals(
NormalPMap normal_map, ///< property map: value_type of OutputIterator -> Vector_3.
const Kernel& /*kernel*/) ///< geometric traits.
{
return read_xyz_points<OutputIteratorValueType>
return read_XYZ<OutputIteratorValueType>
(stream, output,
CGAL::parameters::point_map (point_map).
normal_map (normal_map).
@ -249,7 +249,7 @@ read_xyz_points_and_normals(
NormalPMap normal_map, ///< property map: value_type of OutputIterator -> Vector_3.
const Kernel& kernel) ///< geometric traits.
{
return read_xyz_points<typename value_type_traits<OutputIterator>::type>
return read_XYZ<typename value_type_traits<OutputIterator>::type>
(stream, output,
CGAL::parameters::point_map (point_map).
normal_map (normal_map).
@ -270,7 +270,7 @@ read_xyz_points_and_normals(
PointPMap point_map, ///< property map: value_type of OutputIterator -> Point_3.
NormalPMap normal_map) ///< property map: value_type of OutputIterator -> Vector_3.
{
return read_xyz_points<OutputIteratorValueType>
return read_XYZ<OutputIteratorValueType>
(stream, output,
CGAL::parameters::point_map (point_map).
normal_map (normal_map));
@ -289,7 +289,7 @@ read_xyz_points_and_normals(
PointPMap point_map, ///< property map: value_type of OutputIterator -> Point_3.
NormalPMap normal_map) ///< property map: value_type of OutputIterator -> Vector_3.
{
return read_xyz_points<typename value_type_traits<OutputIterator>::type>
return read_XYZ<typename value_type_traits<OutputIterator>::type>
(stream, output,
CGAL::parameters::point_map (point_map).
normal_map (normal_map));
@ -307,7 +307,7 @@ read_xyz_points_and_normals(
OutputIterator output, ///< output iterator over points.
NormalPMap normal_map) ///< property map: value_type of OutputIterator -> Vector_3.
{
return read_xyz_points<OutputIteratorValueType>
return read_XYZ<OutputIteratorValueType>
(stream, output,
CGAL::parameters::normal_map (normal_map));
}
@ -323,7 +323,7 @@ read_xyz_points_and_normals(
OutputIterator output, ///< output iterator over points.
NormalPMap normal_map) ///< property map: value_type of OutputIterator -> Vector_3.
{
return read_xyz_points<typename value_type_traits<OutputIterator>::type>
return read_XYZ<typename value_type_traits<OutputIterator>::type>
(stream, output,
CGAL::parameters::normal_map (normal_map));
}
@ -342,7 +342,7 @@ read_xyz_points(
PointPMap point_map, ///< property map: value_type of OutputIterator -> Point_3.
const Kernel& kernel) ///< geometric traits.
{
return read_xyz_points<OutputIteratorValueType>
return read_XYZ<OutputIteratorValueType>
(stream, output,
CGAL::parameters::point_map (point_map).
geom_traits (kernel));
@ -361,7 +361,7 @@ read_xyz_points(
PointPMap point_map, ///< property map: value_type of OutputIterator -> Point_3.
const Kernel& kernel) ///< geometric traits.
{
return read_xyz_points<typename value_type_traits<OutputIterator>::type>
return read_XYZ<typename value_type_traits<OutputIterator>::type>
(stream, output,
CGAL::parameters::point_map (point_map).
geom_traits (kernel));
@ -379,7 +379,7 @@ read_xyz_points(
OutputIterator output, ///< output iterator over points.
PointPMap point_map) ///< property map: value_type of OutputIterator -> Point_3.
{
return read_xyz_points<OutputIteratorValueType>
return read_XYZ<OutputIteratorValueType>
(stream, output,
CGAL::parameters::point_map (point_map));
}
@ -395,14 +395,81 @@ read_xyz_points(
OutputIterator output, ///< output iterator over points.
PointPMap point_map) ///< property map: value_type of OutputIterator -> Point_3.
{
return read_xyz_points<typename value_type_traits<OutputIterator>::type>
return read_XYZ<typename value_type_traits<OutputIterator>::type>
(stream, output,
CGAL::parameters::point_map (point_map));
}
#endif // CGAL_NO_DEPRECATED_CODE
/// \endcond
//////////////////////////////////
///
//////////////////////////////////
///
///
/**
\ingroup PkgPointSetProcessing3IO
@todo update version
\deprecated This function is deprecated since \cgal 5.1, `CGAL::read_XYZ()` should be used instead.
\return true on success.
*/
template <typename OutputIteratorValueType,
typename OutputIterator,
#ifdef DOXYGEN_RUNNING
typename NamedParameters
#else
typename CGAL_BGL_NP_TEMPLATE_PARAMETERS
#endif
>
CGAL_DEPRECATED bool
read_xyz_points(
std::istream& stream,
OutputIterator output,
#ifdef DOXYGEN_RUNNING
const NamedParameters& np)
#else
const CGAL_BGL_NP_CLASS& np)
#endif
{
return read_XYZ(stream, output, np);
}
#ifndef CGAL_NO_DEPRECATED_CODE
/// \cond SKIP_IN_MANUAL
template <typename OutputIteratorValueType,
typename OutputIterator>
CGAL_DEPRECATED bool
read_xyz_points(
std::istream& stream, ///< input stream.
OutputIterator output) ///< output iterator over points.
{
return read_XYZ<OutputIteratorValueType>
(stream, output, CGAL::parameters::all_default());
}
template <typename OutputIterator,
typename CGAL_BGL_NP_TEMPLATE_PARAMETERS>
CGAL_DEPRECATED bool
read_xyz_points(
std::istream& stream, ///< input stream.
OutputIterator output,
const CGAL_BGL_NP_CLASS& np)
{
return read_XYZ<typename value_type_traits<OutputIterator>::type>
(stream, output, np);
}
template <typename OutputIterator>
CGAL_DEPRECATED bool
read_xyz_points(
std::istream& stream, ///< input stream.
OutputIterator output)
{
return read_XYZ<typename value_type_traits<OutputIterator>::type>
(stream, output, CGAL::parameters::all_default());
}
#endif //CGAL_NO_DEPRECATED_CODE
} //namespace CGAL
#endif // CGAL_READ_XYZ_POINTS_H

View File

@ -63,7 +63,7 @@ namespace CGAL {
Generates a %LAS property handler to write 3D points.
\sa `write_las_points_with_properties()`
\sa `write_LAS()`
\tparam PointMap the property map used to store points.
*/
@ -169,7 +169,7 @@ namespace internal {
writing an `int` vairable as an `int` %LAS property). An exception
is used for points that are written using a `std::tuple` object.
See documentation of `read_las_points_with_properties()` for the
See documentation of `read_LAS_with_properties()` for the
list of available `LAS_property::Tag` classes.
\sa `make_las_point_writer()`
@ -186,7 +186,7 @@ namespace internal {
template <typename PointRange,
typename PointMap,
typename ... PropertyHandler>
bool write_las_points_with_properties (std::ostream& stream, ///< output stream.
bool write_LAS_with_properties (std::ostream& stream, ///< output stream.
const PointRange& points, ///< input point range.
std::tuple<PointMap,
LAS_property::X,
@ -268,7 +268,7 @@ bool write_las_points_with_properties (std::ostream& stream, ///< output stream
template < typename PointRange,
typename NamedParameters>
bool
write_las_points(
write_LAS(
std::ostream& stream,
const PointRange& points,
const NamedParameters& np)
@ -279,7 +279,7 @@ write_las_points(
typedef typename CGAL::GetPointMap<PointRange, NamedParameters>::type PointMap;
PointMap point_map = choose_parameter<PointMap>(get_parameter(np, internal_np::point_map));
return write_las_points_with_properties (stream, points, make_las_point_writer(point_map));
return write_LAS_with_properties (stream, points, make_las_point_writer(point_map));
}
/// \cond SKIP_IN_MANUAL
@ -290,7 +290,7 @@ write_las_points(
std::ostream& stream,
const PointRange& points)
{
return write_las_points
return write_LAS
(stream, points, CGAL::Point_set_processing_3::parameters::all_default(points));
}
@ -307,7 +307,7 @@ write_las_points(
PointMap point_map) ///< property map: value_type of OutputIterator -> Point_3.
{
CGAL::Iterator_range<ForwardIterator> points (first, beyond);
return write_las_points
return write_LAS
(stream, points,
CGAL::parameters::point_map(point_map));
}
@ -322,13 +322,48 @@ write_las_points(
ForwardIterator beyond) ///< past-the-end input point.
{
CGAL::Iterator_range<ForwardIterator> points (first, beyond);
return write_las_points
return write_LAS
(stream, points);
}
#endif // CGAL_NO_DEPRECATED_CODE
/// \endcond
#ifndef CGAL_NO_DEPRECATED_CODE
/**
\ingroup PkgPointSetProcessing3IO
@todo update version
\deprecated This function is deprecated since \cgal 5.1, `CGAL::write_LAS_with_properties()` should be used instead.
*/
template <typename PointRange,
typename PointMap,
typename ... PropertyHandler>
CGAL_DEPRECATED bool
write_las_points_with_properties (std::ostream& stream,
const PointRange& points,
std::tuple<PointMap,
LAS_property::X,
LAS_property::Y,
LAS_property::Z> point_property,
PropertyHandler&& ... properties)
{
return write_LAS_with_properties(stream, points, point_property, std::forward<PropertyHandler>(properties)...);
}
/**
\ingroup PkgPointSetProcessing3IO
@todo update version
\deprecated This function is deprecated since \cgal 5.1, `CGAL::write_LAS()` should be used instead.
*/
template < typename PointRange,
typename NamedParameters>
bool
write_las_points(
std::ostream& stream,
const PointRange& points,
const NamedParameters& np)
{
return write_LAS(stream, points, np);
}
#endif //CGAL_NO_DEPRECATED_CODE
} //namespace CGAL
#endif // CGAL_WRITE_LAS_POINTS_H

View File

@ -20,6 +20,9 @@
#include <CGAL/boost/graph/named_params_helper.h>
#include <CGAL/Iterator_range.h>
#include <boost/utility/enable_if.hpp>
#include <iostream>
#include <iterator>
@ -57,10 +60,16 @@ template <typename PointRange,
typename NamedParameters
>
bool
write_off_points(
write_OFF(
std::ostream& stream,
const PointRange& points,
const NamedParameters& np)
const NamedParameters& np
#ifndef DOXYGEN_RUNNING
,typename boost::enable_if<
typename boost::has_range_const_iterator<PointRange>::type
>::type* =0
#endif
)
{
using parameters::choose_parameter;
using parameters::get_parameter;
@ -103,11 +112,17 @@ write_off_points(
// variant with default NP
template <typename PointRange>
bool
write_off_points(
write_OFF(
std::ostream& stream, ///< output stream.
const PointRange& points)
const PointRange& points
#ifndef DOXYGEN_RUNNING
,typename boost::enable_if<
typename boost::has_range_const_iterator<PointRange>::type
>::type* =0
#endif
)
{
return write_off_points
return write_OFF
(stream, points, CGAL::Point_set_processing_3::parameters::all_default(points));
}
@ -230,8 +245,36 @@ write_off_points(
}
#endif // CGAL_NO_DEPRECATED_CODE
/// \endcond
#ifndef CGAL_NO_DEPRECATED_CODE
/**
\ingroup PkgPointSetProcessing3IO
@todo update version
\deprecated This function is deprecated since \cgal 5.1, `CGAL::write_OFF()` should be used instead.
*/
template <typename PointRange,
typename NamedParameters
>
CGAL_DEPRECATED bool
write_off_points(
std::ostream& stream,
const PointRange& points,
const NamedParameters& np)
{
return write_OFF(stream, points, np);
}
/// \cond SKIP_IN_MANUAL
// variant with default NP
template <typename PointRange>
CGAL_DEPRECATED bool
write_off_points(
std::ostream& stream, ///< output stream.
const PointRange& points)
{
return write_OFF
(stream, points, CGAL::Point_set_processing_3::parameters::all_default(points));
}
#endif // CGAL_NO_DEPRECATED_CODE
} //namespace CGAL
#endif // CGAL_WRITE_OFF_POINTS_H

View File

@ -42,7 +42,7 @@ namespace CGAL {
`z`. `FT` is `float` if the points use
`CGAL::Simple_cartesian<float>` and `double` otherwise.
\sa `write_ply_points_with_properties()`
\sa `write_PLY_with_properties()`
\tparam PointMap the property map used to store points.
*/
@ -58,7 +58,7 @@ namespace CGAL {
and named `nx`, `ny` and `nz`. `FT` is `float` if the vectors use
`CGAL::Simple_cartesian<float>` and `double` otherwise.
\sa `write_ply_points_with_properties()`
\sa `write_PLY_with_properties()`
\tparam VectorMap the property map used to store vectors.
*/
@ -115,7 +115,7 @@ namespace internal {
template < typename PointRange,
typename ... PropertyHandler>
bool
write_ply_points_with_properties(
write_PLY_with_properties(
std::ostream& stream, ///< output stream.
const PointRange& points, ///< input point range.
PropertyHandler&& ... properties) ///< parameter pack of property handlers
@ -174,33 +174,42 @@ write_ply_points_with_properties(
\cgalRequiresCPP11
*/
template <typename PointRange,
typename NamedParameters>
#ifdef DOXYGEN_RUNNING
typename NamedParameters
#else
typename CGAL_BGL_NP_TEMPLATE_PARAMETERS
#endif
>
bool
write_ply_points(
write_PLY(
std::ostream& stream,
const PointRange& points,
#ifdef DOXYGEN_RUNNING
const NamedParameters& np)
#else
const CGAL_BGL_NP_CLASS& np)
#endif
{
using parameters::choose_parameter;
using parameters::get_parameter;
// basic geometric types
typedef typename CGAL::GetPointMap<PointRange, NamedParameters>::type PointMap;
typedef typename Point_set_processing_3::GetNormalMap<PointRange, NamedParameters>::type NormalMap;
typedef typename CGAL::GetPointMap<PointRange, CGAL_BGL_NP_CLASS>::type PointMap;
typedef typename Point_set_processing_3::GetNormalMap<PointRange, CGAL_BGL_NP_CLASS>::type NormalMap;
bool has_normals = !(boost::is_same<NormalMap,
typename Point_set_processing_3::GetNormalMap<PointRange, NamedParameters>::NoMap>::value);
typename Point_set_processing_3::GetNormalMap<PointRange, CGAL_BGL_NP_CLASS>::NoMap>::value);
PointMap point_map = choose_parameter<PointMap>(get_parameter(np, internal_np::point_map));
NormalMap normal_map = choose_parameter<NormalMap>(get_parameter(np, internal_np::normal_map));
if (has_normals)
return write_ply_points_with_properties(
return write_PLY_with_properties(
stream, points,
make_ply_point_writer(point_map),
make_ply_normal_writer(normal_map));
// else
return write_ply_points_with_properties(
return write_PLY_with_properties(
stream, points,
make_ply_point_writer(point_map));
}
@ -209,11 +218,11 @@ write_ply_points(
// variant with default NP
template <typename PointRange>
bool
write_ply_points(
write_PLY(
std::ostream& stream,
const PointRange& points)
{
return write_ply_points
return write_PLY
(stream, points, CGAL::Point_set_processing_3::parameters::all_default(points));
}
@ -232,7 +241,7 @@ write_ply_points_and_normals(
VectorMap normal_map) ///< property map: value_type of OutputIterator -> Vector_3.
{
CGAL::Iterator_range<ForwardIterator> points (first, beyond);
return write_ply_points
return write_PLY
(stream, points,
CGAL::parameters::point_map (point_map).
normal_map (normal_map));
@ -251,7 +260,7 @@ write_ply_points_and_normals(
VectorMap normal_map) ///< property map: value_type of OutputIterator -> Vector_3.
{
CGAL::Iterator_range<ForwardIterator> points (first, beyond);
return write_ply_points
return write_PLY
(stream, points,
CGAL::parameters::normal_map (normal_map));
}
@ -268,7 +277,7 @@ write_ply_points(
PointMap point_map) ///< property map: value_type of OutputIterator -> Point_3.
{
CGAL::Iterator_range<ForwardIterator> points (first, beyond);
return write_ply_points
return write_PLY
(stream, points,
CGAL::parameters::point_map(point_map));
}
@ -283,12 +292,60 @@ write_ply_points(
ForwardIterator beyond) ///< past-the-end input point.
{
CGAL::Iterator_range<ForwardIterator> points (first, beyond);
return write_ply_points
return write_PLY
(stream, points);
}
#endif // CGAL_NO_DEPRECATED_CODE
/// \endcond
#ifndef CGAL_NO_DEPRECATED_CODE
/**
\ingroup PkgPointSetProcessing3IOPly
@todo update version
\deprecated This function is deprecated since \cgal 5.1, `CGAL::write_PLY_with_properties()` should be used instead.
*/
template < typename PointRange,
typename ... PropertyHandler>
CGAL_DEPRECATED bool
write_ply_points_with_properties(
std::ostream& stream, ///< output stream.
const PointRange& points, ///< input point range.
PropertyHandler&& ... properties) ///< parameter pack of property handlers
{
return write_PLY_with_properties(stream, points,
std::forward<PropertyHandler>(properties)...);
}
/**
\ingroup PkgPointSetProcessing3IOPly
@todo update version
\deprecated This function is deprecated since \cgal 5.1, `CGAL::write_PLY()` should be used instead.
*/
template <typename PointRange,
typename NamedParameters>
CGAL_DEPRECATED bool
write_ply_points(
std::ostream& stream,
const PointRange& points,
const NamedParameters& np)
{
return write_PLY(stream, points, np);
}
/// \cond SKIP_IN_MANUAL
template <typename PointRange>
CGAL_DEPRECATED bool
write_ply_points(
std::ostream& stream,
const PointRange& points)
{
return write_PLY
(stream, points, CGAL::Point_set_processing_3::parameters::all_default(points));
}
/// \endcond
#endif //CGAL_NO_DEPRECATED_CODE
} //namespace CGAL

View File

@ -57,7 +57,7 @@ template <typename PointRange,
typename NamedParameters
>
bool
write_xyz_points(
write_XYZ(
std::ostream& stream,
const PointRange& points,
const NamedParameters& np)
@ -99,11 +99,11 @@ write_xyz_points(
// variant with default NP
template <typename PointRange>
bool
write_xyz_points(
write_XYZ(
std::ostream& stream, ///< output stream.
const PointRange& points)
{
return write_xyz_points
return write_XYZ
(stream, points, CGAL::Point_set_processing_3::parameters::all_default(points));
}
@ -125,7 +125,7 @@ write_xyz_points_and_normals(
const Kernel& /*kernel*/) ///< geometric traits.
{
CGAL::Iterator_range<ForwardIterator> points (first, beyond);
return write_xyz_points
return write_XYZ
(stream, points,
CGAL::parameters::point_map (point_map).
normal_map (normal_map).
@ -147,7 +147,7 @@ write_xyz_points_and_normals(
NormalMap normal_map) ///< property map: value_type of OutputIterator -> Vector_3.
{
CGAL::Iterator_range<ForwardIterator> points (first, beyond);
return write_xyz_points
return write_XYZ
(stream, points,
CGAL::parameters::point_map (point_map).
normal_map (normal_map));
@ -166,7 +166,7 @@ write_xyz_points_and_normals(
NormalMap normal_map) ///< property map: value_type of ForwardIterator -> Vector_3.
{
CGAL::Iterator_range<ForwardIterator> points (first, beyond);
return write_xyz_points
return write_XYZ
(stream, points,
CGAL::parameters::normal_map(normal_map));
}
@ -186,7 +186,7 @@ write_xyz_points(
const Kernel& kernel)
{
CGAL::Iterator_range<ForwardIterator> points (first, beyond);
return write_xyz_points
return write_XYZ
(stream, points,
CGAL::parameters::point_map(point_map).
geom_traits (kernel));
@ -204,7 +204,7 @@ write_xyz_points(
PointMap point_map) ///< property map: value_type of OutputIterator -> Point_3.
{
CGAL::Iterator_range<ForwardIterator> points (first, beyond);
return write_xyz_points
return write_XYZ
(stream, points,
CGAL::parameters::point_map(point_map));
}
@ -220,13 +220,46 @@ write_xyz_points(
ForwardIterator beyond) ///< past-the-end input point.
{
CGAL::Iterator_range<ForwardIterator> points (first, beyond);
return write_xyz_points
return write_XYZ
(stream, points);
}
#endif // CGAL_NO_DEPRECATED_CODE
/// \endcond
#ifndef CGAL_NO_DEPRECATED_CODE
/**
\ingroup PkgPointSetProcessing3IO
@todo update version
\deprecated This function is deprecated since \cgal 5.1, `CGAL::write_XYZ()` should be used instead.
*/
template <typename PointRange,
typename NamedParameters
>
CGAL_DEPRECATED bool
write_xyz_points(
std::ostream& stream,
const PointRange& points,
const NamedParameters& np)
{
return write_XYZ(stream, points, np);
}
/// \cond SKIP_IN_MANUAL
template <typename PointRange>
CGAL_DEPRECATED bool
write_xyz_points(
std::ostream& stream, ///< output stream.
const PointRange& points)
{
return write_XYZ
(stream, points, CGAL::Point_set_processing_3::parameters::all_default(points));
}
/// \endcond
#endif //CGAL_NO_DEPRECATED_CODE
} //namespace CGAL
#endif // CGAL_WRITE_XYZ_POINTS_H

View File

@ -104,7 +104,7 @@ int main(int argc, char * argv[])
// If XYZ file format:
std::ifstream stream(input_filename.c_str());
if(stream &&
CGAL::read_xyz_points(stream, std::back_inserter(points)))
CGAL::read_XYZ(stream, std::back_inserter(points)))
{
std::cerr << "ok (" << points.size() << " points)" << std::endl;
}

View File

@ -113,7 +113,7 @@ int main(int argc, char * argv[])
// If XYZ file format:
std::ifstream stream(input_filename.c_str());
if(stream &&
CGAL::read_xyz_points(stream,
CGAL::read_XYZ(stream,
std::back_inserter(points),
CGAL::parameters::point_map(CGAL::First_of_pair_property_map<PointVectorPair>()).
normal_map(CGAL::Second_of_pair_property_map<PointVectorPair>())))

View File

@ -323,7 +323,7 @@ int main(int argc, char * argv[])
{
std::ifstream stream(input_filename.c_str());
success = stream &&
CGAL::read_xyz_points(stream,
CGAL::read_XYZ(stream,
std::back_inserter(points),
CGAL::parameters::normal_map
(CGAL::make_normal_of_point_with_normal_map(PointList::value_type()))

View File

@ -21,7 +21,7 @@ bool read(std::string s)
{
std::ifstream fs(s.c_str());
std::vector<PointVectorPair> pv_pairs;
return CGAL::read_xyz_points(fs,
return CGAL::read_XYZ(fs,
back_inserter(pv_pairs),
CGAL::parameters::point_map(CGAL::First_of_pair_property_map<PointVectorPair>()).
normal_map(CGAL::Second_of_pair_property_map<PointVectorPair>()));
@ -34,7 +34,7 @@ bool read(std::string s,
{
std::ifstream fs(s.c_str());
return CGAL::read_xyz_points(fs,
return CGAL::read_XYZ(fs,
back_inserter(pv_pairs),
CGAL::parameters::point_map(CGAL::First_of_pair_property_map<PointVectorPair>()).
normal_map(CGAL::Second_of_pair_property_map<PointVectorPair>()));

View File

@ -78,7 +78,7 @@ bool test_no_deduction_points_and_normals_xyz(const char* file_name)
// read with custom output iterator type
dummy_counter::counter = 0;
std::ifstream input(file_name);
CGAL::read_xyz_points<dummy_counter>(
CGAL::read_XYZ<dummy_counter>(
input, back_inserter(indices),
CGAL::parameters::point_map (points).
normal_map (normals).
@ -88,7 +88,7 @@ bool test_no_deduction_points_and_normals_xyz(const char* file_name)
input.clear();
input.close();
input.open(file_name);
CGAL::read_xyz_points(
CGAL::read_XYZ(
input, back_inserter(pv_pairs),
CGAL::parameters::point_map(CGAL::First_of_pair_property_map<PointVectorPair>()).
normal_map(CGAL::Second_of_pair_property_map<PointVectorPair>()).
@ -108,7 +108,7 @@ bool test_no_deduction_points_and_normals_off(const char* file_name)
// read with custom output iterator type
dummy_counter::counter = 0;
std::ifstream input(file_name);
CGAL::read_off_points<dummy_counter>(
CGAL::read_OFF<dummy_counter>(
input, back_inserter(indices),
CGAL::parameters::point_map(points).
normal_map(normals).
@ -118,7 +118,7 @@ bool test_no_deduction_points_and_normals_off(const char* file_name)
input.clear();
input.close();
input.open(file_name);
CGAL::read_off_points(
CGAL::read_OFF(
input, back_inserter(pv_pairs),
CGAL::parameters::point_map(CGAL::First_of_pair_property_map<PointVectorPair>()).
normal_map(CGAL::Second_of_pair_property_map<PointVectorPair>()).
@ -137,7 +137,7 @@ bool test_no_deduction_points_xyz(const char* file_name)
// read with custom output iterator type
dummy_counter::counter = 0;
std::ifstream input(file_name);
CGAL::read_xyz_points<dummy_counter>(
CGAL::read_XYZ<dummy_counter>(
input, back_inserter(indices),
CGAL::parameters::point_map(points_1).geom_traits(Kernel()));
@ -145,7 +145,7 @@ bool test_no_deduction_points_xyz(const char* file_name)
input.clear();
input.close();
input.open(file_name);
CGAL::read_xyz_points(
CGAL::read_XYZ(
input, back_inserter(points_2),
CGAL::parameters::point_map(CGAL::Identity_property_map<Point_3>()).
geom_traits(Kernel()));
@ -163,7 +163,7 @@ bool test_no_deduction_points_off(const char* file_name)
// read with custom output iterator type
dummy_counter::counter = 0;
std::ifstream input(file_name);
CGAL::read_off_points<dummy_counter>(
CGAL::read_OFF<dummy_counter>(
input, back_inserter(indices),
CGAL::parameters::point_map(points_1).
geom_traits(Kernel()));
@ -172,7 +172,7 @@ bool test_no_deduction_points_off(const char* file_name)
input.clear();
input.close();
input.open(file_name);
CGAL::read_off_points(
CGAL::read_OFF(
input, back_inserter(points_2),
CGAL::parameters::point_map(CGAL::Identity_property_map<Point_3>()).
geom_traits(Kernel()));
@ -187,14 +187,14 @@ void compile_test() {
std::ifstream input;
input.open("data/read_test/simple.xyz");
CGAL::read_xyz_points(
CGAL::read_XYZ(
input,
std::front_inserter(points));
input.clear();
input.close();
input.open("data/read_test/simple.xyz");
CGAL::read_xyz_points(
CGAL::read_XYZ(
input,
std::front_inserter(points),
CGAL::parameters::point_map(CGAL::Identity_property_map<Point_3>()));
@ -202,7 +202,7 @@ void compile_test() {
input.close();
input.open("data/read_test/simple.xyz");
CGAL::read_xyz_points(
CGAL::read_XYZ(
input,
std::front_inserter(points),
CGAL::parameters::point_map(CGAL::Identity_property_map<Point_3>()).
@ -212,21 +212,21 @@ void compile_test() {
// this will span all OutputIteratorValueType versions
input.open("data/read_test/simple.xyz");
CGAL::read_xyz_points<Point_3>(
CGAL::read_XYZ<Point_3>(
input,
std::front_inserter(points));
input.clear();
input.close();
//-----------------------------------------------------------------------
input.open("data/read_test/simple.off");
CGAL::read_off_points(
CGAL::read_OFF(
input,
std::front_inserter(points));
input.clear();
input.close();
input.open("data/read_test/simple.off");
CGAL::read_off_points(
CGAL::read_OFF(
input,
std::front_inserter(points),
CGAL::parameters::point_map(CGAL::Identity_property_map<Point_3>()));
@ -234,7 +234,7 @@ void compile_test() {
input.close();
input.open("data/read_test/simple.off");
CGAL::read_off_points(
CGAL::read_OFF(
input,
std::front_inserter(points),
CGAL::parameters::point_map(CGAL::Identity_property_map<Point_3>()).
@ -244,14 +244,14 @@ void compile_test() {
// this will span all OutputIteratorValueType versions
input.open("data/read_test/simple.off");
CGAL::read_off_points<Point_3>(
CGAL::read_OFF<Point_3>(
input,
std::front_inserter(points));
input.clear();
input.close();
//-----------------------------------------------------------------------
input.open("data/read_test/simple.xyz");
CGAL::read_xyz_points(
CGAL::read_XYZ(
input,
std::front_inserter(points),
CGAL::parameters::normal_map(boost::dummy_property_map()));
@ -259,7 +259,7 @@ void compile_test() {
input.close();
input.open("data/read_test/simple.xyz");
CGAL::read_xyz_points(
CGAL::read_XYZ(
input,
std::front_inserter(pv_pairs),
CGAL::parameters::point_map(CGAL::First_of_pair_property_map<PointVectorPair>()).
@ -268,7 +268,7 @@ void compile_test() {
input.close();
input.open("data/read_test/simple.xyz");
CGAL::read_xyz_points(
CGAL::read_XYZ(
input,
std::front_inserter(pv_pairs),
CGAL::parameters::point_map(CGAL::First_of_pair_property_map<PointVectorPair>()).
@ -278,7 +278,7 @@ void compile_test() {
input.close();
input.open("data/read_test/simple.xyz");
CGAL::read_xyz_points<Point_3>(
CGAL::read_XYZ<Point_3>(
input,
std::front_inserter(points),
CGAL::parameters::normal_map(boost::dummy_property_map()));
@ -286,7 +286,7 @@ void compile_test() {
input.close();
//-----------------------------------------------------------------------
input.open("data/read_test/simple.off");
CGAL::read_off_points(
CGAL::read_OFF(
input,
std::front_inserter(points),
CGAL::parameters::normal_map(boost::dummy_property_map()));
@ -294,7 +294,7 @@ void compile_test() {
input.close();
input.open("data/read_test/simple.off");
CGAL::read_off_points(
CGAL::read_OFF(
input,
std::front_inserter(pv_pairs),
CGAL::parameters::point_map(CGAL::First_of_pair_property_map<PointVectorPair>()).
@ -303,7 +303,7 @@ void compile_test() {
input.close();
input.open("data/read_test/simple.off");
CGAL::read_off_points(
CGAL::read_OFF(
input,
std::front_inserter(pv_pairs),
CGAL::parameters::point_map(CGAL::First_of_pair_property_map<PointVectorPair>()).
@ -313,7 +313,7 @@ void compile_test() {
input.close();
input.open("data/read_test/simple.off");
CGAL::read_off_points<Point_3>(
CGAL::read_OFF<Point_3>(
input,
std::front_inserter(points),
CGAL::parameters::normal_map(boost::dummy_property_map()));

View File

@ -114,7 +114,7 @@ int main(int argc, char * argv[])
// If XYZ file format:
std::ifstream stream(input_filename.c_str());
if(stream &&
CGAL::read_xyz_points(stream, std::back_inserter(points)))
CGAL::read_XYZ(stream, std::back_inserter(points)))
{
std::cerr << "ok (" << points.size() << " points)" << std::endl;
}

View File

@ -106,7 +106,7 @@ int main(int argc, char * argv[])
// If XYZ file format:
std::ifstream stream(input_filename.c_str());
if(stream &&
CGAL::read_xyz_points(stream, std::back_inserter(points)))
CGAL::read_XYZ(stream, std::back_inserter(points)))
{
std::cerr << "ok (" << points.size() << " points)" << std::endl;
}

View File

@ -127,7 +127,7 @@ int main(int argc, char * argv[])
// If XYZ file format:
std::ifstream stream(input_filename.c_str());
if(stream &&
CGAL::read_xyz_points(stream, std::back_inserter(points)))
CGAL::read_XYZ(stream, std::back_inserter(points)))
{
std::cerr << "ok (" << points.size() << " points)" << std::endl;
}

View File

@ -189,7 +189,7 @@ int main(int argc, char * argv[])
// + property maps to access each point's position and normal.
std::ifstream stream(input_filename.c_str());
if (!stream ||
!CGAL::read_xyz_points(
!CGAL::read_XYZ(
stream,
std::back_inserter(points),
CGAL::parameters::point_map

View File

@ -45,7 +45,7 @@ int main(void)
PointList points;
std::ifstream stream("data/kitten.xyz");
if (!stream ||
!CGAL::read_xyz_points(
!CGAL::read_XYZ(
stream,
std::back_inserter(points),
CGAL::parameters::point_map (Point_map()).

View File

@ -18,7 +18,7 @@ int main(void)
std::vector<Pwn> points;
std::ifstream stream("data/kitten.xyz");
if (!stream ||
!CGAL::read_xyz_points(
!CGAL::read_XYZ(
stream,
std::back_inserter(points),
CGAL::parameters::point_map(CGAL::First_of_pair_property_map<Pwn>()).

View File

@ -140,7 +140,7 @@ int main(int argc, char * argv[])
// The position property map can be omitted here as we use iterators over Point_3 elements.
std::ifstream stream(input_filename.c_str());
if (!stream ||
!CGAL::read_xyz_points(
!CGAL::read_XYZ(
stream,
std::back_inserter(points),
CGAL::parameters::normal_map

View File

@ -51,7 +51,7 @@ int main()
t.start();
if (!input_stream ||
!CGAL::read_ply_points_with_properties(
!CGAL::read_PLY_with_properties(
input_stream,
std::back_inserter(points),
CGAL::make_ply_point_reader(Point_map()),

View File

@ -51,7 +51,7 @@ int main()
t.start();
if (!input_stream ||
!CGAL::read_ply_points_with_properties(
!CGAL::read_PLY_with_properties(
input_stream,
std::back_inserter(points),
CGAL::make_ply_point_reader(Point_map()),

View File

@ -101,7 +101,7 @@ int main()
CGAL::Timer t;
t.start();
if (!input_stream ||
!CGAL::read_xyz_points(input_stream,
!CGAL::read_XYZ(input_stream,
std::back_inserter(points),
CGAL::parameters::point_map(Point_map()).normal_map(Normal_map()))) {

View File

@ -68,7 +68,7 @@ int main()
CGAL::Timer t;
t.start();
if (!input_stream ||
!CGAL::read_xyz_points(input_stream,
!CGAL::read_XYZ(input_stream,
std::back_inserter(points),
CGAL::parameters::point_map(Point_map()).normal_map(Normal_map())))
{

View File

@ -85,7 +85,7 @@ int reconstruct(const std::string& input_file, bool force_extract_planes)
CGAL::Timer t;
t.start();
if (extension == ".pwn") {
if (!CGAL::read_xyz_points(
if (!CGAL::read_XYZ(
input_stream,
std::back_inserter(points),
CGAL::parameters::point_map(Point_map()).normal_map(Normal_map())))
@ -97,7 +97,7 @@ int reconstruct(const std::string& input_file, bool force_extract_planes)
std::cout << " Done. " << points.size() << " points. Time: " << t.time() << " sec." << std::endl;
}
else if (extension == ".ply") {
if (!CGAL::read_ply_points_with_properties(
if (!CGAL::read_PLY_with_properties(
input_stream,
std::back_inserter(points),
CGAL::make_ply_point_reader(Point_map()),

View File

@ -123,7 +123,7 @@ Polyhedron_demo_off_plugin::load_off(QFileInfo fileinfo) {
Scene_points_with_normal_item* item = new Scene_points_with_normal_item();
item->setName(fileinfo.completeBaseName());
if (scanner.size_of_vertices()==0) return item;
if(!item->read_off_point_set(in))
if(!item->read_OFF(in))
{
delete item;
return 0;

View File

@ -60,7 +60,7 @@ load(QFileInfo fileinfo, bool& ok, bool add_to_scene)
// Read .xyz in a point set
Scene_points_with_normal_item* point_set_item = new Scene_points_with_normal_item;
point_set_item->setName(fileinfo.completeBaseName());
if(!point_set_item->read_xyz_point_set(in)) {
if(!point_set_item->read_XYZ(in)) {
delete point_set_item;
ok = false;
return QList<Scene_item*>();

View File

@ -553,7 +553,7 @@ bool Scene_points_with_normal_item::read_las_point_set(std::istream& stream)
d->m_points->clear();
bool ok = stream &&
CGAL::read_las_point_set (stream, *(d->m_points)) &&
CGAL::read_LAS (stream, *(d->m_points)) &&
!isEmpty();
std::cerr << d->m_points->info();
@ -580,7 +580,7 @@ bool Scene_points_with_normal_item::write_las_point_set(std::ostream& stream) co
d->m_points->reset_indices();
return stream &&
CGAL::write_las_point_set (stream, *(d->m_points));
CGAL::write_LAS (stream, *(d->m_points));
}
#endif // LAS
@ -593,7 +593,7 @@ bool Scene_points_with_normal_item::read_ply_point_set(std::istream& stream)
d->m_points->clear();
bool ok = stream &&
CGAL::read_ply_point_set (stream, *(d->m_points), d->m_comments) &&
CGAL::read_PLY (stream, *(d->m_points), d->m_comments) &&
!isEmpty();
d->point_Slider->setValue(CGAL::Three::Three::getDefaultPointSize());
std::cerr << d->m_points->info();
@ -639,7 +639,7 @@ bool Scene_points_with_normal_item::read_off_point_set(std::istream& stream)
d->m_points->clear();
bool ok = stream &&
CGAL::read_off_point_set(stream, *(d->m_points)) &&
CGAL::read_OFF(stream, *(d->m_points)) &&
!isEmpty();
d->point_Slider->setValue(CGAL::Three::Three::getDefaultPointSize());
invalidateOpenGLBuffers();
@ -654,7 +654,7 @@ bool Scene_points_with_normal_item::write_off_point_set(std::ostream& stream) co
d->m_points->reset_indices();
return stream &&
CGAL::write_off_point_set (stream, *(d->m_points));
CGAL::write_OFF (stream, *(d->m_points));
}
// Loads point set from .XYZ file
@ -665,7 +665,7 @@ bool Scene_points_with_normal_item::read_xyz_point_set(std::istream& stream)
d->m_points->clear();
bool ok = stream &&
CGAL::read_xyz_point_set (stream, *(d->m_points)) &&
CGAL::read_XYZ (stream, *(d->m_points)) &&
!isEmpty();
d->point_Slider->setValue(CGAL::Three::Three::getDefaultPointSize());
invalidateOpenGLBuffers();

View File

@ -32,7 +32,7 @@ int main(int argc, char** argv) {
std::ifstream stream(argc > 1 ? argv[1] : "data/cube.pwn");
if (!stream ||
!CGAL::read_xyz_points(
!CGAL::read_XYZ(
stream,
std::back_inserter(points),
CGAL::parameters::point_map(Point_map()).

View File

@ -37,7 +37,7 @@ int main (int argc, char** argv) {
std::ifstream stream(filename);
if (!stream ||
!CGAL::read_xyz_points(
!CGAL::read_XYZ(
stream,
std::back_inserter(points),
CGAL::parameters::point_map(Point_map()).

View File

@ -64,7 +64,7 @@ int main (int argc, char** argv) {
std::ifstream stream(filename);
if (!stream ||
!CGAL::read_xyz_points(
!CGAL::read_XYZ(
stream,
std::back_inserter(points),
CGAL::parameters::point_map(Point_map()).

View File

@ -30,7 +30,7 @@ int main(int argc, char** argv) {
std::ifstream stream((argc > 1) ? argv[1] : "data/cube.pwn");
if (!stream ||
!CGAL::read_xyz_points(
!CGAL::read_XYZ(
stream,
std::back_inserter(points),
CGAL::parameters::point_map(Point_map()).

View File

@ -34,7 +34,7 @@ int main(int argc, char** argv) {
std::ifstream stream((argc > 1) ? argv[1] : "data/cube.pwn");
if (!stream ||
!CGAL::read_xyz_points(
!CGAL::read_XYZ(
stream,
std::back_inserter(points),
CGAL::parameters::point_map(Point_map()).

View File

@ -31,7 +31,7 @@ int main(int argc, char** argv) {
std::ifstream stream((argc > 1) ? argv[1] : "data/cube.pwn");
if (!stream ||
!CGAL::read_xyz_points(
!CGAL::read_XYZ(
stream,
std::back_inserter(points),
CGAL::parameters::point_map(Point_map()).

View File

@ -162,7 +162,7 @@ int main(int argc, char *argv[]) {
std::ofstream out(fullpath);
CGAL::set_ascii_mode(out);
CGAL::write_ply_points_with_properties(
CGAL::write_PLY_with_properties(
out, pwc,
CGAL::make_ply_point_writer(PLY_Point_map()),
std::make_tuple(

View File

@ -43,7 +43,7 @@ int run(const char* filename) {
std::ifstream stream(filename);
if (!stream ||
!CGAL::read_xyz_points(stream,
!CGAL::read_XYZ(stream,
std::back_inserter(points),
CGAL::parameters::point_map(Point_map()).
normal_map(Normal_map()))) {

View File

@ -36,7 +36,7 @@ bool test_scene(int argc, char** argv) {
std::ifstream stream((argc > 1) ? argv[1] : "data/cube.pwn");
if (!stream ||
!CGAL::read_xyz_points(stream,
!CGAL::read_XYZ(stream,
std::back_inserter(points),
CGAL::parameters::point_map(Point_map()).
normal_map(Normal_map())))

View File

@ -132,8 +132,8 @@ make_ply_normal_writer(VectorMap normal_map)
/// \endcond
namespace IO {
namespace IO {
namespace internal {
class PLY_read_number
@ -675,7 +675,7 @@ void process_properties(PLY_element& element, OutputValueType& new_element,
template <typename Integer, class PolygonRange, class ColorRange>
bool read_PLY_faces(std::istream& in,
IO::internal::PLY_element& element,
PLY_element& element,
PolygonRange& polygons,
ColorRange& fcolors,
const char* vertex_indices_tag)
@ -698,7 +698,7 @@ bool read_PLY_faces(std::istream& in,
{
for(std::size_t k = 0; k < element.number_of_properties(); ++ k)
{
IO::internal::PLY_read_number* property = element.property(k);
PLY_read_number* property = element.property(k);
property->get(in);
if(in.fail())
@ -736,8 +736,8 @@ bool read_PLY_faces(std::istream& in,
return true;
}
} // namespace PLY
} // namespace internal
} // namespace IO
} // namespace CGAL
#endif // CGAL_IO_PLY_PLY_READER_H

View File

@ -151,7 +151,7 @@ void Scene::loadPointsXYZ(const char* filename)
/* Note: this function reads in points only (normals are ignored) */
/* Note: this function can NOT omit comments (starting with '#') */
list<Point_3> pts;
if( !CGAL::read_xyz_points( fin, // input ifstream
if( !CGAL::read_XYZ( fin, // input ifstream
back_inserter(pts) ) ) { // output iterator over points
showError( QObject::tr("Error: cannot read file %1.").arg(filename) );
}