Methods to read and write graphs.
|
template<typename FaceGraph , typename NamedParameters > |
bool | CGAL::write_wrl (std::ostream &os, const FaceGraph &g, const NamedParameters &np) |
| writes the graph g in the wrl format (VRML 2.0). More...
|
|
template<typename FaceGraph , typename NamedParameters > |
bool | CGAL::write_off (std::ostream &os, const FaceGraph &g, const NamedParameters &np) |
| writes the graph g in the OFF format. More...
|
|
template<typename FaceGraph , typename NamedParameters > |
bool | CGAL::write_off (const char *fname, const FaceGraph &g, const NamedParameters &np) |
| writes the graph g in the OFF format into a file named fname . More...
|
|
template<typename FaceGraph , typename NamedParameters > |
bool | CGAL::read_off (std::istream &is, FaceGraph &g, NamedParameters np) |
| reads the graph g from data in the OFF format. More...
|
|
template<typename FaceGraph , typename NamedParameters > |
bool | CGAL::read_off (const char *fname, FaceGraph &g, NamedParameters np) |
| reads the graph g from data in the OFF format. More...
|
|
template<class TriangleMesh , class NamedParameters > |
void | CGAL::write_vtp (std::ostream &os, const TriangleMesh &mesh, const NamedParameters &np) |
| writes a triangulated surface mesh in the PolyData XML format. More...
|
|
◆ read_off() [1/2]
template<typename FaceGraph , typename NamedParameters >
bool CGAL::read_off |
( |
std::istream & |
is, |
|
|
FaceGraph & |
g, |
|
|
NamedParameters |
np |
|
) |
| |
#include <CGAL/boost/graph/io.h>
reads the graph g
from data in the OFF format.
Ignores comment lines which start with a hash, and lines with whitespace.
- Parameters
-
is | the input stream |
g | the graph to be read |
np | an optional sequence of Named Parameters among the ones listed below |
- Optional Named Parameters
-
a property map associating points to the vertices of
g
-
Type: a class model of
WritablePropertyMap with boost::graph_traits<FaceGraph>::vertex_descriptor as key type and Point_3 as value type
-
Default:
boost::get(CGAL::vertex_point, g)
-
Extra: If this parameter is omitted, an internal property map for
CGAL::vertex_point_t must be available in FaceGraph .
| |
- See also
- Overloads of this function for specific models of the concept
FaceGraph
.
- Precondition
- The data must represent a 2-manifold
- Attention
- The graph
g
is not cleared, and the data from the stream are added.
◆ read_off() [2/2]
template<typename FaceGraph , typename NamedParameters >
bool CGAL::read_off |
( |
const char * |
fname, |
|
|
FaceGraph & |
g, |
|
|
NamedParameters |
np |
|
) |
| |
#include <CGAL/boost/graph/io.h>
reads the graph g
from data in the OFF format.
Ignores comment lines which start with a hash, and lines with whitespace.
- See also
- Overloads of this function for specific models of the concept
FaceGraph
.
- Precondition
- The data must represent a 2-manifold
- Attention
- The graph
g
is not cleared, and the data from the stream are added.
◆ write_off() [1/2]
template<typename FaceGraph , typename NamedParameters >
bool CGAL::write_off |
( |
std::ostream & |
os, |
|
|
const FaceGraph & |
g, |
|
|
const NamedParameters & |
np |
|
) |
| |
#include <CGAL/boost/graph/io.h>
writes the graph g
in the OFF format.
- Parameters
-
os | the output stream |
g | the graph to be written |
np | an optional sequence of Named Parameters among the ones listed below |
- Optional Named Parameters
-
a property map associating points to the vertices of
g
-
Type: a class model of
ReadablePropertyMap with boost::graph_traits<FaceGraph>::vertex_descriptor as key type and Point_3 as value type
-
Default:
boost::get(CGAL::vertex_point, g)
-
Extra: If this parameter is omitted, an internal property map for
CGAL::vertex_point_t must be available in FaceGraph .
| |
- See also
- Overloads of this function for specific models of the concept
FaceGraph
.
◆ write_off() [2/2]
template<typename FaceGraph , typename NamedParameters >
bool CGAL::write_off |
( |
const char * |
fname, |
|
|
const FaceGraph & |
g, |
|
|
const NamedParameters & |
np |
|
) |
| |
#include <CGAL/boost/graph/io.h>
writes the graph g
in the OFF format into a file named fname
.
- See also
- Overloads of this function for specific models of the concept
FaceGraph
.
◆ write_vtp()
template<class TriangleMesh , class NamedParameters >
void CGAL::write_vtp |
( |
std::ostream & |
os, |
|
|
const TriangleMesh & |
mesh, |
|
|
const NamedParameters & |
np |
|
) |
| |
#include <CGAL/boost/graph/io.h>
writes a triangulated surface mesh in the PolyData
XML format.
- Template Parameters
-
- Parameters
-
os | the stream used for writing. |
mesh | the triangle mesh to be written. |
np | an optional sequence of Named Parameters among the ones listed below |
- Optional Named Parameters
-
Boolean indicating if the data should be written in binary (
true ) or in ASCII (false )
-
Type: Boolean
-
Default:
true
|
|
-
a property map associating points to the vertices of
mesh
-
Type: a class model of
ReadablePropertyMap with boost::graph_traits<TriangleMesh>::vertex_descriptor as key type and Point_3 as value type
-
Default:
boost::get(CGAL::vertex_point, mesh)
-
Extra: If this parameter is omitted, an internal property map for
CGAL::vertex_point_t must be available in TriangleMesh .
|
|
-
a property map associating to each vertex of
mesh a unique index between 0 and num_vertices(mesh) - 1
-
Type: a class model of
ReadablePropertyMap with boost::graph_traits<TriangleMesh>::vertex_descriptor as key type and std::size_t as value type
-
Default: an automatically indexed internal map
| |
◆ write_wrl()
template<typename FaceGraph , typename NamedParameters >
bool CGAL::write_wrl |
( |
std::ostream & |
os, |
|
|
const FaceGraph & |
g, |
|
|
const NamedParameters & |
np |
|
) |
| |
#include <CGAL/boost/graph/io.h>
writes the graph g
in the wrl format (VRML 2.0).
- Parameters
-
os | the output stream |
g | the graph to be written |
np | an optional sequence of Named Parameters among the ones listed below |
- Optional Named Parameters
-
a property map associating points to the vertices of
g
-
Type: a class model of
ReadablePropertyMap with boost::graph_traits<FaceGraph>::vertex_descriptor as key type and Point_3 as value type
-
Default:
boost::get(CGAL::vertex_point, g)
-
Extra: If this parameter is omitted, an internal property map for
CGAL::vertex_point_t must be available in FaceGraph .
| |