CGAL 6.0 - CGAL and the Boost Graph Library
Loading...
Searching...
No Matches

I/O Functions for the Virtual Reality Modeling Language (VRML) File Format.

Functions

template<typename Graph , typename NamedParameters = CGAL::parameters::Default_named_parameters>
bool CGAL::IO::write_WRL (std::ostream &os, const Graph &g, const NamedParameters &np=parameters::default_values())
 writes the graph g into the output stream, using the Virtual Reality Modeling Language (VRML) File Format (VRML 2.0).
 
template<typename Graph , typename NamedParameters = CGAL::parameters::Default_named_parameters>
bool CGAL::IO::write_WRL (const std::string &fname, const Graph &g, const NamedParameters &np=parameters::default_values())
 writes the graph g into the output file, using the Virtual Reality Modeling Language (VRML) File Format (VRML 2.0).
 

Function Documentation

◆ write_WRL() [1/2]

template<typename Graph , typename NamedParameters = CGAL::parameters::Default_named_parameters>
bool CGAL::IO::write_WRL ( const std::string &  fname,
const Graph &  g,
const NamedParameters &  np = parameters::default_values() 
)

#include <CGAL/boost/graph/IO/WRL.h>

writes the graph g into the output file, using the Virtual Reality Modeling Language (VRML) File Format (VRML 2.0).

Template Parameters
Grapha model of FaceListGraph and HalfedgeListGraph
NamedParametersa sequence of Named Parameters
Parameters
fnamethe name of the output file
gthe graph to be written
npoptional 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 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_WRL() [2/2]

template<typename Graph , typename NamedParameters = CGAL::parameters::Default_named_parameters>
bool CGAL::IO::write_WRL ( std::ostream &  os,
const Graph &  g,
const NamedParameters &  np = parameters::default_values() 
)

#include <CGAL/boost/graph/IO/WRL.h>

writes the graph g into the output stream, using the Virtual Reality Modeling Language (VRML) File Format (VRML 2.0).

Template Parameters
Grapha model of FaceListGraph and HalfedgeListGraph
NamedParametersa sequence of Named Parameters
Parameters
osthe output stream
gthe graph to be written
npoptional 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 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.