CGAL 6.1 - Point Set Processing
Loading...
Searching...
No Matches

Functions

template<typename OutputIteratorValueType , typename OutputIterator , typename NamedParameters = CGAL::parameters::Default_named_parameters>
bool CGAL::IO::read_XYZ (std::istream &is, OutputIterator output, const NamedParameters &np=parameters::default_values())
 reads points (positions + normals, if available), using the IOStreamXYZ.
 
template<typename OutputIteratorValueType , typename OutputIterator , typename NamedParameters = CGAL::parameters::Default_named_parameters>
bool CGAL::IO::read_XYZ (const std::string &fname, OutputIterator output, const NamedParameters &np=parameters::default_values())
 reads points (positions + normals, if available), using the IOStreamXYZ.
 
template<typename PointRange , typename NamedParameters = CGAL::parameters::Default_named_parameters>
bool CGAL::IO::write_XYZ (std::ostream &os, const PointRange &points, const NamedParameters &np=parameters::default_values())
 writes the range of points (positions + normals, if available), using the IOStreamXYZ.
 
template<typename PointRange , typename NamedParameters = CGAL::parameters::Default_named_parameters>
bool CGAL::IO::write_XYZ (const std::string &filename, const PointRange &points, const NamedParameters &np=parameters::default_values())
 writes the range of points (positions + normals, if available), using the IOStreamXYZ.
 

Function Documentation

◆ read_XYZ() [1/2]

template<typename OutputIteratorValueType , typename OutputIterator , typename NamedParameters = CGAL::parameters::Default_named_parameters>
bool CGAL::IO::read_XYZ ( const std::string &  fname,
OutputIterator  output,
const NamedParameters np = parameters::default_values() 
)

#include <CGAL/IO/read_xyz_points.h>

reads points (positions + normals, if available), using the IOStreamXYZ.

Template Parameters
OutputIteratorValueTypetype of objects that can be put in OutputIterator. It must be a model of DefaultConstructible and defaults to value_type_traits<OutputIterator>::type. It can be omitted when the default is fine.
OutputIteratoriterator over output points.
NamedParametersa sequence of Named Parameters
Parameters
fnameinput file name.
outputoutput iterator over points.
npoptional sequence of Named Parameters among the ones listed below.
Optional Named Parameters
  • a property map associating points to the elements of the point range
  • Type: a model of WritablePropertyMap with value type geom_traits::Point_3
  • Default: CGAL::Identity_property_map<geom_traits::Point_3>

  • a property map associating normals to the elements of the point range
  • Type: a model of WritablePropertyMap with value type geom_traits::Vector_3
  • Default: If this parameter is omitted, normals in the input stream are ignored.

  • an instance of a geometric traits class
  • Type: a model of Kernel
  • Default: a CGAL Kernel deduced from the point type, using CGAL::Kernel_traits
Returns
true if reading was successful, false otherwise.
See also
IOStreamXYZ

◆ read_XYZ() [2/2]

template<typename OutputIteratorValueType , typename OutputIterator , typename NamedParameters = CGAL::parameters::Default_named_parameters>
bool CGAL::IO::read_XYZ ( std::istream &  is,
OutputIterator  output,
const NamedParameters np = parameters::default_values() 
)

#include <CGAL/IO/read_xyz_points.h>

reads points (positions + normals, if available), using the IOStreamXYZ.

Template Parameters
OutputIteratorValueTypetype of objects that can be put in OutputIterator. It must be a model of DefaultConstructible and defaults to value_type_traits<OutputIterator>::type. It can be omitted when the default is fine.
OutputIteratoriterator over output points.
NamedParametersa sequence of Named Parameters
Parameters
isinput stream.
outputoutput iterator over points.
npan optional sequence of Named Parameters among the ones listed below
Optional Named Parameters
  • a property map associating points to the elements of the point range
  • Type: a model of WritablePropertyMap with value type geom_traits::Point_3
  • Default: CGAL::Identity_property_map<geom_traits::Point_3>

  • a property map associating normals to the elements of the point range
  • Type: a model of WritablePropertyMap with value type geom_traits::Vector_3
  • Default: If this parameter is omitted, normals in the input stream are ignored.

  • an instance of a geometric traits class
  • Type: a model of Kernel
  • Default: a CGAL Kernel deduced from the point type, using CGAL::Kernel_traits
Returns
true if reading was successful, false otherwise.
See also
IOStreamXYZ
Examples
Point_set_processing_3/read_write_xyz_point_set_example.cpp.

◆ write_XYZ() [1/2]

template<typename PointRange , typename NamedParameters = CGAL::parameters::Default_named_parameters>
bool CGAL::IO::write_XYZ ( const std::string &  filename,
const PointRange points,
const NamedParameters np = parameters::default_values() 
)

#include <CGAL/IO/write_xyz_points.h>

writes the range of points (positions + normals, if available), using the IOStreamXYZ.

Template Parameters
PointRangeis a model of ConstRange. The value type of its iterator is the key type of the named parameter point_map.
NamedParametersa sequence of Named Parameters
Parameters
filenamepath to the output file
pointsinput point range
npan optional sequence of Named Parameters among the ones listed below
Optional Named Parameters
  • a property map associating points to the elements of the point range
  • Type: a model of ReadablePropertyMap with value type geom_traits::Point_3
  • Default: CGAL::Identity_property_map<geom_traits::Point_3>

  • a property map associating normals to the elements of the point range
  • Type: a model of ReadablePropertyMap with value type geom_traits::Vector_3
  • Default: If this parameter is omitted, normals are not written in the output file.

  • an instance of a geometric traits class
  • Type: a model of Kernel
  • Default: a CGAL Kernel deduced from the point type, using CGAL::Kernel_traits

  • a parameter used to set the precision (i.e. how many digits are generated) of the output stream
  • Type: int
  • Default: 6
Returns
true if writing was successful, false otherwise.

◆ write_XYZ() [2/2]

template<typename PointRange , typename NamedParameters = CGAL::parameters::Default_named_parameters>
bool CGAL::IO::write_XYZ ( std::ostream &  os,
const PointRange points,
const NamedParameters np = parameters::default_values() 
)

#include <CGAL/IO/write_xyz_points.h>

writes the range of points (positions + normals, if available), using the IOStreamXYZ.

Template Parameters
PointRangeis a model of ConstRange. The value type of its iterator is the key type of the named parameter point_map.
NamedParametersa sequence of Named Parameters
Parameters
osoutput stream
pointsinput point range
npan optional sequence of Named Parameters among the ones listed below
Optional Named Parameters
  • a property map associating points to the elements of the point range
  • Type: a model of ReadablePropertyMap with value type geom_traits::Point_3
  • Default: CGAL::Identity_property_map<geom_traits::Point_3>

  • a property map associating normals to the elements of the point range
  • Type: a model of ReadablePropertyMap with value type geom_traits::Vector_3
  • Default: If this parameter is omitted, normals are not written in the output stream.

  • an instance of a geometric traits class
  • Type: a model of Kernel
  • Default: a CGAL Kernel deduced from the point type, using CGAL::Kernel_traits

  • a parameter used to set the precision (i.e. how many digits are generated) of the output stream
  • Type: int
  • Default: the precision of the stream os
Returns
true if writing was successful, false otherwise.
Examples
Point_set_processing_3/bilateral_smooth_point_set_example.cpp, and Point_set_processing_3/read_write_xyz_point_set_example.cpp.