CGAL 5.5.2 - 3D Triangulations
|
I/O | |
The information in the When dimension \( <\) 3, the same information is stored for faces of maximal dimension instead of cells. | |
istream & | CGAL::Triangulation_3< Traits, TDS, SLDS >::operator>> (istream &is, Triangulation_3 &t) |
Reads the underlying combinatorial triangulation from is by calling the corresponding input operator of the triangulation data structure class (note that the infinite vertex is numbered 0), and the non-combinatorial information by calling the corresponding input operators of the vertex and the cell classes (such as point coordinates), which are provided by overloading the stream operators of the vertex and cell types. More... | |
ostream & | CGAL::Triangulation_3< Traits, TDS, SLDS >::operator<< (ostream &os, const Triangulation_3 &t) |
Writes the triangulation t into os . | |
template<typename Tr_src , typename ConvertVertex , typename ConvertCell > | |
std::istream & | CGAL::Triangulation_3< Traits, TDS, SLDS >::file_input (std::istream &is, ConvertVertex convert_vertex=ConvertVertex(), ConvertCell convert_cell=ConvertCell()) |
The triangulation streamed in is , of original type Tr_src , is written into the triangulation. More... | |
std::istream& CGAL::Triangulation_3< Traits, TDS, SLDS >::file_input | ( | std::istream & | is, |
ConvertVertex | convert_vertex = ConvertVertex() , |
||
ConvertCell | convert_cell = ConvertCell() |
||
) |
#include <CGAL/Triangulation_3.h>
The triangulation streamed in is
, of original type Tr_src
, is written into the triangulation.
As the vertex and cell types might be different and incompatible, the creation of new cells and vertices is made thanks to the functors convert_vertex
and convert_cell
, that convert vertex and cell types. For each vertex v_src
in is
, the corresponding vertex v_tgt
in the triangulation is a copy of the vertex returned by convert_vertex(v_src)
. The same operations are done for cells with the functor convert_cell, except cells in the triangulation are created using the default constructor, and then filled with the data contained in the stream.
ConvertVertex
must provide two operator()
s that are responsible for converting the source vertex v_src
into the target vertex:Vertex operator()(const Tr_src::Vertex& v_src) const;
This operator is used to create the vertex from v_src
.void operator()(const Tr_src::Vertex& v_src, Vertex& v_tgt) const;
This operator is meant to be used in case heavy data should be transferred to v_tgt
.c_src
into the target cell:void operator()(const Tr_src::Cell& c_src, Cell& c_tgt) const;
This operator is meant to be used in case data should be transferred to c_tgt
.is
can be obtained with the operator>>
of a Triangulation_3
. istream& CGAL::Triangulation_3< Traits, TDS, SLDS >::operator>> | ( | istream & | is, |
Triangulation_3< Traits, TDS, SLDS > & | t | ||
) |
#include <CGAL/Triangulation_3.h>
Reads the underlying combinatorial triangulation from is
by calling the corresponding input operator of the triangulation data structure class (note that the infinite vertex is numbered 0), and the non-combinatorial information by calling the corresponding input operators of the vertex and the cell classes (such as point coordinates), which are provided by overloading the stream operators of the vertex and cell types.
Assigns the resulting triangulation to t
.