CGAL::operator>>

Definition

This operator reads a polyhedral surface in Object File Format, OFF, with file extension .off, which is also understood by GeomView [Phi96], from the input stream in and appends it to the polyhedral surface P. Only the point coordinates and facets from the input stream are used to build the polyhedral surface. Neither normal vectors nor color attributes are evaluated. If the stream in does not contain a permissible polyhedral surface the ios::badbit of the input stream in is set and P remains unchanged.

For OFF an ASCII and a binary format exist. The stream detects the format automatically and can read both.

#include <CGAL/IO/Polyhedron_iostream.h>

template <class PolyhedronTraits_3>
istream& istream& in >> CGAL::Polyhedron_3<PolyhedronTraits_3>& P

See Also

CGAL::Polyhedron_3<Traits>
CGAL::Polyhedron_incremental_builder_3<HDS>
operator<<.

Implementation

This operator is implemented using the modifier mechanism for polyhedral surfaces and the CGAL::Polyhedron_incremental_builder_3 class, which allows the construction in a single, efficient scan pass of the input and handles also all the possible flexibility of the polyhedral surface.