CGAL 5.5.5 - 3D Boolean Operations on Nef Polyhedra
|
Functions | |
template<class Nef_polyhedron , class Polygon_mesh > | |
void | CGAL::convert_nef_polyhedron_to_polygon_mesh (const Nef_polyhedron &nef, Polygon_mesh &pm, bool triangulate_all_faces=false) |
Converts an objet of type Nef_polyhedron_3 into a polygon mesh model of MutableFaceGraph . More... | |
template<class Nef_polyhedron , typename PolygonRange , typename PointRange > | |
void | CGAL::convert_nef_polyhedron_to_polygon_soup (const Nef_polyhedron &nef, PointRange &points, PolygonRange &polygons, bool triangulate_all_faces=false) |
Converts an objet of type Nef_polyhedron_3 into a polygon soup. More... | |
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... | |
void CGAL::convert_nef_polyhedron_to_polygon_mesh | ( | const Nef_polyhedron & | nef, |
Polygon_mesh & | pm, | ||
bool | triangulate_all_faces = false |
||
) |
#include <CGAL/boost/graph/convert_nef_polyhedron_to_polygon_mesh.h>
Converts an objet of type Nef_polyhedron_3
into a polygon mesh model of MutableFaceGraph
.
Note that contrary to Nef_polyhedron_3::convert_to_polyhedron()
, the output is not triangulated (but faces with more than one connected component of the boundary). The polygon mesh can be triangulated by setting triangulate_all_faces
to true
or by calling the function triangulate_faces()
.
Nef_polyhedron | an object of type Nef_polyhedron_3 . |
Polygon_mesh | a model of MutableFaceGraph with an internal property map for CGAL::vertex_point_t . |
The points from nef
to pm
are converted using CGAL::Cartesian_converter<NefKernel, TargetKernel>
. NefKernel
and TargetKernel
are deduced using CGAL::Kernel_traits
from the point type of nef
and the value type of the vertex_point_map of tm
.
nef | the input. |
pm | the output. |
triangulate_all_faces | indicates whether all the faces must be triangulated. |
Polygon_mesh
must have an internal point property map with value type being Nef_polyhedron_3::Point_3
. nef.simple()
void CGAL::convert_nef_polyhedron_to_polygon_soup | ( | const Nef_polyhedron & | nef, |
PointRange & | points, | ||
PolygonRange & | polygons, | ||
bool | triangulate_all_faces = false |
||
) |
#include <CGAL/boost/graph/convert_nef_polyhedron_to_polygon_mesh.h>
Converts an objet of type Nef_polyhedron_3
into a polygon soup.
The polygons can be triangulated by setting triangulate_all_faces
to true
.
Nef_polyhedron | an object of type Nef_polyhedron_3 . |
PointRange | a model of the concept BackInsertionSequence whose value_type is the point type |
PolygonRange | a model of the concept BackInsertionSequence whose value_type is a model of the concept BackInsertionSequence whose value_type is std::size_t . |
The points from nef
to points
are converted using CGAL::Cartesian_converter<NefKernel, OutputKernel>
. NefKernel
and OutputKernel
are deduced using CGAL::Kernel_traits
from the point types.
nef | the input. |
points | the output points of the soup |
polygons | the output polygons of the soup. |
triangulate_all_faces | indicates whether all polygons must be triangulated. |
std::size_t CGAL::OFF_to_nef_3 | ( | std::istream & | in, |
Nef_polyhedron_3 & | N | ||
) |
#include <CGAL/OFF_to_nef_3.h>
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.
CGAL::Nef_polyhedron_3<Traits>
ostream& CGAL::operator<< | ( | std::ostream & | out, |
CGAL::Nef_polyhedron_3< Traits > & | N | ||
) |
#include <CGAL/IO/Nef_polyhedron_iostream_3.h>
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.
CGAL::Nef_polyhedron_3<Traits>
istream& CGAL::operator>> | ( | std::istream & | in, |
CGAL::Nef_polyhedron_3< Traits > & | N | ||
) |
#include <CGAL/IO/Nef_polyhedron_iostream_3.h>
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()
.
CGAL::Nef_polyhedron_3<Traits>