I/O Functions for the VTK (VTU / VTP) File Formats .
template<typename PointRange , typename PolygonRange >
bool CGAL::IO::read_VTP (const std::string &fname, PointRange &points, PolygonRange &polygons)
reads the content of the input file into points
and polygons
, using the VTK (VTU / VTP) File Formats . More...
template<typename PointRange , typename PolygonRange , typename NamedParameters = CGAL::parameters::Default_named_parameters>
bool CGAL::IO::write_VTP (std::ostream &os, const PointRange &points, const PolygonRange &polygons, const NamedParameters &np=parameters::default_values ())
writes the content of points
and polygons
in out
, using the VTK (VTU / VTP) File Formats . More...
template<typename PointRange , typename PolygonRange , typename NamedParameters = CGAL::parameters::Default_named_parameters>
bool CGAL::IO::write_VTP (const std::string &fname, const PointRange &points, const PolygonRange &polygons, const NamedParameters &np=parameters::default_values ())
writes the content of points
and polygons
in a file named fname
, using the VTK (VTU / VTP) File Formats . More...
◆ read_VTP()
template<typename PointRange , typename PolygonRange >
bool CGAL::IO::read_VTP
(
const std::string &
fname ,
PointRange &
points ,
PolygonRange &
polygons
)
#include <CGAL/IO/VTK.h>
reads the content of the input file into points
and polygons
, using the VTK (VTU / VTP) File Formats .
Attention The polygon soup is not cleared, and the data from the file are appended.
Template Parameters
Parameters
fname the path to the input file
points points of the soup of polygons
polygons a range of polygons. Each element in it describes a polygon using the indices of the points in points
.
Returns true
if the reading was successful, false
otherwise.
◆ write_VTP() [1/2]
template<typename PointRange , typename PolygonRange , typename NamedParameters = CGAL::parameters::Default_named_parameters>
bool CGAL::IO::write_VTP
(
std::ostream &
os ,
const PointRange &
points ,
const PolygonRange &
polygons ,
const NamedParameters &
np = parameters::default_values ()
)
#include <CGAL/IO/VTK.h>
writes the content of points
and polygons
in out
, using the VTK (VTU / VTP) File Formats .
Template Parameters
Parameters
os the output stream
points points of the soup of polygons
polygons a range of polygons. Each element in it describes a polygon using the indices of the points in points
.
np optional sequence of Named Parameters among the ones listed below
Optional Named Parameters
use_binary_mode
indicates whether data should be written in binary (true
) or in ASCII (false
)
Type: Boolean
Default: true
stream_precision
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 the writing was successful, false
otherwise.
◆ write_VTP() [2/2]
template<typename PointRange , typename PolygonRange , typename NamedParameters = CGAL::parameters::Default_named_parameters>
bool CGAL::IO::write_VTP
(
const std::string &
fname ,
const PointRange &
points ,
const PolygonRange &
polygons ,
const NamedParameters &
np = parameters::default_values ()
)
#include <CGAL/IO/VTK.h>
writes the content of points
and polygons
in a file named fname
, using the VTK (VTU / VTP) File Formats .
Template Parameters
Parameters
fname the path to the output file
points points of the soup of polygons
polygons a range of polygons. Each element in it describes a polygon using the indices of the points in points
.
np optional sequence of Named Parameters among the ones listed below
Optional Named Parameters
use_binary_mode
indicates whether data should be written in binary (true
) or in ASCII (false
)
Type: Boolean
Default: true
stream_precision
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 the writing was successful, false
otherwise.