I/O Functions for the OpenMesh (OM) File format.
◆ read_OM()
template<typename Graph , typename NamedParameters = CGAL::parameters::Default_named_parameters>
#include <CGAL/boost/graph/IO/OM.h>
reads the graph g
from the file fname
, using the OpenMesh (OM) File format.
The data is expected to represent a 2-manifold (possibly with borders).
- Attention
- The graph
g
is not cleared, and the data from the file are appended.
- Note
- This function is only available if OpenMesh is available (
CGAL_USE_OPENMESH
is defined or CMake target is linked with CGAL::OpenMesh_support
).
- Template Parameters
-
- Parameters
-
fname | the name of the input file |
g | the graph to be built from the input data |
np | optional Named Parameters described below |
- Optional Named Parameters
-
a property map associating points to the vertices of
g
-
Type: a class model of
WritablePropertyMap with boost::graph_traits<Graph>::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 Graph .
| |
-
a property map containing the feature-or-not status of each edge of
g to be filled by the reader
-
Type: a class model of
WritablePropertyMap with boost::graph_traits<Graph>::edge_descriptor as key type and bool as value type.
-
Default: a default property map where no edge is marked as feature
| |
-
a property map containing the feature-or-not status of each vertex of
g to be filled by the reader
-
Type: a class model of
WritablePropertyMap with boost::graph_traits<Graph>::vertex_descriptor as key type and bool as value type.
-
Default: a default property map where no vertex is marked as feature
| |
- Returns
true
if reading was successful and the resulting mesh is valid, false
otherwise.
◆ write_OM()
template<typename Graph , typename NamedParameters = CGAL::parameters::Default_named_parameters>
#include <CGAL/boost/graph/IO/OM.h>
writes the graph g
into a file named fname
, using the OpenMesh (OM) File format.
- Note
- This function is only available if OpenMesh is available (
CGAL_USE_OPENMESH
is defined or CMake target is linked with CGAL::OpenMesh_support
).
- Template Parameters
-
- Parameters
-
fname | the output file |
g | the graph to be written |
np | optional Named Parameters described below |
- Optional Named Parameters
-
a property map associating points to the vertices of
g
-
Type: a class model of
ReadablePropertyMap with boost::graph_traits<Graph>::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 Graph .
| |
-
a property map containing the feature-or-not status of each edge of
g
-
Type: a class model of
ReadablePropertyMap with boost::graph_traits<Graph>::edge_descriptor as key type and bool as value type.
| |
-
a property map containing the feature-or-not status of each vertex of
g
-
Type: a class model of
ReadablePropertyMap with boost::graph_traits<Graph>::vertex_descriptor as key type and bool as value type.
| |
- Returns
true
if writing was successful, false
otherwise.