CGAL 6.2 - CGAL and the Boost Graph Library
Loading...
Searching...
No Matches
VTU I/O Functions

I/O Functions for the VTK (VTU / VTP / legacy) File Formats.

Functions

template<typename Graph , typename NamedParameters = CGAL::parameters::Default_named_parameters>
bool CGAL::IO::read_VTU (const std::string &fname, Graph &g, const NamedParameters &np=parameters::default_values())
 reads a PolyData in the VTK (VTU / VTP / legacy) File Formats into a triangulated surface mesh.
 

Function Documentation

◆ read_VTU()

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

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

reads a PolyData in the VTK (VTU / VTP / legacy) File Formats into a triangulated surface mesh.

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.
Template Parameters
Grapha model of MutableFaceGraph
NamedParametersa sequence of Named Parameters
Parameters
fnamethe path to the file that will be read
gthe output mesh
npoptional 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.
  • whether extra information is printed when an incident occurs during reading
  • Type: Boolean
  • Default: false
Returns
true if reading was successful, false otherwise.