diff --git a/Alpha_shapes_3/doc/Alpha_shapes_3/Alpha_shapes_3.txt b/Alpha_shapes_3/doc/Alpha_shapes_3/Alpha_shapes_3.txt
index db529f4a991..fdd63f691f8 100644
--- a/Alpha_shapes_3/doc/Alpha_shapes_3/Alpha_shapes_3.txt
+++ b/Alpha_shapes_3/doc/Alpha_shapes_3/Alpha_shapes_3.txt
@@ -2,13 +2,13 @@
namespace CGAL {
/*!
-\mainpage User Manual
+\mainpage User Manual
\anchor Chapter_3D_Alpha_Shapes
\cgalAutoToc
\authors Tran Kai Frank Da, Sébastien Loriot, and Mariette Yvinec
-\image html alphashape.png
-\image latex alphashape.png
+\image html alphashape.png
+\image latex alphashape.png
Assume we are given a set \f$ S\f$ of points in 2D or 3D and we would like to
have something like "the shape formed by these points". This is
@@ -56,8 +56,8 @@ are based on its generalization, the regular triangulation
replacing the euclidean distance by the power to weighted points.
Let us consider the basic case with a Delaunay triangulation.
-We first define the alpha complex of the set of points \f$ S\f$.
-The alpha complex is a subcomplex
+We first define the alpha complex of the set of points \f$ S\f$.
+The alpha complex is a subcomplex
of the Delaunay triangulation.
For a given value of \f$ \alpha\f$, the alpha complex includes
all the simplices in the Delaunay triangulation which have
@@ -75,17 +75,17 @@ singular if it is not a facet of a \f$ (k+1)\f$-simplex of the complex.
the alpha shapes correspond strictly to the above definition.
The regularized mode provides a regularized version of the alpha shapes.
It corresponds to the domain covered by a regularized version
-of the alpha complex where singular faces are removed
+of the alpha complex where singular faces are removed
(See \cgalFigureRef{figgenregex} for an example).
-\cgalFigureBegin{figgenregex,gen-reg-ex.png}
+\cgalFigureBegin{figgenregex,gen-reg-ex.png}
Comparison of general and regularized alpha-shape. Left: Some points are taken on the surface of a torus, three points being taken relatively far from the surface of the torus; Middle: The general alpha-shape (for a large enough alpha value) contains the singular triangle facet of the three isolated points; Right: The regularized version (for the same value of alpha) does not contains any singular facet.
\cgalFigureEnd
-The alpha shapes of a set of points
+The alpha shapes of a set of points
\f$ S\f$ form a discrete family, even though they
are defined for all real numbers \f$ \alpha\f$.
-The entire family of alpha shapes can be represented
+The entire family of alpha shapes can be represented
through the underlying triangulation of \f$ S\f$. In this representation
each \f$ k\f$-simplex of the underlying triangulation is associated with an
interval that specifies for which values of \f$ \alpha\f$ the \f$ k\f$-simplex
@@ -95,23 +95,23 @@ easily. Furthermore, we can select the optimal value
of \f$ \alpha\f$ to get an alpha shape including all data points
and having less than a given number of connected components.
Also, the alpha-values allows to define a filtration on the
-faces of the triangulation of a set of points.
+faces of the triangulation of a set of points.
In this filtration, the faces of the triangulation are output
-in increasing order of the alpha value
-for which they appear
+in increasing order of the alpha value
+for which they appear
in the alpha complex. In case of equal alpha values,
lower dimensional faces are output first.
The definition is analog in the case of weighted alpha shapes.
The input set is now a set of weighted points (which can be regarded
-as spheres) and the underlying triangulation
+as spheres) and the underlying triangulation
is the regular triangulation of this set.
Two spheres, or two weighted points, with centers \f$ C_1, C_2\f$
-and radii \f$ r_1, r_2 \f$ are said to be orthogonal iff
+and radii \f$ r_1, r_2 \f$ are said to be orthogonal iff
\f$ C_1C_2 ^2 = r_1^2 + r_2^2\f$ and suborthogonal
iff \f$ C_1C_2 ^2 < r_1^2 + r_2^2\f$.
For a given value of \f$ \alpha\f$,
-the weighted alpha complex is formed with the simplices of the
+the weighted alpha complex is formed with the simplices of the
regular triangulation triangulation
such that there is a sphere orthogonal to the weighted points associated
with the vertices of the simplex and suborthogonal to all the other
@@ -127,7 +127,7 @@ The class `Alpha_shape_3
` represents the whole
family of alpha shapes for a given set of points.
The class includes the underlying triangulation `Dt`
of the set, and associates to each \f$ k\f$-face of this triangulation
-an interval specifying
+an interval specifying
for which values of \f$ \alpha\f$ the face belongs to the
alpha complex.
The second template parameter, `ExactAlphaComparisonTag`, is a tag that,
@@ -139,11 +139,11 @@ the \f$ \alpha\f$ values where the alpha shape changes.
Additionally, the class has a filtration member function that, given
an output iterator with `Object`
-as value type, outputs the faces of the triangulation
-according to the
+as value type, outputs the faces of the triangulation
+according to the
order of apparition in the alpha complex when alpha increases.
-Finally, it provides a function to determine
+Finally, it provides a function to determine
the smallest value \f$ \alpha\f$
such that the alpha shape satisfies the following two properties:
@@ -157,7 +157,7 @@ points cannot be inserted or removed.
\subsection AlphaShape_3DAlphaShapeForAFixedAlpha Alpha Shape for a Fixed Alpha
-Given a value of alpha, the class `Fixed_alpha_shape_3- ` represents one
+Given a value of alpha, the class `Fixed_alpha_shape_3
- ` represents one
alpha shape for a given set of points.
The class includes the underlying triangulation `Dt`
of the set, and associates to each \f$ k\f$-face of this triangulation
@@ -168,7 +168,7 @@ points can be inserted or removed.
Both classes provide member functions to classify for a (given) value
of \f$ \alpha\f$ the different faces of the triangulation as
-`EXTERIOR`, `SINGULAR`, `REGULAR` or
+`EXTERIOR`, `SINGULAR`, `REGULAR` or
`INTERIOR` with respect
to the alpha shape. A \f$ k\f$-face on the boundary of the alpha complex
is said to be: `REGULAR` if it is a subface of the alpha-complex which
@@ -189,7 +189,7 @@ of its circumscribed circle is larger than alpha.
The classes provide also output iterators to get for a given `alpha` value
the vertices, edges, facets and cells of the different types
-(`EXTERIOR`, `SINGULAR`, `REGULAR` or
+(`EXTERIOR`, `SINGULAR`, `REGULAR` or
`INTERIOR`).
\subsection AlphaShape3DIO Input/Output
@@ -237,7 +237,7 @@ The triangulation data structure of the triangulation
has to be a model of the concept `TriangulationDataStructure_3`,
and it must be parameterized with vertex and cell classes, which are model of the concepts
`FixedAlphaShapeVertex_3` and `FixedAlphaShapeCell_3`.
-The package provides models `Fixed_alpha_shape_vertex_base_3`
+The package provides models `Fixed_alpha_shape_vertex_base_3`
and `Fixed_alpha_shape_cell_base_3`, respectively.
\subsection AlphaShape3D_ConceptAndModelsTDS Triangulation data structure
@@ -266,7 +266,7 @@ represents only one alpha shape (for a fixed alpha). When using the same kernel,
`Fixed_alpha_shape_3
- ` is a lighter version. It is thus naturally much more efficient
when the alpha-shape is needed for a single given value of alpha.
In addition, note that the class `Alpha_shape_3
- `
-requires constructions (squared radius of simplices) while the
+requires constructions (squared radius of simplices) while the
class `Fixed_alpha_shape_3
- ` uses only predicates.
This implies that a certified construction of one (several)
alpha-shape, using the `Alpha_shape_3
- ` requires a kernel
@@ -278,13 +278,13 @@ two that supports incremental insertion and removal of points.
We give the time spent while computing the alpha shape of a protein (considered
as a set of weighted points) featuring 4251 atoms (using `gcc 4.3` under Linux with `-O3`
-and `-DNDEBUG` flags, on a 2.27GHz Intel(R) Xeon(R) E5520 CPU):
+and `-DNDEBUG` flags, on a 2.27GHz Intel(R) Xeon(R) E5520 CPU):
Using `Exact_predicates_inexact_constructions_kernel`, building
the regular triangulation requires 0.09s, then the class `Fixed_alpha_shape_3
- `
required 0.05s while the class `Alpha_shape_3
- ` requires 0.35s
if `ExactAlphaComparisonTag` is `Tag_false` (and 0.70s with `Tag_true`).
Using `Exact_predicates_exact_constructions_kernel`, building
-the regular triangulation requires 0.19s and then the class `Alpha_shape_3
- `
+the regular triangulation requires 0.19s and then the class `Alpha_shape_3
- `
requires 0.90s.
\section Alpha_shapes_3Examples Examples
@@ -350,6 +350,6 @@ results will suffer from round-off problems.
\cgalExample{Alpha_shapes_3/ex_periodic_alpha_shapes_3.cpp}
-*/
+*/
} /* namespace CGAL */
diff --git a/Alpha_shapes_3/include/CGAL/IO/Alpha_shape_3_VRML_2_ostream.h b/Alpha_shapes_3/include/CGAL/IO/Alpha_shape_3_VRML_2_ostream.h
index b6b35831d81..2308b93b92d 100644
--- a/Alpha_shapes_3/include/CGAL/IO/Alpha_shape_3_VRML_2_ostream.h
+++ b/Alpha_shapes_3/include/CGAL/IO/Alpha_shape_3_VRML_2_ostream.h
@@ -1,9 +1,9 @@
-// Copyright (c) 1997
+// Copyright (c) 1997
// Utrecht University (The Netherlands),
// ETH Zurich (Switzerland),
// INRIA Sophia-Antipolis (France),
// Max-Planck-Institute Saarbruecken (Germany),
-// and Tel-Aviv University (Israel). All rights reserved.
+// and Tel-Aviv University (Israel). All rights reserved.
//
// This file is part of CGAL (www.cgal.org);
//
@@ -74,7 +74,7 @@ operator<<(VRML_2_ostream& os,
os << Indent << " ";
for (int i=0; i<4; i++)
if (i != (*Flist_it).second){
- os << V[(*Flist_it).first->vertex(i)];
+ os << V[(*Flist_it).first->vertex(i)];
os << ", ";
}
if (Flist_it != Flist_end)
diff --git a/BGL/doc/BGL/PackageDescription.txt b/BGL/doc/BGL/PackageDescription.txt
index 1f97d6e521b..23c068224b3 100644
--- a/BGL/doc/BGL/PackageDescription.txt
+++ b/BGL/doc/BGL/PackageDescription.txt
@@ -34,12 +34,12 @@ digraph example {
\cgalHeading{Notations}
- - `G`
- A type that is a model of a graph concept.
- - `g`
- An object of type `G`.
- - `u`, `v`
- Objects of type `boost::graph_traits::%vertex_descriptor`.
- - `h`
- An object of type `boost::graph_traits::%halfedge_descriptor`.
- - `e`
- An object of type `boost::graph_traits::%edge_descriptor`.
- - `f`
- An object of type `boost::graph_traits::%face_descriptor`.
+ - `G`
- A type that is a model of a graph concept.
+ - `g`
- An object of type `G`.
+ - `u`, `v`
- Objects of type `boost::graph_traits::%vertex_descriptor`.
+ - `h`
- An object of type `boost::graph_traits::%halfedge_descriptor`.
+ - `e`
- An object of type `boost::graph_traits::%edge_descriptor`.
+ - `f`
- An object of type `boost::graph_traits::%face_descriptor`.
\cgalHeading{%VertexListGraph}
diff --git a/BGL/include/CGAL/boost/graph/properties.h b/BGL/include/CGAL/boost/graph/properties.h
index 8fd55a00264..588ea76885e 100644
--- a/BGL/include/CGAL/boost/graph/properties.h
+++ b/BGL/include/CGAL/boost/graph/properties.h
@@ -5,7 +5,7 @@
// $URL$
// $Id$
// SPDX-License-Identifier: LGPL-3.0-or-later OR LicenseRef-Commercial
-//
+//
//
// Author(s) : Andreas Fabri, Fernando Cacciola
@@ -90,7 +90,7 @@ using boost::face_external_index;
namespace CGAL {
namespace internal {
-
+
template
struct Index_accessor
: boost::put_get_helper< std::size_t&, Index_accessor >
diff --git a/BGL/test/BGL/test_Prefix.h b/BGL/test/BGL/test_Prefix.h
index 6ed14a6590c..be2f523aaec 100644
--- a/BGL/test/BGL/test_Prefix.h
+++ b/BGL/test/BGL/test_Prefix.h
@@ -174,7 +174,7 @@ bool read_a_mesh(Polyhedron& p, const std::string& str)
}
template
-std::vector t_data()
+std::vector t_data()
{
std::vector vs;
for(unsigned int i = 0; i < sizeof(data) / sizeof(data[0]); ++i) {
@@ -258,7 +258,7 @@ struct Surface_fixture_1 {
f1 = CGAL::is_border(halfedge(u, m),m) ? face(opposite(halfedge(u, m), m), m) : face(halfedge(u, m), m);
assert(f1 != boost::graph_traits::null_face());
CGAL::Halfedge_around_face_iterator hafib, hafie;
- for(boost::tie(hafib, hafie) = CGAL::halfedges_around_face(halfedge(f1, m), m); hafib != hafie; ++hafib)
+ for(boost::tie(hafib, hafie) = CGAL::halfedges_around_face(halfedge(f1, m), m); hafib != hafie; ++hafib)
{
if(! CGAL::is_border(opposite(*hafib, m), m))
f2 = face(opposite(*hafib, m), m);
@@ -408,7 +408,7 @@ struct Surface_fixture_4 {
h2 = *hb;
++found;
}
- }
+ }
}
}
assert(found == 2);
@@ -442,7 +442,7 @@ struct Surface_fixture_5 {
} else if(get(pm, target(*hb,m)) == Point_3(2,-1,0)){
h2 = *hb;
found++;
- }
+ }
}
}
assert(found == 2);
@@ -461,9 +461,9 @@ struct Surface_fixture_6 {
assert(CGAL::is_valid_polygon_mesh(m));
typename boost::graph_traits::halfedge_descriptor h;
-
+
h1 = halfedge(*faces(m).first, m);
-
+
h2 = next(next(h1,m),m);
}
@@ -480,7 +480,7 @@ struct Surface_fixture_7 {
assert(is_reading_successful);
assert(CGAL::is_valid_polygon_mesh(m));
- h = *(halfedges(m).first);
+ h = *(halfedges(m).first);
}
Graph m;
@@ -512,9 +512,9 @@ struct Surface_fixture_8 {
get(pm, target(*hb,m)) == Point_3(0,0,0)){
h3 = *hb;
found++;
- }
+ }
}
-
+
assert(found == 3);
}
diff --git a/Geomview/include/CGAL/IO/Geomview_stream.h b/Geomview/include/CGAL/IO/Geomview_stream.h
index 118d368fa35..6aa44324fc4 100644
--- a/Geomview/include/CGAL/IO/Geomview_stream.h
+++ b/Geomview/include/CGAL/IO/Geomview_stream.h
@@ -1,16 +1,16 @@
-// Copyright (c) 1997,1998,1999,2000,2001
+// Copyright (c) 1997,1998,1999,2000,2001
// Utrecht University (The Netherlands),
// ETH Zurich (Switzerland),
// INRIA Sophia-Antipolis (France),
// Max-Planck-Institute Saarbruecken (Germany),
-// and Tel-Aviv University (Israel). All rights reserved.
+// and Tel-Aviv University (Israel). All rights reserved.
//
// This file is part of CGAL (www.cgal.org)
//
// $URL$
// $Id$
// SPDX-License-Identifier: LGPL-3.0-or-later OR LicenseRef-Commercial
-//
+//
//
// Author(s) : Andreas Fabri, Sylvain Pion
@@ -40,8 +40,8 @@ namespace CGAL {
class CGAL_EXPORT Geomview_stream {
public:
Geomview_stream(const Bbox_3 &bbox = Bbox_3(0,0,0, 1,1,1),
- const char *machine = nullptr,
- const char *login = nullptr);
+ const char *machine = nullptr,
+ const char *login = nullptr);
bool fail() const { return false; }
bool good() const { return true; }
@@ -90,62 +90,62 @@ public:
double get_vertex_radius() const
{
- return radius;
+ return radius;
}
double set_vertex_radius(double r)
{
- std::swap(r, radius);
- return r;
+ std::swap(r, radius);
+ return r;
}
int get_line_width() const
{
- return line_width;
+ return line_width;
}
int set_line_width(int w)
{
- std::swap(w, line_width);
+ std::swap(w, line_width);
return w;
}
bool set_wired(bool b)
{
- std::swap(b, wired_flag);
- return b;
+ std::swap(b, wired_flag);
+ return b;
}
bool get_wired() const
{
- return wired_flag;
+ return wired_flag;
}
bool set_echo(bool b)
{
- std::swap(b, echo_flag);
- return b;
+ std::swap(b, echo_flag);
+ return b;
}
bool get_echo() const
{
- return echo_flag;
+ return echo_flag;
}
bool set_raw(bool b)
{
- std::swap(b, raw_flag);
- return b;
+ std::swap(b, raw_flag);
+ return b;
}
bool get_raw() const
{
- return raw_flag;
+ return raw_flag;
}
bool set_trace(bool b)
{
- std::swap(b, trace_flag);
- return b;
+ std::swap(b, trace_flag);
+ return b;
}
bool get_trace() const
{
- return trace_flag;
+ return trace_flag;
}
void trace(const std::string s) const
@@ -171,27 +171,27 @@ public:
bool set_binary_mode(bool b = true)
{
- std::swap(b, binary_flag);
- return b;
+ std::swap(b, binary_flag);
+ return b;
}
bool set_ascii_mode(bool b = true)
{
- return !set_binary_mode(!b);
+ return !set_binary_mode(!b);
}
bool get_binary_mode() const
{
- return binary_flag;
+ return binary_flag;
}
bool get_ascii_mode() const
{
- return !binary_flag;
+ return !binary_flag;
}
std::string get_new_id(const std::string & s);
const Bbox_3 & get_bbox()
{
- return bb;
+ return bb;
}
void pickplane()
@@ -201,7 +201,7 @@ public:
static char* nth(char* s, int count);
static void parse_point(const char* pickpoint,
- double &x, double &y, double &z, double &w);
+ double &x, double &y, double &z, double &w);
private:
void setup_geomview(const char *machine, const char *login);
void frame(const Bbox_3 &bbox);
@@ -228,9 +228,9 @@ output_point(Geomview_stream &gv, const FT &x, const FT &y, const FT &z)
{
bool ascii_bak = true; // the initialization value shuts up the compiler.
if (!gv.get_raw()) {
- ascii_bak = gv.set_ascii_mode();
- gv << "(geometry " << gv.get_new_id("P")
- << " {appearance {linewidth 5 material {edgecolor "
+ ascii_bak = gv.set_ascii_mode();
+ gv << "(geometry " << gv.get_new_id("P")
+ << " {appearance {linewidth 5 material {edgecolor "
<< gv.vcr() << gv.vcg() << gv.vcb() << "}}{SKEL 1 1 ";
}
@@ -238,7 +238,7 @@ output_point(Geomview_stream &gv, const FT &x, const FT &y, const FT &z)
if (!gv.get_raw()) {
gv << "1 0\n}})";
- gv.set_ascii_mode(ascii_bak);
+ gv.set_ascii_mode(ascii_bak);
}
}
@@ -363,8 +363,8 @@ Geomview_stream::draw_triangles(InputIterator begin, InputIterator end)
std::vector points;
for (Tit i = triangles.begin(); i != triangles.end(); ++i)
for (int j = 0; j < 3; ++j)
- if (point_map.insert(typename Point_map::value_type(i->vertex(j),
- points.size())).second)
+ if (point_map.insert(typename Point_map::value_type(i->vertex(j),
+ points.size())).second)
points.push_back(i->vertex(j));
bool ascii_bak = get_ascii_mode();
@@ -383,8 +383,8 @@ Geomview_stream::draw_triangles(InputIterator begin, InputIterator end)
// Triangles vertices indices.
for (Tit tit = triangles.begin(); tit != triangles.end(); ++tit) {
(*this) << 3;
- for (int j = 0; j < 3; ++j)
- (*this) << point_map[tit->vertex(j)];
+ for (int j = 0; j < 3; ++j)
+ (*this) << point_map[tit->vertex(j)];
(*this) << 0; // without color.
}
// Footer.
@@ -487,14 +487,14 @@ operator<<(Geomview_stream &gv, const Ray_2 &r)
// Note: it won't work if double is not convertible to an RT...
const Bbox_3 & bb = gv.get_bbox();
Object result = intersection(Iso_rectangle_2(
- Point_2(bb.xmin(), bb.ymin()),
- Point_2(bb.xmax(), bb.ymax())), r);
+ Point_2(bb.xmin(), bb.ymin()),
+ Point_2(bb.xmax(), bb.ymax())), r);
Point_2 ipoint;
Segment_2 iseg;
if (assign(ipoint, result))
- gv << ipoint;
+ gv << ipoint;
else if (assign(iseg, result))
- gv << iseg;
+ gv << iseg;
return gv;
}
#endif
@@ -509,14 +509,14 @@ operator<<(Geomview_stream &gv, const Line_2 &r)
// Note: it won't work if double is not convertible to an RT...
const Bbox_3 & bb = gv.get_bbox();
Object result = intersection(Iso_rectangle_2(
- Point_2(bb.xmin(), bb.ymin()),
- Point_2(bb.xmax(), bb.ymax())), r);
+ Point_2(bb.xmin(), bb.ymin()),
+ Point_2(bb.xmax(), bb.ymax())), r);
Point_2 ipoint;
Segment_2 iseg;
if (assign(ipoint, result))
- gv << ipoint;
+ gv << ipoint;
else if (assign(iseg, result))
- gv << iseg;
+ gv << iseg;
return gv;
}
#endif
@@ -563,7 +563,7 @@ Geomview_stream&
operator>>(Geomview_stream &gv, Point_3 &point)
{
const char *gclpick =
- "(pick world pickplane * nil nil nil nil nil nil nil)";
+ "(pick world pickplane * nil nil nil nil nil nil nil)";
bool ascii_bak = gv.set_ascii_mode();
gv << "(pickable pickplane yes) (ui-target pickplane yes)"
@@ -580,7 +580,7 @@ operator>>(Geomview_stream &gv, Point_3 &point)
// we echo the input
if (gv.get_echo())
- gv << point;
+ gv << point;
// we are done and tell geomview to stop sending pick events
gv << "(uninterest " << gclpick << ") (pickable pickplane no)";
diff --git a/Linear_cell_complex/include/CGAL/Linear_cell_complex_constructors.h b/Linear_cell_complex/include/CGAL/Linear_cell_complex_constructors.h
index 6c5d00c316b..c4509d7feca 100644
--- a/Linear_cell_complex/include/CGAL/Linear_cell_complex_constructors.h
+++ b/Linear_cell_complex/include/CGAL/Linear_cell_complex_constructors.h
@@ -340,7 +340,7 @@ namespace CGAL {
std::ofstream output(filename);
if (!output.is_open())
{ return false; }
-
+
return write_off(alcc, output);
}
diff --git a/Mesh_2/doc/Mesh_2/Mesh_2.txt b/Mesh_2/doc/Mesh_2/Mesh_2.txt
index 3709fa6a895..fef716532ff 100644
--- a/Mesh_2/doc/Mesh_2/Mesh_2.txt
+++ b/Mesh_2/doc/Mesh_2/Mesh_2.txt
@@ -1,7 +1,7 @@
namespace CGAL {
/*!
-\mainpage User Manual
+\mainpage User Manual
\anchor Chapter_2D_Conforming_Triangulations_and_Meshes
\anchor userchapter2DMeshes
\cgalAutoToc
@@ -12,9 +12,9 @@ conforming triangulations and 2D meshes. Conforming triangulations will be
described in Section \ref secMesh_2_conforming_triangulation and
meshes in Section \ref secMesh_2_meshes.
-\section secMesh_2_conforming_triangulation Conforming Triangulations
+\section secMesh_2_conforming_triangulation Conforming Triangulations
-\subsection secMesh_2_conforming_definitions Definitions
+\subsection secMesh_2_conforming_definitions Definitions
A triangulation is a Delaunay triangulation if the circumscribing
circle of any facet of the triangulation contains no vertex in its
@@ -46,18 +46,18 @@ triangulation by adding vertices, called Steiner vertices, on
constrained edges until they are decomposed into subconstraints small enough
to be Delaunay or Gabriel edges.
-\subsection secMesh_2_building_conforming Building Conforming Triangulations
+\subsection secMesh_2_building_conforming Building Conforming Triangulations
Constrained Delaunay triangulations can be refined into
-conforming triangulations by the two following global functions:
+conforming triangulations by the two following global functions:
\code{.cpp}
-template
+template
void make_conforming_Delaunay_2 (CDT& t)
\endcode
\code{.cpp}
-template
+template
void make_conforming_Gabriel_2 (CDT& t)
\endcode
@@ -86,7 +86,7 @@ triangulation and then into a conforming Gabriel triangulation. For
additional control of the refinement algorithm, this class also provides
separate functions to insert one Steiner point at a time.
-\subsection secMesh_2_example_making_conforming Example: Making a Triangulation Conforming Delaunay and Then Conforming Gabriel
+\subsection secMesh_2_example_making_conforming Example: Making a Triangulation Conforming Delaunay and Then Conforming Gabriel
This example inserts several segments into a constrained Delaunay
triangulation, makes it conforming Delaunay, and then conforming
@@ -101,9 +101,9 @@ See \cgalFigureRef{Conformexampleconform}
From left to right: Initial Delaunay triangulation, the corresponding conforming Delaunay, and the corresponding Gabriel triangulation.
\cgalFigureEnd
-\section secMesh_2_meshes Meshes
+\section secMesh_2_meshes Meshes
-\subsection secMesh_2_meshes_definition Definitions
+\subsection secMesh_2_meshes_definition Definitions
A mesh is a partition of a given region into simplices whose shapes
and sizes satisfy several criteria.
@@ -121,10 +121,10 @@ boundary or internals constraints. The segments of the Pslg
cover the boundary of the domain.
The Pslg divides the plane into several connected components. By
-default, the domain is the union of the bounded connected components.
+default, the domain is the union of the bounded connected components.
See \cgalFigureRef{Domain} for an example of a domain
-defined without using seed points, and a possible mesh of it.
+defined without using seed points, and a possible mesh of it.
\cgalFigureBegin{Domain,domain-domain-mesh.png}
A domain defined without seed points and the generated mesh.
@@ -137,7 +137,7 @@ seed points mark components to be meshed or they mark components not to be
meshed (holes).
See
-\cgalFigureRef{Domainseeds} for another domain defined with the same Pslg and two seed points used to define holes.
+\cgalFigureRef{Domainseeds} for another domain defined with the same Pslg and two seed points used to define holes.
In the corresponding mesh these
two holes are triangulated but not meshed.
@@ -146,7 +146,7 @@ two holes are triangulated but not meshed.
A domain with two seeds points defining holes and the generated mesh.
\cgalFigureEnd
-\subsection secMesh_2_criteria Shape and Size Criteria
+\subsection secMesh_2_criteria Shape and Size Criteria
The shape criterion for triangles is a lower bound \f$ B\f$ on the ratio
between the circumradius and the shortest edge length. Such a bound
@@ -193,7 +193,7 @@ satisfy size and shape criteria except for the small input angles.
In addition, the algorithm may succeed in producing meshes with a lower
angle bound greater than \f$ 20.7\f$ degrees, but there is no such guarantee.
-\subsection secMesh_2_building_meshes Building Meshes
+\subsection secMesh_2_building_meshes Building Meshes
Meshes are obtained from
constrained Delaunay triangulations by calling the global function :
@@ -217,14 +217,14 @@ defines criteria that the triangles have to satisfy.
\cgal provides two models for this concept:
- `Delaunay_mesh_criteria_2`, that defines a shape criterion
-that bounds the minimum angle of triangles,
+that bounds the minimum angle of triangles,
- `Delaunay_mesh_size_criteria_2`, that adds to the previous
criterion a bound on the maximum edge length.
If the function `refine_Delaunay_mesh_2()` is called several times on the
-same triangulation with different criteria, the algorithm rebuilds the
-internal data structure used for meshing at every call. In order to avoid
+same triangulation with different criteria, the algorithm rebuilds the
+internal data structure used for meshing at every call. In order to avoid
rebuild the data structure at every call, the advanced user can
use the class `Delaunay_mesher_2`. This class provides also step
by step functions. Those functions insert one vertex at a time.
@@ -243,8 +243,8 @@ function of the face type (see the concept `DelaunayMeshFaceBase_2`).
\subsection secMesh_2_optimization Optimization of Meshes with Lloyd
-The package also provides a global function that runs Lloyd optimization iterations on the
-mesh generated by Delaunay refinement. The goal of this mesh optimization is to
+The package also provides a global function that runs Lloyd optimization iterations on the
+mesh generated by Delaunay refinement. The goal of this mesh optimization is to
improve the angles inside the mesh, and make them as close as possible to 60 degrees.
\code{.cpp}
@@ -257,7 +257,7 @@ Note that this global function has more parameters (see details in reference pag
This optimization process alternates relocating vertices to the center of mass
of their Voronoi cells, and updating the Delaunay connectivity of the triangulation.
-The center of mass is computed with respect to a sizing function that was designed to
+The center of mass is computed with respect to a sizing function that was designed to
preserve the local density of points in the mesh generated by Delaunay refinement.
See Figure \cgalFigureRef{Lloydfigure} for a mesh generated by `refine_Delaunay_mesh_2()` and optimized
@@ -270,7 +270,7 @@ shows the histogram of angles inside these meshes.
\cgalFigureEnd
\cgalFigureBegin{LloydHistogramfigure,lloyd-histograms.png}
-Histograms of angles inside the mesh after Delaunay refinement, and after 10 and 100 iterations
+Histograms of angles inside the mesh after Delaunay refinement, and after 10 and 100 iterations
of Lloyd optimization.
After Delaunay refinement, angles are in the interval [28.5; 121.9] degrees.
After 10 iterations of Lloyd optimization, they are in [29.1; 110.8]. 100 iterations take them to [29.3; 109.9].
@@ -316,11 +316,11 @@ faces is used to count them.
\subsubsection Mesh_2ExampleLloyd Example Using the Lloyd optimizer
-This example uses the global function `lloyd_optimize_mesh_2()`.
+This example uses the global function `lloyd_optimize_mesh_2()`.
The mesh is generated using the function `refine_Delaunay_mesh_2()` of `CGAL::Delaunay_mesher_2`,
-and is then optimized using `lloyd_optimize_mesh_2()`. The optimization will stop
+and is then optimized using `lloyd_optimize_mesh_2()`. The optimization will stop
after 10 (set by `max_iteration_number`) iterations of alternating vertex relocations
-and Delaunay connectivity updates. More termination conditions can be used and are detailed
+and Delaunay connectivity updates. More termination conditions can be used and are detailed
in the Reference Manual.
@@ -330,6 +330,6 @@ in the Reference Manual.
\section secMesh_2_IO Input/Output
It is possible to export the result of a meshing in VTU, using the function `write_vtu()`.
For more information about this format, see \ref IOStreamVTK.
-*/
+*/
} /* namespace CGAL */
diff --git a/Mesh_2/include/CGAL/IO/write_vtu.h b/Mesh_2/include/CGAL/IO/write_vtu.h
index 318779386ce..33d06f89b91 100644
--- a/Mesh_2/include/CGAL/IO/write_vtu.h
+++ b/Mesh_2/include/CGAL/IO/write_vtu.h
@@ -27,14 +27,14 @@
//todo try to factorize with functors
namespace CGAL{
// writes the appended data into the .vtu file
-template
+template
void
-write_vector(std::ostream& os,
- const std::vector& vect)
+write_vector(std::ostream& os,
+ const std::vector& vect)
{
const char* buffer = reinterpret_cast(&(vect[0]));
std::size_t size = vect.size()*sizeof(FT);
-
+
os.write(reinterpret_cast(&size), sizeof(std::size_t)); // number of bytes encoded
os.write(buffer, vect.size()*sizeof(FT)); // encoded data
}
@@ -42,7 +42,7 @@ write_vector(std::ostream& os,
// writes the cells tags before binary data is appended
template
-void
+void
write_cells_tag_2(std::ostream& os,
const CDT & tr,
std::size_t number_of_triangles,
@@ -64,18 +64,18 @@ write_cells_tag_2(std::ostream& os,
os << " \n"
<< " \n";
// 3 indices (size_t) per triangle + length of the encoded data (size_t)
- offset += (3 * number_of_triangles + 1) * sizeof(std::size_t);
+ offset += (3 * number_of_triangles + 1) * sizeof(std::size_t);
// 2 indices (size_t) per edge (size_t)
offset += (2 * std::distance(tr.constrained_edges_begin(),
- tr.constrained_edges_end())) * sizeof(std::size_t);
+ tr.constrained_edges_end())) * sizeof(std::size_t);
}
else {
- os << "\">\n";
- for(typename CDT::Finite_faces_iterator
+ os << "\">\n";
+ for(typename CDT::Finite_faces_iterator
fit = tr.finite_faces_begin(),
end = tr.finite_faces_end();
fit != end; ++fit)
@@ -89,11 +89,11 @@ write_cells_tag_2(std::ostream& os,
}
os << " \n";
}
-
+
// Write offsets
os << " \n";
offset += (number_of_triangles +std::distance(tr.constrained_edges_begin(),
@@ -102,9 +102,9 @@ write_cells_tag_2(std::ostream& os,
// 1 offset (size_t) per cell + length of the encoded data (size_t)
}
else {
- os << "\">\n";
+ os << "\">\n";
std::size_t cells_offset = 0;
- for(typename CDT::Finite_faces_iterator fit =
+ for(typename CDT::Finite_faces_iterator fit =
tr.finite_faces_begin() ;
fit != tr.finite_faces_end() ;
++fit )
@@ -114,7 +114,7 @@ write_cells_tag_2(std::ostream& os,
cells_offset += 3;
os << cells_offset << " ";
}
- }
+ }
os << " \n";
}
@@ -126,13 +126,13 @@ write_cells_tag_2(std::ostream& os,
os << " offset=\"" << offset << "\"/>\n";
offset += number_of_triangles
+ std::distance(tr.constrained_edges_begin(),
- tr.constrained_edges_end())
+ tr.constrained_edges_end())
+ sizeof(std::size_t);
// 1 unsigned char per cell + length of the encoded data (size_t)
}
else {
- os << "\">\n";
- for(typename CDT::Finite_faces_iterator fit =
+ os << "\">\n";
+ for(typename CDT::Finite_faces_iterator fit =
tr.finite_faces_begin() ;
fit != tr.finite_faces_end() ;
++fit )
@@ -147,7 +147,7 @@ write_cells_tag_2(std::ostream& os,
os << " \n";
}
-// writes the cells appended data at the end of the .vtu file
+// writes the cells appended data at the end of the .vtu file
template
void
write_cells_2(std::ostream& os,
@@ -160,9 +160,9 @@ write_cells_2(std::ostream& os,
std::vector cell_type(number_of_triangles,5); // triangles == 5
cell_type.resize(cell_type.size() + std::distance(tr.constrained_edges_begin(),
tr.constrained_edges_end()), 3); // line == 3
-
+
std::size_t off = 0;
- for(typename CDT::Finite_faces_iterator
+ for(typename CDT::Finite_faces_iterator
fit = tr.finite_faces_begin(),
end = tr.finite_faces_end();
fit != end; ++fit)
@@ -197,7 +197,7 @@ write_cells_2(std::ostream& os,
// writes the points tags before binary data is appended
template
-void
+void
write_cdt_points_tag(std::ostream& os,
const Tr & tr,
std::map & V,
@@ -218,12 +218,12 @@ write_cdt_points_tag(std::ostream& os,
<< format;
if (binary) {
- os << "\" offset=\"" << offset << "\"/>\n";
+ os << "\" offset=\"" << offset << "\"/>\n";
offset += 3 * tr.number_of_vertices() * sizeof(FT) + sizeof(std::size_t);
// dim coords per points + length of the encoded data (size_t)
}
else {
- os << "\">\n";
+ os << "\">\n";
for( Finite_vertices_iterator vit = tr.finite_vertices_begin();
vit != tr.finite_vertices_end();
++vit)
@@ -231,7 +231,7 @@ write_cdt_points_tag(std::ostream& os,
V[vit] = inum++;
os << vit->point()[0] << " ";
os << vit->point()[1] << " ";
- if(dim == 3)
+ if(dim == 3)
os << vit->point()[2] << " ";
else
os << 0.0 << " ";
@@ -241,7 +241,7 @@ write_cdt_points_tag(std::ostream& os,
os << " \n";
}
-// writes the points appended data at the end of the .vtu file
+// writes the points appended data at the end of the .vtu file
template
void
write_cdt_points(std::ostream& os,
@@ -270,37 +270,37 @@ write_cdt_points(std::ostream& os,
// writes the attribute tags before binary data is appended
template
-void
+void
write_attribute_tag_2 (std::ostream& os,
- const std::string& attr_name,
- const std::vector& attribute,
- bool binary,
- std::size_t& offset)
+ const std::string& attr_name,
+ const std::vector& attribute,
+ bool binary,
+ std::size_t& offset)
{
std::string format = binary ? "appended" : "ascii";
std::string type = (sizeof(T) == 8) ? "Float64" : "Float32";
- os << " \n";
+ os << "\" offset=\"" << offset << "\"/>\n";
offset += attribute.size() * sizeof(T) + sizeof(std::size_t);
}
else {
typedef typename std::vector::const_iterator Iterator;
- os << "\">\n";
+ os << "\">\n";
for (Iterator it = attribute.begin();
- it != attribute.end();
- ++it )
+ it != attribute.end();
+ ++it )
os << *it << " ";
os << " \n";
}
}
-// writes the attributes appended data at the end of the .vtu file
+// writes the attributes appended data at the end of the .vtu file
template
void
write_attributes_2(std::ostream& os,
- const std::vector& att)
+ const std::vector& att)
{
IO::internal::write_vector(os,att);
}
@@ -321,7 +321,7 @@ void write_vtu_with_attributes(std::ostream& os,
#else // CGAL_BIG_ENDIAN
os << " byte_order=\"BigEndian\"";
#endif
-
+
switch(sizeof(std::size_t)) {
case 4: os << " header_type=\"UInt32\""; break;
case 8: os << " header_type=\"UInt64\""; break;
@@ -329,16 +329,16 @@ void write_vtu_with_attributes(std::ostream& os,
}
os << ">\n"
<< " " << "\n";
-
+
int number_of_triangles = 0;
- for(typename CDT::Finite_faces_iterator
+ for(typename CDT::Finite_faces_iterator
fit = tr.finite_faces_begin(),
end = tr.finite_faces_end();
fit != end; ++fit)
{
if(fit->is_in_domain()) ++number_of_triangles;
}
- os << " \n";
std::size_t offset = 0;
const bool binary = (mode == IO::BINARY);
@@ -356,7 +356,7 @@ void write_vtu_with_attributes(std::ostream& os,
os << " \n"
<< " \n";
if (binary) {
- os << "\n_";
+ os << "\n_";
write_cdt_points(os,tr,V); // write points before cells to fill the std::map V
write_cells_2(os,tr, number_of_triangles, V);
for(std::size_t i = 0; i< attributes.size(); ++i)
diff --git a/Mesh_3/include/CGAL/IO/File_maya.h b/Mesh_3/include/CGAL/IO/File_maya.h
index a0730fa7ee1..228e7648bf8 100644
--- a/Mesh_3/include/CGAL/IO/File_maya.h
+++ b/Mesh_3/include/CGAL/IO/File_maya.h
@@ -27,8 +27,8 @@
namespace CGAL {
template
void
-output_to_maya(std::ostream& os,
- const C3T3& c3t3,
+output_to_maya(std::ostream& os,
+ const C3T3& c3t3,
bool surfaceOnly = true)
{
typedef typename C3T3::Triangulation Tr;
@@ -44,7 +44,7 @@ output_to_maya(std::ostream& os,
#ifdef CGAL_MESH_3_IO_VERBOSE
std::cerr << "Output to maya:\n";
#endif
-
+
const Tr& tr = c3t3.triangulation();
//-------------------------------------------------------
@@ -75,13 +75,13 @@ output_to_maya(std::ostream& os,
os << " setAttr \".cuvs\" -type \"string\" \"map1\";" << std::endl;
os << " setAttr \".dcol\" yes;" << std::endl;
os << " setAttr \".dcc\" -type \"string\" \"Ambient+Diffuse\";" << std::endl;
-
+
os << " connectAttr \"" << name << "Shape.iog\" \":initialShadingGroup.dsm\" -na;\n\n";
-
+
//-------------------------------------------------------
// Colors
//------------------------------------------------------
-
+
/*os << " setAttr \".ccls\" -type \"string\" \"colorSet\";\n";
os << " setAttr \".clst[0].clsn\" -type \"string\" \"colorSet\";\n";
os << " setAttr \".clst[0].rprt\" 3;\n";
@@ -90,11 +90,11 @@ output_to_maya(std::ostream& os,
os << " 100 250 50" << std::endl;
os << " 0 200 200" << std::endl;
os << " ;\n";*/
-
+
//-------------------------------------------------------
// Vertices
//------------------------------------------------------
-
+
boost::unordered_map V;
std::stringstream vertices_sstr;
int num_vertices = 0;
@@ -110,7 +110,7 @@ output_to_maya(std::ostream& os,
vertices_sstr << " " << CGAL::to_double(p.x()) << " " << CGAL::to_double(p.y()) << " " << CGAL::to_double(p.z()) << std::endl;
}
}
-
+
os << " setAttr -s " << num_vertices << " \".vt[0:" << num_vertices-1 << "]\"" << std::endl;
os << vertices_sstr.str();
os << ";\n";
@@ -134,7 +134,7 @@ output_to_maya(std::ostream& os,
//-------------------------------------------------------
typename C3T3::size_type number_of_triangles = c3t3.number_of_facets_in_complex();
-
+
std::stringstream facets_sstr;
//std::stringstream normals_sstr;
@@ -147,7 +147,7 @@ output_to_maya(std::ostream& os,
// Surface only
if (surfaceOnly)
{
- facets_sstr << " setAttr -s " << number_of_triangles
+ facets_sstr << " setAttr -s " << number_of_triangles
<< " \".fc[0:" << number_of_triangles-1 << "]\" -type \"polyFaces\" \n";
int c = 0;
for( Facet_iterator fit = c3t3.facets_in_complex_begin();
@@ -163,9 +163,9 @@ output_to_maya(std::ostream& os,
indices[j] = V[vh];
//points[j] = tr.point(fit->first, i);
}
-
+
// Reverse triangle orientation?
- bool reverse_triangle =
+ bool reverse_triangle =
(fit->second % 2 == 0 && !c3t3.is_in_complex(fit->first))
|| (fit->second % 2 != 0 && c3t3.is_in_complex(fit->first));
if (reverse_triangle)
@@ -194,7 +194,7 @@ output_to_maya(std::ostream& os,
// ith edge of triangle
facets_sstr << pos << " ";
}
-
+
// 1 triangles
facets_sstr << std::endl;
// Colors
@@ -204,7 +204,7 @@ output_to_maya(std::ostream& os,
// Tetrahedra = 4 facets for each
else
{
- facets_sstr << " setAttr -s " << 4*c3t3.number_of_cells_in_complex()
+ facets_sstr << " setAttr -s " << 4*c3t3.number_of_cells_in_complex()
<< " \".fc[0:" << 4*c3t3.number_of_cells_in_complex()-1 << "]\" -type \"polyFaces\" \n";
int c = 0;
for( Cell_iterator cit = c3t3.cells_in_complex_begin();
@@ -222,7 +222,7 @@ output_to_maya(std::ostream& os,
indices[j] = V[vh];
//points[j] = tr.point(cit, i);
}
-
+
// Reverse triangle orientation?
bool reverse_triangle = (facet_i % 2 != 0 && c3t3.is_in_complex(cit, facet_i));
if (reverse_triangle)
@@ -251,7 +251,7 @@ output_to_maya(std::ostream& os,
// ith edge of triangle
facets_sstr << pos << " ";
}
-
+
// 1 triangles
facets_sstr << std::endl;
// Colors
@@ -261,30 +261,30 @@ output_to_maya(std::ostream& os,
}
facets_sstr << ";\n\n";
//normals_sstr << ";\n\n";
-
+
//-------------------------------------------------------
// Edges
//-------------------------------------------------------
- os << " setAttr -s " << edges.size() << " \".ed[0:"
+ os << " setAttr -s " << edges.size() << " \".ed[0:"
<< edges.size() - 1 << "]\"" << std::endl;
for (EdgeList::const_iterator it = edges.begin(), it_end = edges.end() ; it != it_end ; ++it)
os << " " << it->first << " " << it->second << " " << 0 << std::endl;
os << ";\n";
-
+
//-------------------------------------------------------
// Normals
//-------------------------------------------------------
-
+
//os << normals_sstr.str();
//-------------------------------------------------------
// Facets
//-------------------------------------------------------
-
+
os << facets_sstr.str();
-
+
//-------------------------------------------------------
// Tetrahedra
//-------------------------------------------------------
diff --git a/Mesh_3/include/CGAL/IO/File_medit.h b/Mesh_3/include/CGAL/IO/File_medit.h
index 41d6bb991e2..81afaedf5dd 100644
--- a/Mesh_3/include/CGAL/IO/File_medit.h
+++ b/Mesh_3/include/CGAL/IO/File_medit.h
@@ -126,13 +126,13 @@ private:
else
return -1;
}
-
+
private:
const C3T3& r_c3t3_;
Subdomain_map subdomain_map_;
};
-
-// Accessor
+
+// Accessor
template
int
get(const Rebind_cell_pmap& cmap,
@@ -146,7 +146,7 @@ unsigned int get_size(const Rebind_cell_pmap& cmap)
{
return cmap.subdomain_number();
}
-
+
// -----------------------------------
// No_rebind_cell_pmap
@@ -157,21 +157,21 @@ class No_rebind_cell_pmap
typedef typename C3T3::Subdomain_index Subdomain_index;
typedef typename C3T3::Cell_handle Cell_handle;
typedef unsigned int size_type;
-
+
public:
No_rebind_cell_pmap(const C3T3& c3t3)
: r_c3t3_(c3t3) {}
-
+
int subdomain_index(const Cell_handle& ch) const
{
return static_cast(r_c3t3_.subdomain_index(ch));
}
-
+
size_type subdomain_number() const
{
typedef typename C3T3::Cells_in_complex_iterator Cell_iterator;
std::set subdomain_set;
-
+
for( Cell_iterator cell_it = r_c3t3_.cells_in_complex_begin();
cell_it != r_c3t3_.cells_in_complex_end();
++cell_it)
@@ -179,15 +179,15 @@ public:
// Add subdomain index in set
subdomain_set.insert(subdomain_index(cell_it));
}
-
+
return subdomain_set.size();
}
-
+
private:
const C3T3& r_c3t3_;
};
-
-// Accessor
+
+// Accessor
template
int
get(const No_rebind_cell_pmap& cmap,
@@ -195,8 +195,8 @@ get(const No_rebind_cell_pmap& cmap,
{
return cmap.subdomain_index(ch);
}
-
-
+
+
// -----------------------------------
// Rebind_facet_pmap
// -----------------------------------
@@ -207,17 +207,17 @@ class Rebind_facet_pmap
typedef std::map Surface_map;
typedef typename C3T3::Facet Facet;
typedef unsigned int size_type;
-
+
public:
Rebind_facet_pmap(const C3T3& c3t3, const Cell_pmap& cell_pmap)
: r_c3t3_(c3t3)
, cell_pmap_(cell_pmap)
{
typedef typename C3T3::Facets_in_complex_iterator Facet_iterator;
-
+
int first_index = 1;
int index_counter = first_index;
-
+
for( Facet_iterator facet_it = r_c3t3_.facets_in_complex_begin();
facet_it != r_c3t3_.facets_in_complex_end();
++facet_it)
@@ -229,11 +229,11 @@ public:
if(is_insert_successful.second)
++index_counter;
}
-
+
// Find cell_pmap_ unused indices
typedef typename C3T3::Cells_in_complex_iterator Cell_iterator;
std::set cell_label_set;
-
+
for( Cell_iterator cell_it = r_c3t3_.cells_in_complex_begin();
cell_it != r_c3t3_.cells_in_complex_end();
++cell_it)
@@ -241,7 +241,7 @@ public:
// Add subdomain index in set
cell_label_set.insert(get(cell_pmap_, cell_it));
}
-
+
// Rebind indices
index_counter = get_first_unused_label(cell_label_set,first_index);
for ( typename Surface_map::iterator mit = surface_map_.begin() ;
@@ -251,11 +251,11 @@ public:
mit->second = index_counter++;
index_counter = get_first_unused_label(cell_label_set,index_counter);
}
-
+
#ifdef CGAL_MESH_3_IO_VERBOSE
std::cerr << "Nb of surface patches: " << surface_map_.size() << "\n";
std::cerr << "Surface mapping:\n\t" ;
-
+
typedef typename Surface_map::iterator Surface_map_iterator;
for ( Surface_map_iterator surf_it = surface_map_.begin() ;
surf_it != surface_map_.end() ;
@@ -267,17 +267,17 @@ public:
std::cerr << "\n";
#endif
}
-
+
int surface_index(const Facet& f) const
{
return surface_index(r_c3t3_.surface_patch_index(f));
}
-
+
size_type surface_number() const
{
return surface_map_.size();
}
-
+
private:
int surface_index(const Surface_patch_index& index) const
{
@@ -288,23 +288,23 @@ private:
else
return -1;
}
-
+
int get_first_unused_label(const std::set& label_set,
int search_start) const
{
while ( label_set.end() != label_set.find(search_start) )
++search_start;
-
+
return search_start;
}
-
+
private:
const C3T3& r_c3t3_;
const Cell_pmap& cell_pmap_;
Surface_map surface_map_;
};
-
+
// Accessors
template
int
@@ -313,7 +313,7 @@ get(const Rebind_facet_pmap& fmap,
{
return fmap.surface_index(f);
}
-
+
template
unsigned int
get_size(const Rebind_facet_pmap& fmap,
@@ -322,7 +322,7 @@ get_size(const Rebind_facet_pmap& fmap,
return fmap.surface_number(f);
}
-
+
// -----------------------------------
// No_rebind_facet_pmap
// -----------------------------------
@@ -332,7 +332,7 @@ class No_rebind_facet_pmap
typedef typename C3T3::Surface_patch_index Surface_patch_index;
typedef typename C3T3::Facet Facet;
typedef unsigned int size_type;
-
+
public:
No_rebind_facet_pmap(const C3T3& c3t3, const Cell_pmap& /*cell_pmap*/)
: r_c3t3_(c3t3) {}
@@ -341,7 +341,7 @@ public:
{
return static_cast(r_c3t3_.surface_patch_index(f));
}
-
+
private:
const C3T3& r_c3t3_;
};
@@ -365,16 +365,16 @@ class No_rebind_facet_pmap_first
typedef typename C3T3::Surface_patch_index Surface_patch_index;
typedef typename C3T3::Facet Facet;
typedef unsigned int size_type;
-
+
public:
No_rebind_facet_pmap_first(const C3T3& c3t3, const Cell_pmap& /*cell_pmap*/)
: r_c3t3_(c3t3) {}
-
+
int surface_index(const Facet& f) const
{
return static_cast(r_c3t3_.surface_patch_index(f).first);
}
-
+
private:
const C3T3& r_c3t3_;
};
@@ -388,8 +388,8 @@ get(const No_rebind_facet_pmap_first& fmap,
{
return fmap.surface_index(f);
}
-
-
+
+
// -----------------------------------
// No_rebind_facet_pmap_second
// -----------------------------------
@@ -399,16 +399,16 @@ class No_rebind_facet_pmap_second
typedef typename C3T3::Surface_patch_index Surface_patch_index;
typedef typename C3T3::Facet Facet;
typedef unsigned int size_type;
-
+
public:
No_rebind_facet_pmap_second(const C3T3& c3t3, const Cell_pmap& /*cell_pmap*/)
: r_c3t3_(c3t3) {}
-
+
int surface_index(const Facet& f) const
{
return static_cast(r_c3t3_.surface_patch_index(f).second);
}
-
+
private:
const C3T3& r_c3t3_;
};
@@ -422,9 +422,9 @@ get(const No_rebind_facet_pmap_second& fmap,
{
return fmap.surface_index(f);
}
-
-
-
+
+
+
// -----------------------------------
// No_patch_facet_pmap_first
// -----------------------------------
@@ -434,32 +434,32 @@ class No_patch_facet_pmap_first
typedef typename C3T3::Surface_patch_index Surface_patch_index;
typedef typename C3T3::Facet Facet;
typedef typename C3T3::Cell_handle Cell_handle;
-
+
public:
No_patch_facet_pmap_first(const C3T3&, const Cell_pmap& cell_pmap)
: cell_pmap_(cell_pmap) { }
-
+
int surface_index(const Facet& f) const
{
Cell_handle c1 = f.first;
Cell_handle c2 = c1->neighbor(f.second);
-
+
int label1 = get(cell_pmap_,c1);
int label2 = get(cell_pmap_,c2);
-
+
if ( 0 == label1 || -1 == label1 )
label1 = label2;
if ( 0 == label2 || -1 == label2 )
label2 = label1;
-
+
return (std::min)(label1,label2);
}
-
+
private:
const Cell_pmap& cell_pmap_;
};
-// Accessors
+// Accessors
template
int
get(const No_patch_facet_pmap_first& fmap,
@@ -477,32 +477,32 @@ class No_patch_facet_pmap_second
typedef typename C3T3::Surface_patch_index Surface_patch_index;
typedef typename C3T3::Facet Facet;
typedef typename C3T3::Cell_handle Cell_handle;
-
+
public:
No_patch_facet_pmap_second(const C3T3&, const Cell_pmap& cell_pmap)
: cell_pmap_(cell_pmap) { }
-
+
int surface_index(const Facet& f) const
{
Cell_handle c1 = f.first;
Cell_handle c2 = c1->neighbor(f.second);
-
+
int label1 = get(cell_pmap_,c1);
int label2 = get(cell_pmap_,c2);
-
+
if ( 0 == label1 || -1 == label1 )
label1 = label2;
if ( 0 == label2 || -1 == label2 )
label2 = label1;
-
+
return (std::max)(label1,label2);
}
-
+
private:
const Cell_pmap& cell_pmap_;
};
-// Accessors
+// Accessors
template
int
get(const No_patch_facet_pmap_second& fmap,
@@ -510,11 +510,11 @@ get(const No_patch_facet_pmap_second& fmap,
{
return fmap.surface_index(f);
}
-
-
+
+
// -----------------------------------
// Default_vertex_index_pmap
-// -----------------------------------
+// -----------------------------------
template
class Default_vertex_pmap
{
@@ -611,26 +611,26 @@ get(const Default_vertex_pmap& vmap,
// -----------------------------------
// Null pmap
-// -----------------------------------
+// -----------------------------------
template
struct Null_facet_pmap
{
Null_facet_pmap(const C3T3&, const Cell_pmap&) {}
};
-
+
template
int get(const Null_facet_pmap&,
const typename C3T3::Facet&)
{
return 0;
}
-
+
template
struct Null_vertex_pmap
{
Null_vertex_pmap(const C3T3&, const Cell_pmap&, const Facet_pmap&) {}
};
-
+
template
int get(const Null_vertex_pmap&,
const typename C3T3::Vertex_handle&)
@@ -645,7 +645,7 @@ int get(const Null_vertex_pmap&,
template
struct Medit_pmap_generator{};
-
+
template
struct Medit_pmap_generator
{
@@ -653,11 +653,11 @@ struct Medit_pmap_generator
typedef Rebind_facet_pmap Facet_pmap;
typedef Null_facet_pmap Facet_pmap_twice;
typedef Default_vertex_pmap Vertex_pmap;
-
+
bool print_twice() { return false; }
};
-
-
+
+
template
struct Medit_pmap_generator
{
@@ -665,7 +665,7 @@ struct Medit_pmap_generator
typedef No_patch_facet_pmap_first Facet_pmap;
typedef No_patch_facet_pmap_second Facet_pmap_twice;
typedef Default_vertex_pmap Vertex_pmap;
-
+
bool print_twice() { return true; }
};
@@ -677,10 +677,10 @@ struct Medit_pmap_generator
typedef No_patch_facet_pmap_first Facet_pmap;
typedef No_patch_facet_pmap_second Facet_pmap_twice;
typedef Default_vertex_pmap Vertex_pmap;
-
+
bool print_twice() { return true; }
};
-
+
template
struct Medit_pmap_generator
{
@@ -688,17 +688,17 @@ struct Medit_pmap_generator
typedef Rebind_facet_pmap Facet_pmap;
typedef Null_facet_pmap Facet_pmap_twice;
typedef Null_vertex_pmap Vertex_pmap;
-
+
bool print_twice() { return false; }
};
-
+
//-------------------------------------------------------
// IO functions
//-------------------------------------------------------
-
+
template
void
output_to_medit(std::ostream& os,
@@ -707,18 +707,18 @@ output_to_medit(std::ostream& os,
#ifdef CGAL_MESH_3_IO_VERBOSE
std::cerr << "Output to medit:\n";
#endif
-
+
typedef Medit_pmap_generator Generator;
typedef typename Generator::Cell_pmap Cell_pmap;
typedef typename Generator::Facet_pmap Facet_pmap;
typedef typename Generator::Facet_pmap_twice Facet_pmap_twice;
typedef typename Generator::Vertex_pmap Vertex_pmap;
-
+
Cell_pmap cell_pmap(c3t3);
Facet_pmap facet_pmap(c3t3,cell_pmap);
Facet_pmap_twice facet_pmap_twice(c3t3,cell_pmap);
Vertex_pmap vertex_pmap(c3t3,cell_pmap,facet_pmap);
-
+
output_to_medit(os,
c3t3,
vertex_pmap,
@@ -726,14 +726,14 @@ output_to_medit(std::ostream& os,
cell_pmap,
facet_pmap_twice,
Generator().print_twice());
-
+
#ifdef CGAL_MESH_3_IO_VERBOSE
std::cerr << "done.\n";
#endif
}
-
+
template subdomain_index() > f.first->neighbor(f.second)->subdomain_index())
f = tr.mirror_facet(f);
}
-
+
// Get facet vertices in CCW order.
Vertex_handle vh1 = f.first->vertex((f.second + 1) % 4);
Vertex_handle vh2 = f.first->vertex((f.second + 2) % 4);
Vertex_handle vh3 = f.first->vertex((f.second + 3) % 4);
-
+
// Facet orientation also depends on parity.
if (f.second % 2 != 0)
std::swap(vh2, vh3);
-
- os << V[vh1] << ' ' << V[vh2] << ' ' << V[vh3] << ' ';
+
+ os << V[vh1] << ' ' << V[vh2] << ' ' << V[vh3] << ' ';
os << get(facet_pmap, *fit) << '\n';
-
+
// Print triangle again if needed, with opposite orientation
if ( print_each_facet_twice )
{
- os << V[vh3] << ' ' << V[vh2] << ' ' << V[vh1] << ' ';
+ os << V[vh3] << ' ' << V[vh2] << ' ' << V[vh1] << ' ';
os << get(facet_twice_pmap, *fit) << '\n';
}
}
diff --git a/Mesh_3/include/CGAL/IO/output_to_vtu.h b/Mesh_3/include/CGAL/IO/output_to_vtu.h
index ea9fefd1edb..a6041c49f69 100644
--- a/Mesh_3/include/CGAL/IO/output_to_vtu.h
+++ b/Mesh_3/include/CGAL/IO/output_to_vtu.h
@@ -30,7 +30,7 @@
namespace CGAL{
template
-void
+void
write_cells_tag(std::ostream& os,
const C3T3 & c3t3,
std::map & V,
@@ -52,7 +52,7 @@ write_cells_tag(std::ostream& os,
os << " \n"
<< " \n";
offset += (4 * c3t3.number_of_cells() + 1) * sizeof(std::size_t);
@@ -69,11 +69,11 @@ write_cells_tag(std::ostream& os,
}
os << "\n \n";
}
-
+
// Write offsets
os << " \n";
offset += (c3t3.number_of_cells() + 1) * sizeof(std::size_t);
@@ -83,12 +83,12 @@ write_cells_tag(std::ostream& os,
os << ">\n";
std::size_t cells_offset = 0;
for( Cell_iterator cit = c3t3.cells_in_complex_begin() ;
- cit != c3t3.cells_in_complex_end() ;
- ++cit )
+ cit != c3t3.cells_in_complex_end() ;
+ ++cit )
{
- cells_offset += 4;
- os << cells_offset << " ";
- }
+ cells_offset += 4;
+ os << cells_offset << " ";
+ }
os << "\n \n";
}
@@ -104,8 +104,8 @@ write_cells_tag(std::ostream& os,
else {
os << ">\n";
for( Cell_iterator cit = c3t3.cells_in_complex_begin() ;
- cit != c3t3.cells_in_complex_end() ;
- ++cit )
+ cit != c3t3.cells_in_complex_end() ;
+ ++cit )
os << "10 ";
os << "\n \n";
}
@@ -131,7 +131,7 @@ write_cells(std::ostream& os,
off += 4;
offsets.push_back(off);
for (int i=0; i<4; i++)
- connectivity_table.push_back(V[cit->vertex(i)]);
+ connectivity_table.push_back(V[cit->vertex(i)]);
}
IO::internal::write_vector(os,connectivity_table);
@@ -141,7 +141,7 @@ write_cells(std::ostream& os,
template
-void
+void
write_c3t3_points_tag(std::ostream& os,
const Tr & tr,
std::size_t size_of_vertices,
@@ -163,12 +163,12 @@ write_c3t3_points_tag(std::ostream& os,
<< format;
if (binary) {
- os << "\" offset=\"" << offset << "\"/>\n";
+ os << "\" offset=\"" << offset << "\"/>\n";
offset += 3 * size_of_vertices * sizeof(FT) + sizeof(std::size_t);
// dim coords per points + length of the encoded data (size_t)
}
else {
- os << "\">\n";
+ os << "\">\n";
for( Finite_vertices_iterator vit = tr.finite_vertices_begin();
vit != tr.finite_vertices_end();
++vit)
@@ -187,7 +187,7 @@ write_c3t3_points_tag(std::ostream& os,
os << " \n";
}
-// writes the points appended data at the end of the .vtu file
+// writes the points appended data at the end of the .vtu file
template
void
write_c3t3_points(std::ostream& os,
@@ -217,12 +217,12 @@ write_c3t3_points(std::ostream& os,
// writes the attribute tags before binary data is appended
template
-void
+void
write_attribute_tag(std::ostream& os,
- const std::string& attr_name,
- const std::vector& attribute,
- bool binary,
- std::size_t& offset)
+ const std::string& attr_name,
+ const std::vector& attribute,
+ bool binary,
+ std::size_t& offset)
{
std::string format = binary ? "appended" : "ascii";
std::string type = "";
@@ -239,28 +239,28 @@ write_attribute_tag(std::ostream& os,
else
type = "UInt64";
}
- os << " \n";
+ os << "\" offset=\"" << offset << "\"/>\n";
offset += attribute.size() * sizeof(T) + sizeof(std::size_t);
}
else {
typedef typename std::vector::const_iterator Iterator;
- os << "\">\n";
+ os << "\">\n";
for (Iterator it = attribute.begin();
- it != attribute.end();
- ++it )
+ it != attribute.end();
+ ++it )
os << *it << " ";
os << "\n \n";
}
}
-// writes the attributes appended data at the end of the .vtu file
+// writes the attributes appended data at the end of the .vtu file
template
void
write_attributes(std::ostream& os,
- const std::vector& att)
+ const std::vector& att)
{
IO::internal::write_vector(os,att);
}
@@ -292,7 +292,7 @@ void output_to_vtu_with_attributes(std::ostream& os,
#else // CGAL_BIG_ENDIAN
os << " byte_order=\"BigEndian\"";
#endif
-
+
switch(sizeof(std::size_t)) {
case 4: os << " header_type=\"UInt32\""; break;
case 8: os << " header_type=\"UInt64\""; break;
@@ -328,7 +328,7 @@ void output_to_vtu_with_attributes(std::ostream& os,
os << " \n"
<< " \n";
if (binary) {
- os << "\n_";
+ os << "\n_";
write_c3t3_points(os,tr,V); // fills V if the mode is BINARY
write_cells(os,c3t3,V);
for(std::size_t i = 0; i< attributes.size(); ++i)
@@ -364,7 +364,7 @@ void output_to_vtu(std::ostream& os,
double v = cit->subdomain_index();
mids.push_back(v);
}
-
+
std::vector > atts;
Vtu_attributes v = &mids;
atts.push_back(std::make_pair("MeshDomain", v));
diff --git a/Point_set_processing_3/doc/Point_set_processing_3/Point_set_processing_3.txt b/Point_set_processing_3/doc/Point_set_processing_3/Point_set_processing_3.txt
index e91e9808702..1d8a90ca53c 100644
--- a/Point_set_processing_3/doc/Point_set_processing_3/Point_set_processing_3.txt
+++ b/Point_set_processing_3/doc/Point_set_processing_3/Point_set_processing_3.txt
@@ -1,7 +1,7 @@
namespace CGAL {
/*!
-\mainpage User Manual
+\mainpage User Manual
\anchor Chapter_Point_Set_Processing
\anchor chappoint_set_processing_3
@@ -22,12 +22,12 @@ Point set processing. Left: 275K points sampled on the statue of an elephant wit
In the context of surface reconstruction we can position the elements
of this component along the common surface reconstruction pipeline
(\cgalFigureRef{Point_set_processing_3figpipeline}) which involves the
-following steps:
+following steps:
-# Scanning and scan registration to produce a set of
points or points with normals;
-# Outlier removal;
--# Simplification to reduce the number of input points;
--# Smoothing to reduce noise in the input data;
+-# Simplification to reduce the number of input points;
+-# Smoothing to reduce noise in the input data;
-# Normal estimation and orientation when the normals are not already provided
by the acquisition device; and
-# Surface reconstruction. Chapter \ref Chapter_Poisson_Surface_Reconstruction "Poisson Surface Reconstruction"
@@ -84,9 +84,9 @@ The following classes described in Chapter \ref PkgPropertyMap
provide property maps for the implementations of points with normals
listed above:
-- `Identity_property_map`
-- `First_of_pair_property_map` and `Second_of_pair_property_map`
-- `Nth_of_tuple_property_map`
+- `Identity_property_map`
+- `First_of_pair_property_map` and `Second_of_pair_property_map`
+- `Nth_of_tuple_property_map`
`Identity_property_map` is the default value of the
position property map expected by all functions in this component.
@@ -96,7 +96,7 @@ See below examples using pair and tuple property maps.
Users of this package may use other types to represent positions and
normals if they implement the corresponding property maps.
-Points and normals can even be stored in separate containers
+Points and normals can even be stored in separate containers
and accessed by their index, as any built-in vector is also
a property map.
@@ -128,7 +128,7 @@ parameters (than can be deduced automatically in simple cases) are
moved to the end of the function in a single named parameter object
(see \ref BGLNamedParameters). The code translated to the current API
becomes:
-
+
\code
std::vector points;
@@ -297,7 +297,7 @@ The 4 functions presented here work both with 2D points and 3D points
and they shouldn't be used if the point sets do not sample a curve in
2D or a surface in 3D.
-\subsection Point_set_processing_3Example_scale_estimation_global Global Scale Example
+\subsection Point_set_processing_3Example_scale_estimation_global Global Scale Example
The following example reads a 3D point set in the `xyz` format and:
@@ -340,7 +340,7 @@ one point set w.r.t. another and directly aligns it to it.
\subsection Point_set_processing_3Examples_registration_OpenGR OpenGR Example
-The following example reads two point sets and aligns them using the
+The following example reads two point sets and aligns them using the
\ref thirdpartyOpenGR library, using the Super4PCS algorithm:
\cgalExample{Point_set_processing_3/registration_with_OpenGR.cpp}
@@ -389,7 +389,7 @@ defined by the parameter delta (accuracy).
Using too wide values will slow down the algorithm by increasing the size of the congruent set,
while using to small values prevents to find a solution. This parameter impacts other steps of
-the algorithm, see the paper \cgalCite{cgal:mam-sffgp-14} for more details.
+the algorithm, see the paper \cgalCite{cgal:mam-sffgp-14} for more details.
\subsubsection Point_set_processing_3Examples_registration_OpenGR_parameter_normal Parameter: maximum normal deviation
@@ -402,7 +402,7 @@ candidates that should indeed have been matched and may thus result in a quality
\subsubsection Point_set_processing_3Examples_registration_OpenGR_parameter_overlap Parameter: overlap
-Ratio of expected overlap between the two point sets: it is ranging between 0 (no overlap) to 1 (100% overlap).
+Ratio of expected overlap between the two point sets: it is ranging between 0 (no overlap) to 1 (100% overlap).
The overlap parameter controls the size of the basis used for registration, as shown below:
@@ -411,7 +411,7 @@ The effect of varying overlap parameter on the size of the basis used for regist
\cgalFigureEnd
Usually, the larger the overlap, the faster the algorithm.
-When the overlap is unknown, a simple way to set this parameter is to start from
+When the overlap is unknown, a simple way to set this parameter is to start from
100% overlap, and decrease the value until obtaining a good result.
Using too small values will slow down the algorithm, and
reduce the accuracy of the result.
@@ -424,7 +424,7 @@ randomly, it is recommended to use a large time value to explore the whole space
\subsection Point_set_processing_3Examples_registration_PointMatcher PointMatcher Example
-The following example reads two point sets and aligns them using the
+The following example reads two point sets and aligns them using the
\ref thirdpartylibpointmatcher library, using the ICP algorithm. It also shows how
to customize ICP algorithm by using possible configurations:
\cgalExample{Point_set_processing_3/registration_with_pointmatcher.cpp}
@@ -463,7 +463,7 @@ The method used for matching (linking) the points from to the points in the refe
Corresponds to `matcher` configuration module of \ref thirdpartylibpointmatcher
library. The matcher should be chosen and set from possible components of
-the `matcher` configuration module.
+the `matcher` configuration module.
See libpointmatcher documentation
for possible configurations.
@@ -478,7 +478,7 @@ range.
Corresponds to `outlierFilters` configuration module of \ref thirdpartylibpointmatcher
library. The filters should be chosen and set from possible components of
-the `outlierFilters` configuration module.
+the `outlierFilters` configuration module.
See libpointmatcher documentation
for possible configurations.
@@ -489,7 +489,7 @@ the error between the point sets.
Corresponds to `errorMinimizer` configuration module of \ref thirdpartylibpointmatcher
library. The error minimizer should be chosen and set from possible components of
-the `errorMinimizer` configuration module.
+the `errorMinimizer` configuration module.
See libpointmatcher documentation
for possible configurations.
@@ -500,7 +500,7 @@ typically provide deeper scrutiny than the logger.
Corresponds to `inspector` configuration module of \ref thirdpartylibpointmatcher
library. The inspector should be chosen and set from possible components of
-the `inspector` configuration module.
+the `inspector` configuration module.
See libpointmatcher documentation
for possible configurations.
@@ -512,7 +512,7 @@ does not get effected by this configuration.
Corresponds to `logger` configuration module of \ref thirdpartylibpointmatcher
library. The logger should be chosen and set from possible components of
-the `logger` configuration module.
+the `logger` configuration module.
See libpointmatcher documentation
for possible configurations.
@@ -526,7 +526,7 @@ The following example reads two point sets and aligns them by using both
\ref thirdpartyOpenGR and \ref thirdpartylibpointmatcher libraries, respectively.
It depicts a use case where a coarse estimation of a registration transformation
is done using the Super4PCS algorithm. Then, a fine registration from this coarse
-registration using the ICP algorithm.
+registration using the ICP algorithm.
\cgalExample{Point_set_processing_3/registration_with_opengr_pointmatcher_pipeline.cpp}
\cgalFigureRef{Point_set_processing_3tableRegistrationRegistration_visualization_table} demonstrates
@@ -603,7 +603,7 @@ above-mentioned example was used.
\cgalFigureCaptionBegin{Point_set_processing_3tableRegistrationRegistration_visualization_table}
Visualization of registered hippo scans with different registration methods.
Two scans are used: red as the reference, green as the one for which the transformation
-is computed and applied. To obtain the results, the example code given in
+is computed and applied. To obtain the results, the example code given in
\ref Point_set_processing_3Examples_registration_OpenGR ,
\ref Point_set_processing_3Examples_registration_PointMatcher ,
\ref Point_set_processing_3Examples_registration_OpenGR_PointMatcher_Pipeline
@@ -681,7 +681,7 @@ simplification of the point set through local clusters
directly selected by the user or it automatically adapts to the local
variation of the point set.
-Function `wlop_simplify_and_regularize_point_set()` not only simplifies,
+Function `wlop_simplify_and_regularize_point_set()` not only simplifies,
but also regularizes downsampled points. This is an implementation of
the Weighted Locally Optimal Projection (WLOP) algorithm \cgalCite{wlop-2009}.
@@ -743,7 +743,7 @@ Computing density weights for each point is an optional preprocessing. For examp
\cgalFigureBegin{Point_set_processing_3figWLOP_parameter_density, WLOP_parameter_density.jpg}
-Comparison between with and without density: Left: input. Middle: `require_uniform_sampling = false`. Right: `require_uniform_sampling=true`.
+Comparison between with and without density: Left: input. Middle: `require_uniform_sampling = false`. Right: `require_uniform_sampling=true`.
\cgalFigureEnd
\subsubsection Point_set_processing_3WLOP_parameter_neighborhood_size Parameter: neighbor_radius
@@ -754,14 +754,14 @@ Comparison between different sizes of neighbor radius.
\cgalFigureEnd
\subsubsection Point_set_processing_3WLOP_parallel_performance Parallel Performance
-A parallel version of WLOP is provided and requires the executable to be linked against the
+A parallel version of WLOP is provided and requires the executable to be linked against the
Intel TBB library.
To control the number of threads used, the user may use the tbb::task_scheduler_init class.
-See the TBB documentation
+See the TBB documentation
for more details. We provide below a speed-up chart generated using the parallel version of the WLOP algorithm. The machine used is a PC running Windows 7 64-bits with a 4-core i7-4700HQ@2.40GHz CPU with 8GB of RAM.
\cgalFigureBegin{Point_set_processing_3figWLOP_parallel_performance, parallel_WLOP_performance.jpg}
-Parallel WLOP speed-up, compared to the sequential version of the algorithm.
+Parallel WLOP speed-up, compared to the sequential version of the algorithm.
\cgalFigureEnd
@@ -771,11 +771,11 @@ Two smoothing functions are devised to smooth an input point set.
Function `jet_smooth_point_set()` smooths the input point set by
projecting each point onto a smooth parametric surface patch
-(so-called jet surface) fitted over its nearest neighbors.
+(so-called jet surface) fitted over its nearest neighbors.
Function `bilateral_smooth_point_set()` smooths the input point set by
iteratively projecting each point onto the implicit surface patch fitted over its nearest neighbors.
-Bilateral projection preserves sharp features according to the normal (gradient) information.
+Bilateral projection preserves sharp features according to the normal (gradient) information.
Normals are thus required as input. For more details, see section 4 of \cgalCite{ear-2013}.
For both functions, the user can either specify a fixed number of
@@ -783,7 +783,7 @@ nearest neighbors or a fixed spherical neighborhood radius.
\subsection Point_set_processing_3Example_jet_smoothing Jet Smoothing Example
-The following example generates a set of 9 points close to the `xy`
+The following example generates a set of 9 points close to the `xy`
plane and smooths them using 8 nearest neighbors:
\cgalExample{Point_set_processing_3/jet_smoothing_example.cpp}
@@ -798,14 +798,14 @@ Comparison for two smoothing methods: Left: Input, 250K points, normal-color map
\subsubsection Point_set_processing_3Bilateral_smoothing_parallel_performance Parallel
-Performance:
-A parallel version of bilateral smoothing is provided and requires the executable to be linked against the
+Performance:
+A parallel version of bilateral smoothing is provided and requires the executable to be linked against the
Intel TBB library.
The number of threads used is controlled through the tbb::task_scheduler_init class.
See the TBB documentation for more details. We provide below a speed-up chart generated using the parallel version of the bilateral smoothing algorithm. The machine used is a PC running Windows 7 64-bits with a 4-core i7-4700HQ@2.40GHz CPU with 8GB of RAM.
\cgalFigureBegin{Point_set_processing_3Bilateral_smoothing_parallel_performance, parallel_bilateral_smooth_point_set_performance.jpg}
-Parallel bilateral smoothing speed-up, compared to the sequential version of the algorithm.
+Parallel bilateral smoothing speed-up, compared to the sequential version of the algorithm.
\cgalFigureEnd
\section Point_set_processing_3NormalEstimation Normal Estimation
@@ -837,9 +837,9 @@ of nearest neighbors or a fixed spherical neighborhood radius.
Function `mst_orient_normals()` orients the normals of a set of
points with unoriented normals using the method described by Hoppe et
-al. in Surface reconstruction from unorganized points \cgalCite{cgal:hddms-srup-92}.
+al. in Surface reconstruction from unorganized points \cgalCite{cgal:hddms-srup-92}.
More specifically, this method constructs a
-Riemannian graph over the input points (the graph of the
+Riemannian graph over the input points (the graph of the
nearest neighbor points) and propagates a seed normal orientation
within a minimum spanning tree computed over this graph. The result is
an oriented normal vector for each input unoriented normal, except for
@@ -873,7 +873,7 @@ The following example reads a point set from a file, upsamples it to get a dense
\subsubsection Point_set_processing_3Upsample_Parameter1 Parameter: edge_sensitivity
This parameter controls where the new points are inserted. Larger values of edge-sensitivity give higher priority to inserting points along the sharp features.
-For example, as shown in the following figure, high value is preferable when one wants to insert more points on sharp features, where the local gradient is high, e.g., darts, cusps, creases and corners. In contrast, points are evenly inserted when edge_sensitivity is set to 0. The range of possible value is [0, 1].
+For example, as shown in the following figure, high value is preferable when one wants to insert more points on sharp features, where the local gradient is high, e.g., darts, cusps, creases and corners. In contrast, points are evenly inserted when edge_sensitivity is set to 0. The range of possible value is [0, 1].
\cgalFigureBegin{Point_set_processing_3figUpsample_edge_sensitivity, upsample_edge_sensitivity.jpg}
@@ -884,14 +884,14 @@ Upsampling for different edge-sensitivity parameter values. The input containing
This parameter controls the preservation of sharp features.
\cgalFigureBegin{Point_set_processing_3figUpsample_sharpness_angle, upsample_sharpness_angle.jpg}
-Upsampling for different sharpness_angle parameter values. The input containing 850 points is upsampled to 425K points in all cases depicted.
+Upsampling for different sharpness_angle parameter values. The input containing 850 points is upsampled to 425K points in all cases depicted.
\cgalFigureEnd
\subsubsection Point_set_processing_3upsample_neighborhood_size Parameter: neighbor_radius
Usually, the neighborhood of sample points should include at least one ring of neighboring sample points. Using small neighborhood size may not be able to insert new points. Using big neighborhood size can fill small holes, but points inserted on the edges could be irregular. The function will use a neighborhood size estimation if this parameter value is set to default or smaller than zero.
\cgalFigureBegin{Point_set_processing_3figupsample_neighborhood_size, upsample_neighborhood_size.jpg}
-Comparison between different sizes of neighbor radius.
+Comparison between different sizes of neighbor radius.
\cgalFigureEnd
\section Point_set_processing_3FeaturesEstimation Feature Edges Estimation
@@ -915,7 +915,7 @@ points that are on sharp edges:
The function `structure_point_set()` generates a structured version of
the input point set assigned to a set of planes. Such an input can be
-produced by a shape detection algorithm (see \ref PkgShapeDetectionRef).
+produced by a shape detection algorithm (see \ref PkgShapeDetectionRef).
Point set structuring is based on the article \cgalCite{cgal:la-srpss-13}.
- __Planes__: inliers of each detected plane are replaced by sets of
@@ -995,5 +995,5 @@ Started from GSoC'2019, Necip Fazil Yildiran with the help of Nicolas Mellado an
libraries that perform registration on two point sets.
-*/
+*/
} /* namespace CGAL */
diff --git a/Polygon_mesh_processing/include/CGAL/Polygon_mesh_processing/intersection.h b/Polygon_mesh_processing/include/CGAL/Polygon_mesh_processing/intersection.h
index 427e1490b3b..ef0a9dfc361 100644
--- a/Polygon_mesh_processing/include/CGAL/Polygon_mesh_processing/intersection.h
+++ b/Polygon_mesh_processing/include/CGAL/Polygon_mesh_processing/intersection.h
@@ -414,7 +414,7 @@ compute_face_face_intersection(const FaceRange& face_range1,
CGAL::Bbox_3 b1 = CGAL::Polygon_mesh_processing::bbox(tm1, np1),
b2 = CGAL::Polygon_mesh_processing::bbox(tm2, np2);
-
+
if(!CGAL::do_overlap(b1, b2))
{
return out;
@@ -643,7 +643,7 @@ compute_face_polylines_intersection(const FaceRange& face_range,
using parameters::get_parameter;
CGAL_precondition(CGAL::is_triangle_mesh(tm));
-
+
CGAL::Bbox_3 b1,b2;
b1 = CGAL::Polygon_mesh_processing::bbox(tm, np);
for(std::size_t i =0; i< polyline_range.size(); ++i)
@@ -651,10 +651,10 @@ compute_face_polylines_intersection(const FaceRange& face_range,
b2 += CGAL::bbox_3(polyline_range[i].begin(),
polyline_range[i].end());
}
-
+
if(!CGAL::do_overlap(b1,b2))
return out;
-
+
typedef TriangleMesh TM;
typedef typename boost::graph_traits::face_descriptor face_descriptor;
typedef typename GetVertexPointMap::const_type VertexPointMap;
diff --git a/Polygonal_surface_reconstruction/examples/Polygonal_surface_reconstruction/polyfit_example_model_complexty_control.cpp b/Polygonal_surface_reconstruction/examples/Polygonal_surface_reconstruction/polyfit_example_model_complexty_control.cpp
index 940d7283ec2..09953e4f292 100644
--- a/Polygonal_surface_reconstruction/examples/Polygonal_surface_reconstruction/polyfit_example_model_complexty_control.cpp
+++ b/Polygonal_surface_reconstruction/examples/Polygonal_surface_reconstruction/polyfit_example_model_complexty_control.cpp
@@ -6,10 +6,10 @@
#ifdef CGAL_USE_SCIP // defined (or not) by CMake scripts, do not define by hand
#include
-typedef CGAL::SCIP_mixed_integer_program_traits MIP_Solver;
+typedef CGAL::SCIP_mixed_integer_program_traits MIP_Solver;
#elif defined(CGAL_USE_GLPK) // defined (or not) by CMake scripts, do not define by hand
#include
-typedef CGAL::GLPK_mixed_integer_program_traits MIP_Solver;
+typedef CGAL::GLPK_mixed_integer_program_traits MIP_Solver;
#endif
@@ -20,17 +20,17 @@ typedef CGAL::GLPK_mixed_integer_program_traits MIP_Solver;
#include
-typedef CGAL::Exact_predicates_inexact_constructions_kernel Kernel;
-typedef Kernel::Point_3 Point;
-typedef Kernel::Vector_3 Vector;
-typedef CGAL::Polygonal_surface_reconstruction Polygonal_surface_reconstruction;
-typedef CGAL::Surface_mesh Surface_mesh;
+typedef CGAL::Exact_predicates_inexact_constructions_kernel Kernel;
+typedef Kernel::Point_3 Point;
+typedef Kernel::Vector_3 Vector;
+typedef CGAL::Polygonal_surface_reconstruction Polygonal_surface_reconstruction;
+typedef CGAL::Surface_mesh Surface_mesh;
// Point with normal, and plane index
-typedef boost::tuple PNI;
-typedef CGAL::Nth_of_tuple_property_map<0, PNI> Point_map;
-typedef CGAL::Nth_of_tuple_property_map<1, PNI> Normal_map;
-typedef CGAL::Nth_of_tuple_property_map<2, PNI> Plane_index_map;
+typedef boost::tuple PNI;
+typedef CGAL::Nth_of_tuple_property_map<0, PNI> Point_map;
+typedef CGAL::Nth_of_tuple_property_map<1, PNI> Normal_map;
+typedef CGAL::Nth_of_tuple_property_map<2, PNI> Plane_index_map;
/*
* The following example shows how to control the model complexity by
diff --git a/Polygonal_surface_reconstruction/examples/Polygonal_surface_reconstruction/polyfit_example_user_provided_planes.cpp b/Polygonal_surface_reconstruction/examples/Polygonal_surface_reconstruction/polyfit_example_user_provided_planes.cpp
index 4b1d9e28582..3a77feeba8f 100644
--- a/Polygonal_surface_reconstruction/examples/Polygonal_surface_reconstruction/polyfit_example_user_provided_planes.cpp
+++ b/Polygonal_surface_reconstruction/examples/Polygonal_surface_reconstruction/polyfit_example_user_provided_planes.cpp
@@ -6,10 +6,10 @@
#ifdef CGAL_USE_SCIP // defined (or not) by CMake scripts, do not define by hand
#include
-typedef CGAL::SCIP_mixed_integer_program_traits MIP_Solver;
+typedef CGAL::SCIP_mixed_integer_program_traits MIP_Solver;
#elif defined(CGAL_USE_GLPK) // defined (or not) by CMake scripts, do not define by hand
#include
-typedef CGAL::GLPK_mixed_integer_program_traits MIP_Solver;
+typedef CGAL::GLPK_mixed_integer_program_traits MIP_Solver;
#endif
@@ -20,17 +20,17 @@ typedef CGAL::GLPK_mixed_integer_program_traits MIP_Solver;
#include
-typedef CGAL::Exact_predicates_inexact_constructions_kernel Kernel;
-typedef Kernel::Point_3 Point;
-typedef Kernel::Vector_3 Vector;
-typedef CGAL::Polygonal_surface_reconstruction Polygonal_surface_reconstruction;
-typedef CGAL::Surface_mesh Surface_mesh;
+typedef CGAL::Exact_predicates_inexact_constructions_kernel Kernel;
+typedef Kernel::Point_3 Point;
+typedef Kernel::Vector_3 Vector;
+typedef CGAL::Polygonal_surface_reconstruction Polygonal_surface_reconstruction;
+typedef CGAL::Surface_mesh Surface_mesh;
// Point with normal, and plane index
-typedef boost::tuple PNI;
-typedef CGAL::Nth_of_tuple_property_map<0, PNI> Point_map;
-typedef CGAL::Nth_of_tuple_property_map<1, PNI> Normal_map;
-typedef CGAL::Nth_of_tuple_property_map<2, PNI> Plane_index_map;
+typedef boost::tuple PNI;
+typedef CGAL::Nth_of_tuple_property_map<0, PNI> Point_map;
+typedef CGAL::Nth_of_tuple_property_map<1, PNI> Normal_map;
+typedef CGAL::Nth_of_tuple_property_map<2, PNI> Plane_index_map;
/*
* The following example shows the reconstruction using user-provided
diff --git a/Polygonal_surface_reconstruction/examples/Polygonal_surface_reconstruction/polyfit_example_with_region_growing.cpp b/Polygonal_surface_reconstruction/examples/Polygonal_surface_reconstruction/polyfit_example_with_region_growing.cpp
index 5e4f2ee4363..4478e2e9cd4 100644
--- a/Polygonal_surface_reconstruction/examples/Polygonal_surface_reconstruction/polyfit_example_with_region_growing.cpp
+++ b/Polygonal_surface_reconstruction/examples/Polygonal_surface_reconstruction/polyfit_example_with_region_growing.cpp
@@ -14,7 +14,7 @@ typedef CGAL::SCIP_mixed_integer_program_traits MIP_Solver;
#elif defined(CGAL_USE_GLPK) // defined (or not) by CMake scripts, do not define by hand
#include
-typedef CGAL::GLPK_mixed_integer_program_traits MIP_Solver;
+typedef CGAL::GLPK_mixed_integer_program_traits MIP_Solver;
#endif
@@ -23,19 +23,19 @@ typedef CGAL::GLPK_mixed_integer_program_traits MIP_Solver;
#include
#include
-typedef CGAL::Exact_predicates_inexact_constructions_kernel Kernel;
+typedef CGAL::Exact_predicates_inexact_constructions_kernel Kernel;
typedef Kernel::FT FT;
-typedef Kernel::Point_3 Point;
+typedef Kernel::Point_3 Point;
typedef Kernel::Vector_3 Vector;
// Point with normal, and plane index.
typedef boost::tuple PNI;
typedef std::vector Point_vector;
-typedef CGAL::Nth_of_tuple_property_map<0, PNI> Point_map;
-typedef CGAL::Nth_of_tuple_property_map<1, PNI> Normal_map;
-typedef CGAL::Nth_of_tuple_property_map<2, PNI> Plane_index_map;
+typedef CGAL::Nth_of_tuple_property_map<0, PNI> Point_map;
+typedef CGAL::Nth_of_tuple_property_map<1, PNI> Normal_map;
+typedef CGAL::Nth_of_tuple_property_map<2, PNI> Plane_index_map;
typedef CGAL::Shape_detection::Point_set::
Sphere_neighbor_query Neighbor_query;
@@ -44,8 +44,8 @@ Least_squares_plane_fit_region Regi
typedef CGAL::Shape_detection::
Region_growing Region_growing;
-typedef CGAL::Surface_mesh Surface_mesh;
-typedef CGAL::Polygonal_surface_reconstruction Polygonal_surface_reconstruction;
+typedef CGAL::Surface_mesh Surface_mesh;
+typedef CGAL::Polygonal_surface_reconstruction Polygonal_surface_reconstruction;
class Index_map {
diff --git a/Polygonal_surface_reconstruction/examples/Polygonal_surface_reconstruction/polyfit_example_without_input_planes.cpp b/Polygonal_surface_reconstruction/examples/Polygonal_surface_reconstruction/polyfit_example_without_input_planes.cpp
index e17845a9478..c2a4c11066d 100644
--- a/Polygonal_surface_reconstruction/examples/Polygonal_surface_reconstruction/polyfit_example_without_input_planes.cpp
+++ b/Polygonal_surface_reconstruction/examples/Polygonal_surface_reconstruction/polyfit_example_without_input_planes.cpp
@@ -8,12 +8,12 @@
#ifdef CGAL_USE_SCIP // defined (or not) by CMake scripts, do not define by hand
#include
-typedef CGAL::SCIP_mixed_integer_program_traits MIP_Solver;
+typedef CGAL::SCIP_mixed_integer_program_traits MIP_Solver;
#elif defined(CGAL_USE_GLPK) // defined (or not) by CMake scripts, do not define by hand
#include
-typedef CGAL::GLPK_mixed_integer_program_traits MIP_Solver;
+typedef CGAL::GLPK_mixed_integer_program_traits MIP_Solver;
#endif
@@ -25,26 +25,26 @@ typedef CGAL::GLPK_mixed_integer_program_traits MIP_Solver;
#include
-typedef CGAL::Exact_predicates_inexact_constructions_kernel Kernel;
+typedef CGAL::Exact_predicates_inexact_constructions_kernel Kernel;
-typedef Kernel::Point_3 Point;
-typedef Kernel::Vector_3 Vector;
+typedef Kernel::Point_3 Point;
+typedef Kernel::Vector_3 Vector;
// Point with normal, and plane index
-typedef boost::tuple PNI;
-typedef std::vector Point_vector;
-typedef CGAL::Nth_of_tuple_property_map<0, PNI> Point_map;
-typedef CGAL::Nth_of_tuple_property_map<1, PNI> Normal_map;
-typedef CGAL::Nth_of_tuple_property_map<2, PNI> Plane_index_map;
+typedef boost::tuple PNI;
+typedef std::vector Point_vector;
+typedef CGAL::Nth_of_tuple_property_map<0, PNI> Point_map;
+typedef CGAL::Nth_of_tuple_property_map<1, PNI> Normal_map;
+typedef CGAL::Nth_of_tuple_property_map<2, PNI> Plane_index_map;
typedef CGAL::Shape_detection::Efficient_RANSAC_traits Traits;
typedef CGAL::Shape_detection::Efficient_RANSAC Efficient_ransac;
-typedef CGAL::Shape_detection::Plane Plane;
+typedef CGAL::Shape_detection::Plane Plane;
typedef CGAL::Shape_detection::Point_to_shape_index_map Point_to_shape_index_map;
-typedef CGAL::Polygonal_surface_reconstruction Polygonal_surface_reconstruction;
-typedef CGAL::Surface_mesh Surface_mesh;
+typedef CGAL::Polygonal_surface_reconstruction Polygonal_surface_reconstruction;
+typedef CGAL::Surface_mesh Surface_mesh;
/*
* This example first extracts planes from the input point cloud
diff --git a/Polyhedron/demo/Polyhedron/Plugins/IO/PLY_io_plugin.cpp b/Polyhedron/demo/Polyhedron/Plugins/IO/PLY_io_plugin.cpp
index 2ebcbe87edc..9388fa0f5f2 100644
--- a/Polyhedron/demo/Polyhedron/Plugins/IO/PLY_io_plugin.cpp
+++ b/Polyhedron/demo/Polyhedron/Plugins/IO/PLY_io_plugin.cpp
@@ -30,9 +30,9 @@ class Polyhedron_demo_ply_plugin :
public:
bool isDefaultLoader(const CGAL::Three::Scene_item *item) const override
- {
- if(qobject_cast(item))
- return true;
+ {
+ if(qobject_cast(item))
+ return true;
return false;
}
QString name() const override{ return "ply_plugin"; }
@@ -66,7 +66,7 @@ load(QFileInfo fileinfo, bool& ok, bool add_to_scene) {
ok = false;
return QList();
}
-
+
// Test if input is mesh or point set
bool input_is_mesh = false;
std::string line;
@@ -101,7 +101,7 @@ load(QFileInfo fileinfo, bool& ok, bool add_to_scene) {
// First try mesh
SMesh *surface_mesh = new SMesh();
std::string comments;
-
+
if (CGAL::read_PLY(in, *surface_mesh, comments))
{
Scene_surface_mesh_item* sm_item = new Scene_surface_mesh_item(surface_mesh);
@@ -191,13 +191,13 @@ save(QFileInfo fileinfo,QList& items)
if (!ok)
return false;
-
+
std::ofstream out(fileinfo.filePath().toUtf8().data(), std::ios::binary);
if (choice == tr("Binary"))
CGAL::set_binary_mode(out);
else
out.precision (std::numeric_limits::digits10 + 2);
-
+
// This plugin supports point sets
const Scene_points_with_normal_item* point_set_item =
qobject_cast(item);
@@ -233,7 +233,7 @@ save(QFileInfo fileinfo,QList& items)
items.pop_front();
return res;
}
-
+
// This plugin supports textured surface meshes
const Scene_textured_surface_mesh_item* stm_item =
qobject_cast(item);
diff --git a/Polyhedron/demo/Polyhedron/Plugins/IO/VTK_io_plugin.cpp b/Polyhedron/demo/Polyhedron/Plugins/IO/VTK_io_plugin.cpp
index efe6a5089a6..285edb1fcad 100644
--- a/Polyhedron/demo/Polyhedron/Plugins/IO/VTK_io_plugin.cpp
+++ b/Polyhedron/demo/Polyhedron/Plugins/IO/VTK_io_plugin.cpp
@@ -71,7 +71,7 @@
#include
typedef Scene_surface_mesh_item Scene_facegraph_item;
typedef Scene_facegraph_item::Face_graph FaceGraph;
-typedef boost::property_traits::type>::value_type Point;
@@ -206,8 +206,8 @@ public:
return (qobject_cast(item)
|| qobject_cast(item));
}
-
-
+
+
bool save(QFileInfo fileinfo,QList& items)
{
Scene_item* item = items.front();
@@ -219,7 +219,7 @@ public:
const Scene_facegraph_item* poly_item =
qobject_cast(item);
-
+
if (poly_item)
{
if (extension != "vtp")
@@ -250,11 +250,11 @@ public:
qobject_cast(item);
if(!c3t3_item || extension != "vtu")
return false;
-
+
std::ofstream os(output_filename.data());
os << std::setprecision(16);
const C3t3& c3t3 = c3t3_item->c3t3();
-
+
CGAL::output_to_vtu(os, c3t3);
}
items.pop_front();
@@ -286,7 +286,7 @@ public:
CGAL::Three::Three::scene()->addItem(item);
return QList()<- data;
vtkSmartPointer obs =
vtkSmartPointer::New();
@@ -351,7 +351,7 @@ public:
{
group = new Scene_group_item(fileinfo.baseName());
}
-
+
if(is_polygon_mesh)
{
FaceGraph* poly = new FaceGraph();
@@ -373,7 +373,7 @@ public:
}
}
}
-
+
if (is_c3t3)
{
typedef boost::array Facet; // 3 = id
@@ -421,7 +421,7 @@ public:
}
}
CGAL::build_triangulation
(c3t3_item->c3t3().triangulation(), points, finite_cells, border_facets);
-
+
for( C3t3::Triangulation::Finite_cells_iterator
cit = c3t3_item->c3t3().triangulation().finite_cells_begin();
cit != c3t3_item->c3t3().triangulation().finite_cells_end();
@@ -437,7 +437,7 @@ public:
}
}
}
-
+
//if there is no facet in the complex, we add the border facets.
if(c3t3_item->c3t3().number_of_facets_in_complex() == 0)
{
@@ -447,10 +447,10 @@ public:
++fit)
{
typedef C3t3::Triangulation::Cell_handle Cell_handle;
-
+
Cell_handle c = fit->first;
Cell_handle nc = c->neighbor(fit->second);
-
+
// By definition, Subdomain_index() is supposed to be the id of the exterior
if(c->subdomain_index() != C3t3::Triangulation::Cell::Subdomain_index() &&
nc->subdomain_index() == C3t3::Triangulation::Cell::Subdomain_index())
@@ -476,7 +476,7 @@ public:
return QList()< > segments;
@@ -498,14 +498,14 @@ public:
return QList()<addItem(group);
return QList()< positions_poly;
@@ -104,7 +104,7 @@ struct Scene_polygon_soup_item_priv{
bool is_triangle, is_quad, stats_computed;
double minl, maxl, meanl, midl, mini, maxi, ave;
std::size_t nb_null_edges, nb_degen_faces;
-
+
Scene_polygon_soup_item* item;
};
@@ -120,7 +120,7 @@ Scene_polygon_soup_item_priv::triangulate_polygon(Polygons_iterator pit, int pol
{
const CGAL::qglviewer::Vec off = static_cast(CGAL::QGLViewer::QGLViewerPool().first())->offset();
EPICK::Vector_3 offset(off.x,off.y,off.z);
-
+
//Computes the normal of the facet
Traits::Vector_3 normal = CGAL::NULL_VECTOR;
@@ -135,7 +135,7 @@ Scene_polygon_soup_item_priv::triangulate_polygon(Polygons_iterator pit, int pol
}
if (normal == CGAL::NULL_VECTOR) // No normal could be computed, return
return;
-
+
typedef FacetTriangulator FT;
std::size_t it = 0;
@@ -310,7 +310,7 @@ Scene_polygon_soup_item_priv::compute_normals_and_vertices() const{
positions_nm_lines.push_back(b.y()+offset.y);
positions_nm_lines.push_back(b.z()+offset.z);
}
-
+
}
@@ -333,7 +333,7 @@ Scene_polygon_soup_item::~Scene_polygon_soup_item()
delete d;
}
-Scene_polygon_soup_item*
+Scene_polygon_soup_item*
Scene_polygon_soup_item::clone() const {
Scene_polygon_soup_item* new_soup = new Scene_polygon_soup_item();
new_soup->d->soup = d->soup->clone();
@@ -419,7 +419,7 @@ void Scene_polygon_soup_item::inside_out()
invalidateOpenGLBuffers();
}
-bool
+bool
Scene_polygon_soup_item::orient()
{
@@ -457,7 +457,7 @@ Scene_polygon_soup_item::orient()
}
-bool
+bool
Scene_polygon_soup_item::save(std::ostream& out) const
{
@@ -506,7 +506,7 @@ Scene_polygon_soup_item::exportAsSurfaceMesh(SMesh *out_surface_mesh)
}
return false;
}
-QString
+QString
Scene_polygon_soup_item::toolTip() const
{
@@ -542,10 +542,10 @@ Scene_polygon_soup_item::draw(CGAL::Three::Viewer_interface* viewer) const {
computeElements();
initializeBuffers(viewer);
}
-
+
if(renderingMode() == Flat || renderingMode() == FlatPlusEdges)
{
-
+
if(d->soup->fcolors.empty())
getTriangleContainer(Priv::Flat_facets)->setColor(this->color());
getTriangleContainer(Priv::Flat_facets)->draw(viewer, d->soup->fcolors.empty());
@@ -560,7 +560,7 @@ Scene_polygon_soup_item::draw(CGAL::Three::Viewer_interface* viewer) const {
void
Scene_polygon_soup_item::drawPoints(CGAL::Three::Viewer_interface* viewer) const {
-
+
if(d->soup == 0) return;
if(!isInit(viewer))
initGL(viewer);
@@ -639,7 +639,7 @@ void Scene_polygon_soup_item::compute_bbox() const {
bbox.xmax(),bbox.ymax(),bbox.zmax()));
}
-void
+void
Scene_polygon_soup_item::new_vertex(const double& x,
const double& y,
const double& z)
@@ -647,8 +647,8 @@ Scene_polygon_soup_item::new_vertex(const double& x,
d->soup->points.push_back(Point_3(x, y, z));
}
-
-void
+
+void
Scene_polygon_soup_item::new_triangle(const std::size_t i,
const std::size_t j,
const std::size_t k)
@@ -694,7 +694,7 @@ void Scene_polygon_soup_item::load(const std::vector& points, const std::
d->soup->fcolors.reserve (fcolors.size());
std::copy (fcolors.begin(), fcolors.end(), std::back_inserter (d->soup->fcolors));
-
+
d->soup->vcolors.reserve (vcolors.size());
std::copy (vcolors.begin(), vcolors.end(), std::back_inserter (d->soup->vcolors));
}
@@ -732,7 +732,7 @@ void Scene_polygon_soup_item::itemAboutToBeDestroyed(Scene_item *item)
}
}
-const Polygon_soup::Edges&
+const Polygon_soup::Edges&
Scene_polygon_soup_item::non_manifold_edges() const
{
return d->soup->non_manifold_edges;
@@ -742,19 +742,19 @@ void Scene_polygon_soup_item::initializeBuffers(Viewer_interface *v) const
{
getTriangleContainer(Priv::Flat_facets)->initializeBuffers(v);
getTriangleContainer(Priv::Flat_facets)->setFlatDataSize(d->nb_polys);
-
+
getTriangleContainer(Priv::Smooth_facets)->initializeBuffers(v);
getTriangleContainer(Priv::Smooth_facets)->setFlatDataSize(d->nb_polys);
-
+
getEdgeContainer(Priv::Edges)->initializeBuffers(v);
getEdgeContainer(Priv::Edges)->setFlatDataSize(d->nb_lines);
-
+
getEdgeContainer(Priv::NM_edges)->initializeBuffers(v);
getEdgeContainer(Priv::NM_edges)->setFlatDataSize(d->nb_nm_edges);
-
+
getPointContainer(0)->initializeBuffers(v);
getPointContainer(0)->setFlatDataSize(d->nb_lines);
-
+
d->normals.resize(0);
d->positions_poly.resize(0);
d->normals.shrink_to_fit();
@@ -768,15 +768,15 @@ void Scene_polygon_soup_item::initializeBuffers(Viewer_interface *v) const
}
void Scene_polygon_soup_item::computeElements() const
-{
+{
QApplication::setOverrideCursor(Qt::WaitCursor);
d->compute_normals_and_vertices();
-
+
getTriangleContainer(Priv::Flat_facets)->allocate(
Tc::Flat_vertices,
d->positions_poly.data(),
static_cast(d->positions_poly.size()*sizeof(float)));
-
+
getTriangleContainer(Priv::Flat_facets)->allocate(
Tc::Flat_normals,
d->normals.data(),
@@ -792,12 +792,12 @@ void Scene_polygon_soup_item::computeElements() const
Tc::Flat_vertices,
d->positions_poly.data(),
static_cast(d->positions_poly.size()*sizeof(float)));
-
+
getTriangleContainer(Priv::Smooth_facets)->allocate(
Tc::Flat_normals,
d->normals.data(),
static_cast(d->normals.size()*sizeof(float)));
-
+
if(!d->v_colors.empty())
{
getTriangleContainer(Priv::Smooth_facets)->allocate(
@@ -805,28 +805,28 @@ void Scene_polygon_soup_item::computeElements() const
d->v_colors.data(),
static_cast(d->v_colors.size()*sizeof(float)));
}
-
+
d->nb_polys = d->positions_poly.size();
-
+
getEdgeContainer(Priv::Edges)->allocate(
Ec::Vertices,
d->positions_lines.data(),
static_cast(d->positions_lines.size()*sizeof(float)));
-
+
getPointContainer(0)->allocate(
Pc::Vertices,
d->positions_lines.data(),
static_cast