\( \newcommand{\E}{\mathrm{E}} \) \( \newcommand{\A}{\mathrm{A}} \) \( \newcommand{\R}{\mathrm{R}} \) \( \newcommand{\N}{\mathrm{N}} \) \( \newcommand{\Q}{\mathrm{Q}} \) \( \newcommand{\Z}{\mathrm{Z}} \) \( \def\ccSum #1#2#3{ \sum_{#1}^{#2}{#3} } \def\ccProd #1#2#3{ \sum_{#1}^{#2}{#3} }\)
CGAL 4.10.2 - 3D Point Set
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Groups Pages

This module offers convenience overloads of input/ouput functions available in the Point Set Processing package.

These overloads, available after including CGAL/Point_set_3/IO.h, allow the user to call point set processing algorithms without having to handle manually property maps and iterators.

Input functions instanciate all the necessary property maps:

For a complete documentation of these functions, please refer to the Point Set Processing Reference manual.

Functions

template<typename Point , typename Vector >
bool CGAL::read_xyz_point_set (std::istream &stream, CGAL::Point_set_3< Point, Vector > &point_set)
 
template<typename Point , typename Vector >
bool CGAL::read_off_point_set (std::istream &stream, CGAL::Point_set_3< Point, Vector > &point_set)
 
template<typename Point , typename Vector >
bool CGAL::read_ply_point_set (std::istream &stream, CGAL::Point_set_3< Point, Vector > &point_set)
 
template<typename Point , typename Vector >
bool CGAL::write_xyz_point_set (std::ostream &stream, const CGAL::Point_set_3< Point, Vector > &point_set)
 
template<typename Point , typename Vector >
bool CGAL::write_off_point_set (std::ostream &stream, const CGAL::Point_set_3< Point, Vector > &point_set)
 
template<typename Point , typename Vector >
bool CGAL::write_ply_point_set (std::ostream &stream, const CGAL::Point_set_3< Point, Vector > &point_set)
 
template<typename Point , typename Vector >
std::istream & operator>> (std::istream &is, CGAL::Point_set_3< Point, Vector > &ps)
 Reads the point set from an input stream that can be either: More...
 
template<typename Point , typename Vector >
std::ostream & operator<< (std::ostream &os, const CGAL::Point_set_3< Point, Vector > &ps)
 Inserts the point set in an output stream in ASCII PLY format. More...
 

Function Documentation

template<typename Point , typename Vector >
std::ostream & operator<< ( std::ostream &  os,
const CGAL::Point_set_3< Point, Vector > &  ps 
)
related

Inserts the point set in an output stream in ASCII PLY format.

All properties are inserted in their instantiation order.

template<typename Point , typename Vector >
std::istream & operator>> ( std::istream &  is,
CGAL::Point_set_3< Point, Vector > &  ps 
)
related

Reads the point set from an input stream that can be either:

  • XYZ
  • OFF
  • PLY

The format is detected from the stream. If the stream contains normal vectors, the normal map is added to the point set. For PLY input, all point properties found in the header are added.

template<typename Point , typename Vector >
bool CGAL::read_off_point_set ( std::istream &  stream,
CGAL::Point_set_3< Point, Vector > &  point_set 
)
Parameters
streaminput stream.
point_setpoint set

#include <CGAL/Point_set_3/IO.h>

template<typename Point , typename Vector >
bool CGAL::read_ply_point_set ( std::istream &  stream,
CGAL::Point_set_3< Point, Vector > &  point_set 
)
Parameters
streaminput stream.
point_setpoint set

#include <CGAL/Point_set_3/IO.h>

Examples:
Point_set_3/point_set_read_ply.cpp.
template<typename Point , typename Vector >
bool CGAL::read_xyz_point_set ( std::istream &  stream,
CGAL::Point_set_3< Point, Vector > &  point_set 
)
Parameters
streaminput stream.
point_setpoint set

#include <CGAL/Point_set_3/IO.h>

Examples:
Point_set_3/point_set_read_xyz.cpp.
template<typename Point , typename Vector >
bool CGAL::write_off_point_set ( std::ostream &  stream,
const CGAL::Point_set_3< Point, Vector > &  point_set 
)
Parameters
streamoutput stream.
point_setpoint set

#include <CGAL/Point_set_3/IO.h>

Examples:
Point_set_3/point_set_read_xyz.cpp.
template<typename Point , typename Vector >
bool CGAL::write_ply_point_set ( std::ostream &  stream,
const CGAL::Point_set_3< Point, Vector > &  point_set 
)
Parameters
streamoutput stream.
point_setpoint set

#include <CGAL/Point_set_3/IO.h>

Examples:
Point_set_3/point_set_read_ply.cpp.
template<typename Point , typename Vector >
bool CGAL::write_xyz_point_set ( std::ostream &  stream,
const CGAL::Point_set_3< Point, Vector > &  point_set 
)
Parameters
streamoutput stream.
point_setpoint set

#include <CGAL/Point_set_3/IO.h>