\( \newcommand{\E}{\mathrm{E}} \) \( \newcommand{\A}{\mathrm{A}} \) \( \newcommand{\R}{\mathrm{R}} \) \( \newcommand{\N}{\mathrm{N}} \) \( \newcommand{\Q}{\mathrm{Q}} \) \( \newcommand{\Z}{\mathrm{Z}} \) \( \def\ccSum #1#2#3{ \sum_{#1}^{#2}{#3} } \def\ccProd #1#2#3{ \sum_{#1}^{#2}{#3} }\)
CGAL 4.6.2 - 3D Boolean Operations on Nef Polyhedra
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Groups Pages

Functions

template<class Traits >
istream & CGAL::operator>> (std::istream &in, CGAL::Nef_polyhedron_3< Traits > &N)
 This operator reads a Nef polyhedron, which is given in the proprietary file format written by the input operator in and assigns it to N. More...
 
template<class Traits >
ostream & CGAL::operator<< (std::ostream &out, CGAL::Nef_polyhedron_3< Traits > &N)
 This operator writes the Nef polyhedron N to the output stream out using a proprietary file format. More...
 
template<class Nef_polyhedron_3 >
std::size_t CGAL::OFF_to_nef_3 (std::istream &in, Nef_polyhedron_3 &N)
 This function creates a 3D Nef polyhedron from an OFF file which is read from input stream in. More...
 

Function Documentation

template<class Nef_polyhedron_3 >
std::size_t CGAL::OFF_to_nef_3 ( std::istream &  in,
Nef_polyhedron_3 &  N 
)

This function creates a 3D Nef polyhedron from an OFF file which is read from input stream in.

The purpose of OFF_to_nef_3 is to create a Nef polyhedron from an OFF file that cannot be handled by the Nef_polyhedron_3 constructors. It handles double coordinates while using a homogenous kernel, non-coplanar facets, surfaces with boundaries, self-intersecting surfaces, and single facets. Every closed volume gets marked. The function returns the number of facets it could not handle.

See Also
CGAL::Nef_polyhedron_3<Traits>

#include <CGAL/OFF_to_nef_3.h>

Examples:
Nef_3/complex_construction.cpp.
template<class Traits >
ostream& CGAL::operator<< ( std::ostream &  out,
CGAL::Nef_polyhedron_3< Traits > &  N 
)

This operator writes the Nef polyhedron N to the output stream out using a proprietary file format.

It includes the complete incidence structure, the geometric data, and the marks of each item.

Using CGAL stream modifiers the following output formats can be chosen: ASCII (set_ascii_mode()), binary (set_binary_mode()) or pretty (set_pretty_mode()). The mandatory format is the ASCII format. It is recommended to use this format for file input and output.

As the output depends on the output operators of the geometric primitives provided by the traits class, it might not be possible that the input operator and output operators of different traits classes are not compatible. We recommend to use the CGAL kernels Homogeneous, Simple_homogeneous, or Extended_homogeneous parametrized with any exact number type that models \(\mathbb{Z}\) (e.g. Gmpz or leda_integer).

A bounded Nef_polyhedron_3<Extended_homogeneous> is automatically written as though Nef_polyhedron_3<Homogeneous> or Nef_polyhedron_3<Simple_homogeneous> is used. As a result, the input operator of each of these types can read the output.

See Also
CGAL::Nef_polyhedron_3<Traits>

#include <CGAL/IO/Nef_polyhedron_iostream_3.h>

template<class Traits >
istream& CGAL::operator>> ( std::istream &  in,
CGAL::Nef_polyhedron_3< Traits > &  N 
)

This operator reads a Nef polyhedron, which is given in the proprietary file format written by the input operator in and assigns it to N.

It includes the complete incidence structure, the geometric data, and the marks of each item.

It is recommended to use the CGAL kernels Homogeneous, Simple_homogeneous, or Extended_homogeneous parametrized with any exact number type that models \( \mathbb{Z}\) (e.g.Gmpz or leda_integer). The input and output iterators of Nef polyhedra parametrized with either of these kernels are compatible as long as the Nef polyhedron is bounded. An unbounded Nef polyhedron can only be read by a Nef polyhedron parametrized with an extended kernel. It is also recommended to use the CGAL stream modifier set_ascii_mode().

See Also
CGAL::Nef_polyhedron_3<Traits>

#include <CGAL/IO/Nef_polyhedron_iostream_3.h>