diff --git a/.gitattributes b/.gitattributes
index 9f401098a08..6faf6fc3de8 100644
--- a/.gitattributes
+++ b/.gitattributes
@@ -213,6 +213,27 @@ Alpha_shapes_3/doc_tex/Alpha_shapes_3/alpha_shapes_3_large.png -text
Alpha_shapes_3/doc_tex/Alpha_shapes_3/alpha_shapes_3_small.png -text
Alpha_shapes_3/doc_tex/Alpha_shapes_3/alphashape.gif -text svneol=unset#image/gif
Alpha_shapes_3/doc_tex/Alpha_shapes_3/alphashape.pdf -text svneol=unset#application/pdf
+Alpha_shapes_3/doc_tex/Alpha_shapes_3/classif.pdf -text
+Alpha_shapes_3/doc_tex/Alpha_shapes_3/classif.png -text
+Alpha_shapes_3/doc_tex/Alpha_shapes_3/gen-reg-ex.png -text
+Alpha_shapes_3/doc_tex/Alpha_shapes_3_ref/FixedAlphaShapeCellBase_3.tex -text
+Alpha_shapes_3/doc_tex/Alpha_shapes_3_ref/FixedAlphaShapeTraits_3.tex -text
+Alpha_shapes_3/doc_tex/Alpha_shapes_3_ref/FixedAlphaShapeVertexBase_3.tex -text
+Alpha_shapes_3/doc_tex/Alpha_shapes_3_ref/FixedWeightedAlphaShapeTraits_3.tex -text
+Alpha_shapes_3/doc_tex/Alpha_shapes_3_ref/Fixed_alpha_shape_3.tex -text
+Alpha_shapes_3/doc_tex/Alpha_shapes_3_ref/Fixed_alpha_shape_cell_base_3.tex -text
+Alpha_shapes_3/doc_tex/Alpha_shapes_3_ref/Fixed_alpha_shape_vertex_base_3.tex -text
+Alpha_shapes_3/examples/Alpha_shapes_3/ex_fixed_weighted_alpha_shapes_3.cpp -text
+Alpha_shapes_3/include/CGAL/Fixed_alpha_shape_3.h -text
+Alpha_shapes_3/include/CGAL/Fixed_alpha_shape_cell_base_3.h -text
+Alpha_shapes_3/include/CGAL/Fixed_alpha_shape_vertex_base_3.h -text
+Alpha_shapes_3/include/CGAL/internal/Classification_type.h -text
+Alpha_shapes_3/test/Alpha_shapes_3/Filtered_weighted_alpha_shape_euclidean_traits_3.h -text
+Alpha_shapes_3/test/Alpha_shapes_3/copy_tds.h -text
+Alpha_shapes_3/test/Alpha_shapes_3/data/small-exp.in -text
+Alpha_shapes_3/test/Alpha_shapes_3/data/small.in -text
+Alpha_shapes_3/test/Alpha_shapes_3/test_fixed_alpha_shape_3.cmd -text
+Alpha_shapes_3/test/Alpha_shapes_3/test_fixed_alpha_shape_3.cpp -text
Apollonius_graph_2/doc_tex/Apollonius_graph_2/apollonius-both_vertices.gif -text svneol=unset#image/gif
Apollonius_graph_2/doc_tex/Apollonius_graph_2/apollonius-both_vertices_bw.png -text svneol=unset#image/png
Apollonius_graph_2/doc_tex/Apollonius_graph_2/apollonius-entire_edge.gif -text svneol=unset#image/gif
diff --git a/.gitignore b/.gitignore
index fda3d047681..75ec4d41438 100644
--- a/.gitignore
+++ b/.gitignore
@@ -41,6 +41,11 @@ Alpha_shapes_3/demo/Alpha_shapes_3/*.vcproj
Alpha_shapes_3/demo/Alpha_shapes_3/Makefile
Alpha_shapes_3/demo/Alpha_shapes_3/alpha_shapes_3
Alpha_shapes_3/demo/Alpha_shapes_3/weighted_alpha_shapes_3
+Alpha_shapes_3/test/Alpha_shapes_3/CMakeLists.txt
+Alpha_shapes_3/test/Alpha_shapes_3/cgal_test_with_cmake
+Alpha_shapes_3/test/Alpha_shapes_3/test_alpha_shape_3
+Alpha_shapes_3/test/Alpha_shapes_3/test_fixed_alpha_shape_3
+Alpha_shapes_3/test/Alpha_shapes_3/test_weighted_alpha_shape_3
Apollonius_graph_2/demo/Apollonius_graph_2/*.exe
Apollonius_graph_2/demo/Apollonius_graph_2/*.vcproj
Apollonius_graph_2/demo/Apollonius_graph_2/Makefile
diff --git a/Alpha_shapes_3/doc_tex/Alpha_shapes_3/PkgDescription.tex b/Alpha_shapes_3/doc_tex/Alpha_shapes_3/PkgDescription.tex
index 96e1ec184de..ed6b9ca031f 100644
--- a/Alpha_shapes_3/doc_tex/Alpha_shapes_3/PkgDescription.tex
+++ b/Alpha_shapes_3/doc_tex/Alpha_shapes_3/PkgDescription.tex
@@ -1,11 +1,18 @@
\begin{ccPkgDescription}{3D Alpha Shapes\label{Pkg:AlphaShapes3}}
\ccPkgHowToCiteCgal{cgal:dy-as3-10}
-\ccPkgSummary{This package offers a data structure encoding the whole family of alpha-complexes
-related to a given 3D Delaunay or regular triangulation. In particular, the data structure
+\ccPkgSummary{
+This package offers a data structure encoding
+either one alpha-complex or
+the whole family of alpha-complexes
+related to a given 3D Delaunay or regular triangulation.
+% In particular,
+In the latter case,
+the data structure
allows to retrieve the alpha-complex for any alpha value, the whole spectrum of critical
alpha values and a filtration on the triangulation faces (this filtration is based on the first
-alpha value for which each face is included on the alpha-complex).}
+alpha value for which each face is included on the alpha-complex).
+}
\ccPkgDependsOn{\ccRef[2D Triangulation]{Pkg:Triangulation3}}
\ccPkgIntroducedInCGAL{2.3}
diff --git a/Alpha_shapes_3/doc_tex/Alpha_shapes_3/alpha3.tex b/Alpha_shapes_3/doc_tex/Alpha_shapes_3/alpha3.tex
index a6bb18efd96..401aa06ede9 100644
--- a/Alpha_shapes_3/doc_tex/Alpha_shapes_3/alpha3.tex
+++ b/Alpha_shapes_3/doc_tex/Alpha_shapes_3/alpha3.tex
@@ -72,22 +72,47 @@ The alpha complex is a subcomplex
of the Delaunay triangulation.
For a given value of $\alpha$, the alpha complex includes
all the simplices in the Delaunay triangulation which have
-an empty circumsphere with squared radius equal or smaller than $\alpha$.
+an empty circumscribing sphere with squared radius equal or smaller than $\alpha$.
Here ``empty'' means that the open sphere
do not include any points of $S$.
The alpha shape is then simply the domain covered by the simplices
of the alpha complex (see \cite{em-tdas-94}).
-In general, an alpha complex is a non-connected and non-pure complex.
+In general, an alpha complex is a disconnected and non-pure complex:
This means in particular that the alpha complex may have
singular faces. For $0 \leq k \leq d-1$,
a $k$-simplex of the alpha complex is said to be
-singular if it is not a facet of a $(k+1)$-simplex of the complex
-CGAL provides two versions of the alpha shapes. In the general mode,
+singular if it is not a facet of a $(k+1)$-simplex of the complex.
+CGAL provides two versions of alpha shapes. In the general mode,
the alpha shapes correspond strictly to the above definition.
-The regularized mode provides a regularized version of the alpha shapes
-corresponding to the domain covered by a regularized version
-of the alpha complex where singular faces are removed.
+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
+(See Figure \ref{fig-gen-reg-ex} for an example).
+
+
+\begin{figure}
+\begin{ccTexOnly}
+\begin{center}
+\includegraphics[width=15cm]{Alpha_shapes_3/gen-reg-ex.png}
+\end{center}
+\end{ccTexOnly}
+\begin{ccHtmlOnly}
+
+
+
+\end{ccHtmlOnly}
+
+\caption{Comparison of general and regularized alpha-shape.
+\textbf{Left:} Some points are taken on the surface of a torus,
+three points being taken relatively
+far from the surface of the torus;
+\textbf{Middle:} The general alpha-shape (for a large enough alpha value)
+contains the singular triangle facet of the three isolated points;
+\textbf{Right:} The regularized version (for the same value of alpha) does not contains any singular facet.
+\label{fig-gen-reg-ex}}
+\end{figure}
+
@@ -135,8 +160,8 @@ 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
input weighted points. Once again the alpha shape is then defined as
-the domain covered by a the alpha complex and arise in two versions
-general or regularized.
+the domain covered by a the alpha complex and comes in general and
+regularized versions.
@@ -145,6 +170,8 @@ general or regularized.
\section{Functionality \label{I1_SectAlpha_Shape_3}}
+\subsection{Family of alpha shapes}
+
The class \ccc{CGAL::Alpha_shape_3
} represents the whole
family of alpha shapes for a given set of points.
The class includes the underlying triangulation \ccc{Dt}
@@ -153,25 +180,10 @@ of the set, and associates to each $k$-face of this triangulation
for which values of $\alpha$ the face belongs to the
alpha complex.
-
-The class \ccc{CGAL::Alpha_shape_3
} provides functions to set and
+The class provides functions to set and
get the current $\alpha$-value, as well as an iterator that enumerates
the $\alpha$ values where the alpha shape changes.
-The class provides member functions to classify for a given value
-of $alpha$ the different faces of the triangulation as
-\ccc{EXTERIOR}, \ccc{SINGULAR}, \ccc{REGULAR} or
-\ccc{INTERIOR} with respect
-to the alpha shape. A $k$ face on the boundary of the alpha complex
-is said to be \ccc{REGULAR} if it is a subface of the alpha complex
-which is a subface of some $k+1$ face of the alpha complex
-and \ccc{SINGULAR} otherwise.
-
-The class provides also output iterators to get for a given $alpha$ value
-the vertices, edges, facets and cells of the different types
-(\ccc{EXTERIOR}, \ccc{SINGULAR}, \ccc{REGULAR} or
-\ccc{INTERIOR}).
-
Also the class has a filtration member function that, given
an output iterator with \ccc{CGAL::object}
as value type, outputs the faces of the triangulation
@@ -189,30 +201,84 @@ such that the alpha shape satisfies the following two properties~\\
\smallskip
The current implementation is static, that is after its construction
points cannot be inserted or removed.
+
+\subsection{Alpha shape for a fixed alpha}
+Given a value of alpha, the class \ccc{CGAL::Fixed_alpha_shape_3
} represents one
+alpha shape for a given set of points.
+The class includes the underlying triangulation \ccc{Dt}
+of the set, and associates to each $k$-face of this triangulation
+a classification type.
+
+\smallskip
+The current implementation of this class is dynamic, that is after its construction
+points can be inserted or removed.
+
+\subsection{Classification and iterators}
+Both classes provide member functions to classify for a (given) value
+of $alpha$ the different faces of the triangulation as
+\ccc{EXTERIOR}, \ccc{SINGULAR}, \ccc{REGULAR} or
+\ccc{INTERIOR} with respect
+to the alpha shape. A $k$-face on the boundary of the alpha complex
+is said to be: \ccc{REGULAR} if it is a subface of the alpha-complex which
+is a subface of a $(k+1)$-face of the alpha complex, and \ccc{SINGULAR} otherwise.
+A $k$-face of the alpha complex which is not on the boundary of the alpha complex
+is said to be \ccc{INTERIOR}. See Figure \ref{fig-classif} for a 2D illustration.
+
+
+\begin{figure}
+\begin{ccTexOnly}
+\begin{center}
+\includegraphics[width=15cm]{Alpha_shapes_3/classif}
+\end{center}
+\end{ccTexOnly}
+\begin{ccHtmlOnly}
+
+
+
+\end{ccHtmlOnly}
+
+\caption{Classification of simplices, a 2D example.
+\textbf{Left:} The 2D Delaunay triangulation of a set of points;
+\textbf{Right:} Classification of simplices for a given alpha (the squared radius of the red circle).
+\ccc{INTERIOR}, \ccc{REGULAR} and \ccc{SINGULAR} simplices are depicted in black, green and blue
+respectively. \ccc{EXTERIOR} simplices are not depicted. The vertex \ccc{s} and the edge \ccc{tu} are \ccc{SINGULAR}
+since all higher dimension simplices they are incident to are \ccc{EXTERIOR}.
+The facet \ccc{pqr} is \ccc{EXTERIOR} because the squared radius of its circumscribed circle is larger
+than alpha.
+\label{fig-classif}}
+\end{figure}
+
+
+The classes provide also output iterators to get for a given $alpha$ value
+the vertices, edges, facets and cells of the different types
+(\ccc{EXTERIOR}, \ccc{SINGULAR}, \ccc{REGULAR} or
+\ccc{INTERIOR}).
+
+
%----------------------------------------------------------------------
\section{Concepts and Models\label{I1_SectDtClass3D}}
We currently do not specify concepts for the underlying triangulation
-type. Models that work for a basic alpha-shape are the instantiations
+type. Models that work for a familly alpha-shapes are the instantiations
of the classes \ccc{CGAL::Delaunay_triangulation_3} and
\ccc{CGAL::Periodic_3_Delaunay_triangulation_3} (see
-example~\ref{l1_SectPeriodicAS3D}).
+example~\ref{l1_SectPeriodicAS3D}). A model that works for a fixed alpha-shape are the instantiations
+of the class \ccc{CGAL::Delaunay_triangulation_3}.
A model that works for a weighted alpha-shape is
-the class \ccc{CGAL::Regular_triangulation_3}.
+the class \ccc{CGAL::Regular_triangulation_3}. The triangulation needs a geometric traits class
+and a triangulation data structure as template parameters.
-The triangulation needs a geometric traits class as argument.
-The requirements of this class are described in the
-concept \ccc{CGAL::AlphaShapeTraits_3} for which
-the \cgal\ kernels are models in the non-weighted case, and for which
-the class \ccc{CGAL::Regular_triangulation_euclidean_traits_3} is model
+For the class \ccc{CGAL::Alpha_shape_3
}, the requirements of
+the traits class are described in the concepts \ccc{CGAL::AlphaShapeTraits_3}
+in the non-weighted case and \ccc{CGAL::WeightedAlphaShapeTraits_3} in the weighted case.
+The \cgal\ kernels are models in the non-weighted case, and
+the class \ccc{CGAL::Regular_triangulation_euclidean_traits_3} is a model
in the weighted case.
-
-The triangulation data structure of the triangulation with any
-has to be a model of the concept \ccc{CGAL::TriangulationDataStructure_3}.
-However it must be parameterized with
-vertex and cell classes, which are models of the concepts
+The triangulation data structure of the triangulation
+has to be a model of the concept \ccc{CGAL::TriangulationDataStructure_3},
+and it must be parameterized with vertex and cell classes, which are model of the concepts
\ccc{AlphaShapeVertex_3} and \ccc{AlphaShapeCell_3}.
The package provides by default the classes
\ccc{CGAL::Alpha_shape_vertex_base_3} and
@@ -225,6 +291,51 @@ triangulation the vertex and cell classes need to be models to both
(see example~\ref{l1_SectPeriodicAS3D}).
+
+For the class \ccc{CGAL::Fixed_alpha_shape_3
}, the requirements of
+the traits class are described in the concepts \ccc{CGAL::FixedAlphaShapeTraits_3}
+in the non-weighted case and \ccc{CGAL::FixedWeightedAlphaShapeTraits_3} in the weighted case.
+The \cgal\ kernels are models in the non-weighted case, and
+the class \ccc{CGAL::Regular_triangulation_euclidean_traits_3} is a model
+in the weighted case.
+The triangulation data structure of the triangulation
+has to be a model of the concept \ccc{CGAL::TriangulationDataStructure_3},
+and it must be parameterized with vertex and cell classes, which are model of the concepts
+\ccc{FixedAlphaShapeVertex_3} and \ccc{FixedAlphaShapeCell_3}.
+The package provides models \ccc{CGAL::Fixed_alpha_shape_vertex_base_3}
+and \ccc{CGAL::Fixed_alpha_shape_cell_base_3}, respectively.
+
+
+
+\section{\ccc{Alpha_shape_3} or \ccc{Fixed_alpha_shape_3}}
+
+The class \ccc{CGAL::Alpha_shape_3
} represents the whole family
+of alpha shapes for a given set of points while the class \ccc{CGAL::Fixed_alpha_shape_3
}
+represents only one alpha shape (for a fixed alpha). When using the same kernel,
+\ccc{CGAL::Fixed_alpha_shape_3
} being a lighter version, it is naturally much more efficient
+when the alpha-shape is needed for a single given value of alpha.
+In addition note that the class \ccc{CGAL::Alpha_shape_3
}
+requires constructions (squared radius of simplices) while the
+class \ccc{CGAL::Fixed_alpha_shape_3
} uses only predicates.
+This implies that a certified construction of one (several)
+alpha-shape, using the \ccc{CGAL::Alpha_shape_3
} requires a kernel
+with exact predicates and exact constructions while using a kernel
+with exact predicates is sufficient for the class \ccc{CGAL::Fixed_alpha_shape_3
}.
+This makes the class \ccc{CGAL::Fixed_alpha_shape_3
} even more efficient in this setting.
+In addition, note that the \ccc{Fixed} version is the only of the
+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 \ccc{gcc 4.3} under Linux with \ccc{-O3}
+and \ccc{-DNDEBUG} flags, on a 2.27GHz Intel(R) Xeon(R) E5520 CPU):
+Using \ccc{CGAL::Exact_predicates_inexact_constructions_kernel}, building
+the regular triangulation requires 0.06s, then the class \ccc{CGAL::Fixed_alpha_shape_3
}
+required 0.05s while the class \ccc{CGAL::Alpha_shape_3
} requires 0.35s.
+
+
+
+
+
%----------------------------------------------------------------------
\section{Examples}
@@ -241,7 +352,7 @@ as underlying triangulation.
When many points are input in the alpha shape, say more than 10 000,
it may pay off to use a Delaunay triangulation with \ccc{Fast_location}
policy as underlying triangulation in order to speed up point location
-quesries (cf. \ref{Triangulation3-sec-locpol}).
+queries (cf. \ref{Triangulation3-sec-locpol}).
\ccIncludeExampleCode{Alpha_shapes_3/ex_alpha_shapes_with_fast_location_3.cpp}
%----------------------------------------------------------------------
@@ -255,6 +366,12 @@ The alpha shape is built in \ccc{GENERAL} mode.
\ccIncludeExampleCode{Alpha_shapes_3/ex_weighted_alpha_shapes_3.cpp}
+\subsection{Example for Fixed Weighted Alpha-Shapes\label{I1_SectFxWeightedAS3D}}
+
+Same example as previous but using a fixed value of alpha.
+
+\ccIncludeExampleCode{Alpha_shapes_3/ex_fixed_weighted_alpha_shapes_3.cpp}
+
\subsection{Example for periodic
Alpha Shapes\label{l1_SectPeriodicAS3D}}
@@ -276,4 +393,6 @@ covering space is degenerate. In this case an exact constructions
kernel needs to be used to compute the alpha shapes. Otherwise the
results will suffer from round-off problems.
-\ccIncludeExampleCode{Alpha_shapes_3/ex_periodic_alpha_shapes_3.cpp}
\ No newline at end of file
+\ccIncludeExampleCode{Alpha_shapes_3/ex_periodic_alpha_shapes_3.cpp}
+
+
diff --git a/Alpha_shapes_3/doc_tex/Alpha_shapes_3/classif.pdf b/Alpha_shapes_3/doc_tex/Alpha_shapes_3/classif.pdf
new file mode 100644
index 00000000000..d5fba871c5f
Binary files /dev/null and b/Alpha_shapes_3/doc_tex/Alpha_shapes_3/classif.pdf differ
diff --git a/Alpha_shapes_3/doc_tex/Alpha_shapes_3/classif.png b/Alpha_shapes_3/doc_tex/Alpha_shapes_3/classif.png
new file mode 100644
index 00000000000..c7bc8271bd3
Binary files /dev/null and b/Alpha_shapes_3/doc_tex/Alpha_shapes_3/classif.png differ
diff --git a/Alpha_shapes_3/doc_tex/Alpha_shapes_3/gen-reg-ex.png b/Alpha_shapes_3/doc_tex/Alpha_shapes_3/gen-reg-ex.png
new file mode 100644
index 00000000000..43070c6005f
Binary files /dev/null and b/Alpha_shapes_3/doc_tex/Alpha_shapes_3/gen-reg-ex.png differ
diff --git a/Alpha_shapes_3/doc_tex/Alpha_shapes_3/main.tex b/Alpha_shapes_3/doc_tex/Alpha_shapes_3/main.tex
index 6ff81da565d..c7d0f46c274 100644
--- a/Alpha_shapes_3/doc_tex/Alpha_shapes_3/main.tex
+++ b/Alpha_shapes_3/doc_tex/Alpha_shapes_3/main.tex
@@ -5,7 +5,8 @@
\ccUserChapter{3D Alpha Shapes\label{I1_ChapterAlphashapes3D}}
-\ccChapterAuthor{Tran Kai Frank Da \and Mariette Yvinec}
+\ccChapterAuthor{Tran Kai Frank Da \and
+S\'ebastien Loriot \and Mariette Yvinec}
\input{Alpha_shapes_3/PkgDescription}
diff --git a/Alpha_shapes_3/doc_tex/Alpha_shapes_3_ref/AlphaShapeTraits_3.tex b/Alpha_shapes_3/doc_tex/Alpha_shapes_3_ref/AlphaShapeTraits_3.tex
index ac4e9e8068b..6faf9019b10 100644
--- a/Alpha_shapes_3/doc_tex/Alpha_shapes_3_ref/AlphaShapeTraits_3.tex
+++ b/Alpha_shapes_3/doc_tex/Alpha_shapes_3_ref/AlphaShapeTraits_3.tex
@@ -74,12 +74,12 @@ provides the following.
\ccNestedType{Compute_squared_radius_3}
{An object constructor able to compute: \\
the squared radius of the
- smallest circumsphere of 4 points \ccc{p0, p1, p2, p3},\\
+ smallest circumscribing sphere of 4 points \ccc{p0, p1, p2, p3},\\
the squared radius of the
-smallest circumsphere of 3 points \ccc{p0, p1, p2},\\
-the squared radius of the smallest circumsphere
+smallest circumscribing sphere of 3 points \ccc{p0, p1, p2},\\
+the squared radius of the smallest circumscribing sphere
of 2 points \ccc{p0, p1}, \\
-and also the squared radius of the smallest circumsphere
+and also the squared radius of the smallest circumscribing sphere
to a single point \ccc{p0} (which is \ccc{NT(0)}).}
diff --git a/Alpha_shapes_3/doc_tex/Alpha_shapes_3_ref/Alpha_shape_3.tex b/Alpha_shapes_3/doc_tex/Alpha_shapes_3_ref/Alpha_shape_3.tex
index c80db7b57f3..6d9fa69da8b 100644
--- a/Alpha_shapes_3/doc_tex/Alpha_shapes_3_ref/Alpha_shape_3.tex
+++ b/Alpha_shapes_3/doc_tex/Alpha_shapes_3_ref/Alpha_shape_3.tex
@@ -50,7 +50,7 @@
\ccDefinition
The class \ccClassTemplateName\ represents the family of
-alpha shapes of points in the 3D space for {\em all} positive
+alpha shapes of points in the 3D space for {\em all} real
$\alpha$. It maintains an underlying triangulation
of the class \ccc{Dt} which
represents connectivity and order among its faces. Each
@@ -259,7 +259,7 @@ to \ccc{alpha}.}
\ccMethod{Classification_type
classify(Facet f, const FT& alpha = get_alpha()) const;}
-{Classifies the facet \ccc{e} of the underlying triangulation with
+{Classifies the facet \ccc{f} of the underlying triangulation with
respect to \ccc{alpha}.}
\ccMethod{Classification_type
@@ -282,7 +282,7 @@ of the underlying triangulation with respect to \ccc{alpha}.}
const FT& alpha = get_alpha());}
{Write the cells which are of type \ccc{type} for
the alpha value \ccc{alpha} to the sequence
-pointed to by the output iterator \ccc{it}. Return past the end
+pointed to by the output iterator \ccc{it}. Returns past the end
of the output sequence.}
@@ -293,7 +293,7 @@ template
const FT& alpha= get_alpha());}
{Write the facets which are of type \ccc{type} for
the alpha value \ccc{alpha} to the sequence
-pointed to by the output iterator \ccc{it}. Return past the end
+pointed to by the output iterator \ccc{it}. Returns past the end
of the output sequence.}
\ccMethod {
@@ -303,17 +303,17 @@ template
const FT& alpha = get_alpha());}
{Write the edges which are of type \ccc{type} for
the alpha value \ccc{alpha} to the sequence
-pointed to by the output iterator \ccc{it}. Return past the end
+pointed to by the output iterator \ccc{it}. Returns past the end
of the output sequence.}
\ccMethod {
template
OutputIterator get_alpha_shape_vertices(OutputIterator it,
Classification_type type,
- const FT& alphaget_alpha());}
+ const FT& alpha);}
{Write the vertices which are of type \ccc{type} for
the alpha value \ccc{alpha} to the sequence
-pointed to by the output iterator \ccc{it}. Return past the end
+pointed to by the output iterator \ccc{it}. Returns past the end
of the output sequence.}
\ccMethod {
@@ -383,7 +383,7 @@ is an internal format.
\ccFunction{Geomview_stream& operator<<(Geomview_stream& W,
const Alpha_shape_3
& A);}
{Inserts the alpha shape \ccVar\ for the current alpha value into the Geomview stream \ccc{W}.
-\ccPrecond The insert operator must be defined for \ccc{Point} and \ccc{Triangle}.}
+\ccPrecond The insert operator must be defined for \ccc{GT::Point} and \ccc{GT::Triangle}.}
\ccImplementation
diff --git a/Alpha_shapes_3/doc_tex/Alpha_shapes_3_ref/Alpha_shape_cell_base_3.tex b/Alpha_shapes_3/doc_tex/Alpha_shapes_3_ref/Alpha_shape_cell_base_3.tex
index b5eef98e384..2a87e8fa682 100644
--- a/Alpha_shapes_3/doc_tex/Alpha_shapes_3_ref/Alpha_shape_cell_base_3.tex
+++ b/Alpha_shapes_3/doc_tex/Alpha_shapes_3_ref/Alpha_shape_cell_base_3.tex
@@ -52,7 +52,7 @@
The class \ccRefName\ is the default model for the concept
\ccc{AlphaShapeCell_3}.
-The class has to parameters. The traits class \ccc{Traits}
+The class has two parameters. The traits class \ccc{Traits}
provides the number type for alpha values.
The second parameter \ccc{Fb} is a base class instantiated by default
with \ccc{CGAL::Triangulation_cell_base_3}.
diff --git a/Alpha_shapes_3/doc_tex/Alpha_shapes_3_ref/Alpha_shape_vertex_base_3.tex b/Alpha_shapes_3/doc_tex/Alpha_shapes_3_ref/Alpha_shape_vertex_base_3.tex
index 45990650bf1..c78e4a88c6e 100644
--- a/Alpha_shapes_3/doc_tex/Alpha_shapes_3_ref/Alpha_shape_vertex_base_3.tex
+++ b/Alpha_shapes_3/doc_tex/Alpha_shapes_3_ref/Alpha_shape_vertex_base_3.tex
@@ -52,7 +52,7 @@
The class \ccRefName\ is the default model for the concept
\ccc{AlphaShapeVertex_3}.
-The class has to parameters : the traits class \ccc{Traits}
+The class has two parameters : the traits class \ccc{Traits}
which provides the type for the points or the weighted points.
The second parameter \ccc{Vb} is a base class instantiated by default
with \ccc{CGAL::Triangulation_vertex_base_3}.
diff --git a/Alpha_shapes_3/doc_tex/Alpha_shapes_3_ref/FixedAlphaShapeCellBase_3.tex b/Alpha_shapes_3/doc_tex/Alpha_shapes_3_ref/FixedAlphaShapeCellBase_3.tex
new file mode 100644
index 00000000000..63e3a5f4cc6
--- /dev/null
+++ b/Alpha_shapes_3/doc_tex/Alpha_shapes_3_ref/FixedAlphaShapeCellBase_3.tex
@@ -0,0 +1,38 @@
+\begin{ccRefConcept}{FixedAlphaShapeCell_3}
+
+\ccDefinition
+This concept describes the requirements for the base cell of a alpha shape with a fixed value alpha.
+
+
+\ccRefines
+\ccc{TriangulationCellBase_3}.
+
+
+\ccCreationVariable{f}
+
+\ccCreation
+
+
+\ccConstructor{Alpha_shape_cell_base_3();}{default constructor.}
+\ccGlue
+\ccConstructor{Alpha_shape_cell_base_3(const Vertex_handle& v0, const Vertex_handle& v1, const Vertex_handle& v2, const Vertex_handle& v3);}{constructor setting the incident vertices.}
+\ccGlue
+\ccConstructor{Alpha_shape_cell_base_3(const Vertex_handle& v0, const Vertex_handle& v1, const Vertex_handle& v2, const Vertex_handle& v3,
+const Cell_handle& n0, const Cell_handle& n1, const Cell_handle& n2, const Cell_handle& n3);}
+{constructor setting the incident vertices and the neighboring cells.}
+
+
+
+\ccAccessFunctions
+\ccMethod{Classification_type get_classification_type();}{Returns the classification of the cell.}
+\ccMethod{Classification_type get_facet_classification_type(int i);}{Returns the classification of the i-th facet of the cell.}
+
+
+\ccModifiers
+\ccMethod{void set_classification_type(Classification_type type);}
+ { Sets classification of the cell.}
+\ccMethod{void set_facet_classification_type(int i, Classification_type type);}
+{Sets the classification of the i-th facet of the cell.}
+
+
+\end{ccRefConcept}
diff --git a/Alpha_shapes_3/doc_tex/Alpha_shapes_3_ref/FixedAlphaShapeTraits_3.tex b/Alpha_shapes_3/doc_tex/Alpha_shapes_3_ref/FixedAlphaShapeTraits_3.tex
new file mode 100644
index 00000000000..a2308e58013
--- /dev/null
+++ b/Alpha_shapes_3/doc_tex/Alpha_shapes_3_ref/FixedAlphaShapeTraits_3.tex
@@ -0,0 +1,62 @@
+%----------------------------------------------------------------------
+
+\begin{ccRefConcept} {FixedAlphaShapeTraits_3}
+
+\ccCreationVariable{t}
+
+\ccDefinition
+The concept \ccRefName\ describes the requirements
+for the geometric traits class
+of the underlying Delaunay triangulation of a basic alpha shape with a fixed value alpha.
+
+
+\ccRefines
+\ccc{DelaunayTriangulationTraits_3}
+
+In addition to the requirements described in the concept
+\ccc{DelaunayTriangulationTraits_3},
+the geometric traits class of a
+Delaunay triangulation plugged in a basic alpha shape with fixed alpha value
+provides the following.
+
+
+\ccTypes
+
+\ccNestedType{Comparison_result}{\ccc{CGAL::Comparison_result} or \ccc{Uncertain}}
+
+\ccNestedType{Compare_squared_radius_3}
+{An object constructor able to compare \\
+the squared radius of the smallest circumscribing sphere of
+either four, three, two or one point(s)
+with a given value of alpha.
+It provides:\\
+\ccc{Comparison_result operator()(Point_3,Point_3,Point_3,Point_3)}\\
+\ccc{Comparison_result operator()(Point_3,Point_3,Point_3)}\\
+\ccc{Comparison_result operator()(Point_3,Point_3)}\\
+\ccc{Comparison_result operator()(Point_3)}\\
+}
+
+
+\ccCreation
+\ccCreationVariable{traits}
+\ccThree{TriangulationTraits_3xxx();}{Triangulation_traits_3 & tr}{}
+\ccThreeToTwo
+
+\ccConstructor{AlphaShapeTraits_3();}{Default constructor.}
+
+
+\ccAccessFunctions
+\ccMethod{Compare_squared_radius_3 compare_squared_radius_3_object();} {}
+
+\ccHasModels
+All \ccc{CGAL} kernels.\\
+\ccc{CGAL::Exact_predicates_inexact_constructions_kernel} (recommended)\\
+\ccc{CGAL::Exact_predicates_exact_constructions_kernel}\\
+\ccc{CGAL::Filtered_kernel}\\
+\ccc{CGAL::Cartesian}\\
+\ccc{CGAL::Simple_cartesian}\\
+\ccc{CGAL::Homogeneous}\\
+\ccc{CGAL::Simple_homogeneous}
+
+
+\end{ccRefConcept}
diff --git a/Alpha_shapes_3/doc_tex/Alpha_shapes_3_ref/FixedAlphaShapeVertexBase_3.tex b/Alpha_shapes_3/doc_tex/Alpha_shapes_3_ref/FixedAlphaShapeVertexBase_3.tex
new file mode 100644
index 00000000000..8f83ef966f5
--- /dev/null
+++ b/Alpha_shapes_3/doc_tex/Alpha_shapes_3_ref/FixedAlphaShapeVertexBase_3.tex
@@ -0,0 +1,44 @@
+%----------------------------------------------------------------------
+
+\begin{ccRefConcept}{FixedAlphaShapeVertex_3}
+
+\ccDefinition
+This concept describes the requirements for the base vertex of a alpha shape with a fixed value alpha.
+
+
+\ccRefines
+\ccc{TriangulationVertexBase_3}.
+
+\ccCreationVariable{v}
+
+\ccTypes
+\ccNestedType{Point}
+{Must be the same as the point type provided by
+the geometric traits class of the triangulation.}
+
+\ccCreation
+\ccConstructor{Alpha_shape_vertex_base_3();}{default constructor.}
+\ccGlue
+\ccConstructor{Alpha_shape_vertex_base_3(Point p);}{constructor setting
+the point associated to.}
+\ccGlue
+\ccConstructor{Alpha_shape_vertex_base_3(Point p, const Cell_handle& c);}
+{constructor setting the point associated to and an incident cell.}
+
+
+\ccAccessFunctions
+\ccMethod{bool is_on_chull();}
+{Returns a boolean indicating whether the point is on the convex hull of the point of the triangulation.}
+\ccMethod{Classification_type get_classification_type();}
+{Returns the classification of the vertex.}
+
+
+\ccModifiers
+\ccMethod{void set_classification_type(Classification_type type);}
+{Sets the classification of the vertex.}
+
+\ccMethod{void is_on_chull(bool b);}
+{Sets whether the vertex is on the convex hull.}
+
+
+\end{ccRefConcept}
diff --git a/Alpha_shapes_3/doc_tex/Alpha_shapes_3_ref/FixedWeightedAlphaShapeTraits_3.tex b/Alpha_shapes_3/doc_tex/Alpha_shapes_3_ref/FixedWeightedAlphaShapeTraits_3.tex
new file mode 100644
index 00000000000..938cd66bd2a
--- /dev/null
+++ b/Alpha_shapes_3/doc_tex/Alpha_shapes_3_ref/FixedWeightedAlphaShapeTraits_3.tex
@@ -0,0 +1,48 @@
+\begin{ccRefConcept}{FixedWeightedAlphaShapeTraits_3}
+
+%% \ccHtmlCrossLink{} %% add further rules for cross referencing links
+%% \ccHtmlIndexC[concept]{} %% add further index entries
+
+\ccDefinition
+
+The concept \ccRefName\ describes the requirements
+for the geometric traits class of the underlying regular triangulation of a weighted alpha shape with fixed alpha value.
+
+\ccRefines
+\ccc{RegularTriangulationTraits_3}
+
+In addition to the requirements described in the concept
+\ccc{RegularTriangulationTraits_3},
+the geometric traits class of a
+Regular triangulation plugged in a weighted alpha shape with fixed alpha value
+provides the following.
+
+\ccTypes
+\ccNestedType{Comparison_result}{\ccc{CGAL::Comparison_result} or \ccc{Uncertain}}
+
+\ccNestedType{Compare_weighted_squared_radius_3}
+{An object constructor able to compare the squared radius of the
+ smallest sphere orthogonal to either four, three, two or one weighted point(s)
+ to a given value of alpha.
+It provides:\\
+\ccc{Comparison_result operator()(Weighted_point_3 ,Weighted_point_3 ,Weighted_point_3 ,Weighted_point_3 )}\\
+\ccc{Comparison_result operator()(Weighted_point_3 ,Weighted_point_3 ,Weighted_point_3 )}\\
+\ccc{Comparison_result operator()(Weighted_point_3 ,Weighted_point_3 )}\\
+\ccc{Comparison_result operator()(Weighted_point_3 )}\\
+}
+
+\ccCreation
+\ccCreationVariable{wast} %% choose variable name
+
+\ccConstructor{WeightedAlphaShapeTraits_3();}{default constructor.}
+
+\ccAccessFunctions
+\ccMethod{Compare_weighted_squared_radius_3 compare_weighted_squared_radius_3_object();} {}
+
+
+\ccHasModels
+
+\ccc{CGAL::Regular_triangulation_euclidean_traits_3},
+
+\end{ccRefConcept}
+
diff --git a/Alpha_shapes_3/doc_tex/Alpha_shapes_3_ref/Fixed_alpha_shape_3.tex b/Alpha_shapes_3/doc_tex/Alpha_shapes_3_ref/Fixed_alpha_shape_3.tex
new file mode 100644
index 00000000000..ddd930f7c88
--- /dev/null
+++ b/Alpha_shapes_3/doc_tex/Alpha_shapes_3_ref/Fixed_alpha_shape_3.tex
@@ -0,0 +1,188 @@
+%----------------------------------------------------------------------
+
+\begin{ccRefClass} {Fixed_alpha_shape_3
}
+
+\ccDefinition
+
+The class \ccClassTemplateName\ represents one (fixed)
+alpha shape of points in the 3D space for a real
+$\alpha$. It maintains an underlying triangulation
+of the class \ccc{Dt} which
+represents connectivity and order among its faces. Each
+$k$-dimensional face of the \ccc{Dt} is associated with
+a classification that specifies its status in the alpha complex, alpha being fixed.
+
+Note that this class can be used at the same time to build a {\em basic} or
+a {\em weighted} Alpha Shape\ccIndexMainItem[C]{Weighted_alpha_shapes_3}.
+
+
+\ccInclude{CGAL/Fixed_alpha_shape_3.h}
+
+\ccInheritsFrom
+
+\ccc{Dt}
+
+This class is the underlying triangulation class.
+
+The modifying functions \ccc{insert} and \ccc{remove} will overwrite
+the inherited functions.
+
+\ccTypes
+\ccSetThreeColumns{Oriented_side}{}{\hspace*{10cm}}
+\ccThreeToTwo
+
+\ccNestedType{Gt}{the alpha shape traits type.}
+it has to derive from a triangulation traits class.
+For example \ccc{Dt::Point} is a Point class.
+
+\ccTypedef{typedef Gt::FT FT;}{the number type of alpha.}
+
+%\ccNestedType{Alpha_shape_vertices_iterator}{A bidirectional and non-mutable iterator that allow to traverse
+%the vertices which belongs to the alpha shape for a fixed $\alpha$.
+%\ccPrecond Its \ccc{value_type} is \ccc{Dt::Vertex_handle}}
+
+%\ccNestedType{Alpha_shape_facets_iterator}{A bidirectional and non-mutable iterator that allow to traverse
+%the facets which belongs to the alpha shape for a fixed $\alpha$.
+%\ccPrecond Its \ccc{value_type} is \ccc{Dt::Facet}}
+
+\ccEnum{enum Classification_type {EXTERIOR, SINGULAR, REGULAR, INTERIOR};}
+{Enum to classify the simplices of the underlying
+triangulation with respect to a given alpha value.\\
+Each k-dimensional simplex of the triangulation
+can be classified as EXTERIOR, SINGULAR, REGULAR
+or INTERIOR.
+A $k$ simplex is REGULAR if it is on the boundary
+of the alpha complex and belongs to a $k+1$ simplex in this complex
+and it is SINGULAR if it is a boundary simplex that is not included in a $k+1$ simplex of the complex. \\
+}
+
+
+
+
+\ccCreation
+\ccCreationVariable{A}
+
+\ccConstructor{Alpha_shape_3(FT alpha = 0);}
+{Introduces an empty alpha shape data structure
+\ccVar\ and set the alpha value to \ccc{alpha}.}
+
+\ccConstructor{ Alpha_shape_3(Dt& dt,FT alpha = 0);}
+{Builds an alpha shape from the triangulation \ccc{dt},
+and set the alpha value to \ccc{alpha}.
+Be careful that this operation destroys the triangulation.}
+
+\ccConstructor{template < class InputIterator >
+ Alpha_shape_3(
+ InputIterator first,
+ InputIterator last,
+ const FT& alpha = 0);}
+{Builds an alpha shape data structure
+for the points in the range
+$\left[\right.$\ccc{first}, \ccc{last}$\left.\right)$ and
+set the alpha value to \ccc{alpha}.
+\ccRequire The \ccc{value_type} of \ccc{first} and
+\ccc{last} is \ccc{Point} (the type point of the underlying
+triangulation.)}
+
+
+\ccModifiers
+
+\ccMethod{Vertex_handle insert (Point p,Cell_handle start = Cell_handle());}
+{
+Inserts point p in the underlying triangulation and returns the corresponding vertex.
+The optional argument \ccc{start} is used as a starting place for the search.
+The classification types of the new simplices are computed and that of the simplices incident
+to the new ones are updated.
+}
+
+\ccMethod{void remove (Vertex_handle v);}
+{
+Removes the vertex v from the underlying triangulation.
+The classification types of new simplices and their incident faces are set or reset
+}
+
+\ccMethod{void
+ clear();}
+{Clears the structure.}
+
+
+\ccHeading{Query Functions}
+
+
+\ccMethod{const FT&
+ get_alpha(void) const;}
+{Returns the $\alpha$-value.}
+
+\ccMethod{Classification_type
+ classify(Cell_handle c) const;}
+{Classifies the cell \ccc{c} of the underlying triangulation in the alpha complex.}
+
+\ccMethod{Classification_type classify(Facet f) const;}
+{Classifies the facet \ccc{f} of the underlying triangulation in the alpha complex.}
+
+\ccMethod{Classification_type classify(Cell_handle f, int i) const;}
+{Classifies the facet of the cell \ccc{f} opposite to the vertex with index
+\ccc{i} of the underlying triangulation in the alpha complex.}
+
+\ccMethod{Classification_type classify(const Edge& e) const;}
+{Classifies the edge \ccc{e} of the underlying triangulation in the alpha complex. }
+
+\ccMethod{Classification_type classify(Vertex_handle v) const;}
+{Classifies the vertex \ccc{v} of the underlying triangulation in the alpha complex.}
+
+
+
+\ccMethod {template
+ OutputIterator get_alpha_shape_cells(OutputIterator it, Classification_type type);}
+{Writes the cells which are of type \ccc{type} in the alpha complex
+to the sequence
+pointed to by the output iterator \ccc{it}. Returns past the end
+of the output sequence.}
+
+
+\ccMethod {
+template
+ OutputIterator get_alpha_shape_facets(OutputIterator it, Classification_type type);}
+{Writes the facets which are of type \ccc{type} in the alpha complex
+to the sequence pointed to by the output iterator \ccc{it}. Returns past the end
+of the output sequence.}
+
+\ccMethod {
+template
+ OutputIterator get_alpha_shape_edges(OutputIterator it, Classification_type type);}
+{Writes the edges which are of type \ccc{type} in the alpha complex
+to the sequence
+pointed to by the output iterator \ccc{it}. Returns past the end
+of the output sequence.}
+
+\ccMethod {
+ template
+ OutputIterator get_alpha_shape_vertices(OutputIterator it, Classification_type type);}
+{Writes the vertices which are of type \ccc{type} in the alpha complex
+to the sequence pointed to by the output iterator \ccc{it}. Returns past the end
+of the output sequence.}
+
+\ccHeading{I/O}
+
+The I/O operators are defined for \ccc{iostream}, and for
+the window stream provided by \cgal. The format for the iostream
+is an internal format.
+
+\ccInclude{CGAL/IO/io.h}
+
+\ccFunction{ostream& operator<<(ostream& os,
+ const Alpha_shape_3
& A);}
+{Inserts the alpha shape \ccVar\ for the alpha value of \ccc{A} into the stream \ccc{os}.
+\ccRequire The insert operator must be defined for \ccc{GT::Point}.}
+
+\ccInclude{CGAL/IO/Geomview_stream.h}
+
+\ccInclude{CGAL/IO/alpha_shape_geomview_ostream_3.h}
+
+\ccFunction{Geomview_stream& operator<<(Geomview_stream& W,
+ const Alpha_shape_3
& A);}
+{Inserts the alpha shape \ccVar\ into the Geomview stream \ccc{W}.
+\ccRequire The insert operator must be defined for \ccc{GT::Point} and \ccc{GT::Triangle}.}
+
+\end{ccRefClass}
+
diff --git a/Alpha_shapes_3/doc_tex/Alpha_shapes_3_ref/Fixed_alpha_shape_cell_base_3.tex b/Alpha_shapes_3/doc_tex/Alpha_shapes_3_ref/Fixed_alpha_shape_cell_base_3.tex
new file mode 100644
index 00000000000..2e4e70d60c6
--- /dev/null
+++ b/Alpha_shapes_3/doc_tex/Alpha_shapes_3_ref/Fixed_alpha_shape_cell_base_3.tex
@@ -0,0 +1,26 @@
+%----------------------------------------------------------------------
+
+\begin{ccRefClass}{Fixed_alpha_shape_cell_base_3}
+
+\ccDefinition
+
+The class \ccRefName\ is the default model for the concept
+\ccc{FixedAlphaShapeCell_3}.
+
+The class has two parameters. The traits class \ccc{Traits}
+provides the number type for alpha values.
+The second parameter \ccc{Fb} is a base class instantiated by default
+with \ccc{CGAL::Triangulation_cell_base_3}.
+
+
+\ccInclude{CGAL/Fixed_alpha_shape_cell_base_3.h}
+
+\ccIsModel
+\ccc{FixedAlphaShapeCellBase_3}
+
+\ccInheritsFrom
+
+\ccc{Fb}
+
+
+\end{ccRefClass}
diff --git a/Alpha_shapes_3/doc_tex/Alpha_shapes_3_ref/Fixed_alpha_shape_vertex_base_3.tex b/Alpha_shapes_3/doc_tex/Alpha_shapes_3_ref/Fixed_alpha_shape_vertex_base_3.tex
new file mode 100644
index 00000000000..00c48a8c196
--- /dev/null
+++ b/Alpha_shapes_3/doc_tex/Alpha_shapes_3_ref/Fixed_alpha_shape_vertex_base_3.tex
@@ -0,0 +1,27 @@
+%----------------------------------------------------------------------
+
+\begin{ccRefClass}{Fixed_alpha_shape_vertex_base_3}
+
+\ccDefinition
+
+The class \ccRefName\ is the default model for the concept
+\ccc{FixedAlphaShapeVertex_3}.
+
+The class has two parameters : the traits class \ccc{Traits}
+which provides the type for the points or the weighted points.
+The second parameter \ccc{Vb} is a base class instantiated by default
+with \ccc{CGAL::Triangulation_vertex_base_3}.
+
+
+\ccInclude{CGAL/Fixed_alpha_shape_vertex_base_3.h}
+
+
+\ccIsModel
+\ccc{FixedAlphaShapeVertexBase_3}
+
+
+\ccInheritsFrom
+
+\ccc{Vb}
+
+\end{ccRefClass}
diff --git a/Alpha_shapes_3/doc_tex/Alpha_shapes_3_ref/WeightedAlphaShapeTraits_3.tex b/Alpha_shapes_3/doc_tex/Alpha_shapes_3_ref/WeightedAlphaShapeTraits_3.tex
index d4b91e61766..f920f745295 100644
--- a/Alpha_shapes_3/doc_tex/Alpha_shapes_3_ref/WeightedAlphaShapeTraits_3.tex
+++ b/Alpha_shapes_3/doc_tex/Alpha_shapes_3_ref/WeightedAlphaShapeTraits_3.tex
@@ -43,7 +43,7 @@ and the squared radius of the
smallest sphere orthogonal to three weighted points \ccc{p0, p1, p2},
and the squared radius of smallest sphere orthogonal to
two weighted points \ccc{p0, p1},
-and the squared radius of the smallest spere orthogonal to a single
+and the squared radius of the smallest sphere orthogonal to a single
point \ccc{p0}.}
\ccCreation
diff --git a/Alpha_shapes_3/doc_tex/Alpha_shapes_3_ref/intro.tex b/Alpha_shapes_3/doc_tex/Alpha_shapes_3_ref/intro.tex
index f56aa6b7b01..d74ff1ea419 100644
--- a/Alpha_shapes_3/doc_tex/Alpha_shapes_3_ref/intro.tex
+++ b/Alpha_shapes_3/doc_tex/Alpha_shapes_3_ref/intro.tex
@@ -51,7 +51,8 @@
%\section{Reference pages for Alpha Shapes in 3D}
\ccRefChapter{3D Alpha Shapes}
-\ccChapterAuthor{Tran Kai Frank Da \and Mariette Yvinec}
+\ccChapterAuthor{Tran Kai Frank Da \and
+S\'ebastien Loriot \and Mariette Yvinec}
Alpha shapes definition is based on an underlying
triangulation that may be a Delaunay triangulation
@@ -65,7 +66,7 @@ The alpha complex is a subcomplex
of the Delaunay triangulation.
For a given value of $\alpha$, the alpha complex includes
all the simplices in the Delaunay triangulation which have
-an empty circumsphere with squared radius equal or smaller than $\alpha$.
+an empty circumscribing sphere with squared radius equal or smaller than $\alpha$.
Here ``empty'' means that the open sphere
do not include any points of $S$.
The alpha shape is then simply the domain covered by the simplices
@@ -76,11 +77,6 @@ This means in particular that the alpha complex may have
singular faces. For $0 \leq k \leq d-1$,
a $k$-simplex of the alpha complex is said to be
singular if it is not a facet of a $(k+1)$-simplex of the complex
-CGAL provides two versions of the alpha shapes. In the general mode,
-the alpha shapes correspond strictly to the above definition.
-The regularized mode provides a regularized version of the alpha shapes
-corresponding to the domain covered by a regularized version
-of the alpha complex where singular faces are removed.
The alpha shapes of a set of points
$S$ form a discrete family, even though they
@@ -95,7 +91,6 @@ easily. Furthermore, we can select the optimal value
of $\alpha$ to get an alpha shape including all data points
and having less than a given number of connected components.
-
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
@@ -110,8 +105,16 @@ 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
input weighted points. Once again the alpha shape is then defined as
-the domain covered by a the alpha complex and arise in two versions
-general or regularized.
+the domain covered by a the alpha complex.
+
+CGAL provides two versions to compute alpha shapes.
+The first one gives access to an explicit classification of all the simplices for a fixed alpha value.
+The second one gives access to the entire family of alpha shapes of a set of points.
+This latter version comes with two modes. In the general mode,
+the alpha shapes correspond strictly to the definition previously made.
+The regularized mode provides a regularized version of the alpha shapes
+corresponding to the domain covered by a regularized version
+of the alpha complex where singular faces are removed.
\section{Classified Reference Pages}
@@ -122,6 +125,10 @@ general or regularized.
\ccRefConceptPage{WeightedAlphaShapeTraits_3} \\
\ccRefConceptPage{AlphaShapeCell_3}\\
\ccRefConceptPage{AlphaShapeVertex_3}\\
+\ccRefConceptPage{FixedAlphaShapeTraits_3}\\
+\ccRefConceptPage{FixedWeightedAlphaShapeTraits_3} \\
+\ccRefConceptPage{FixedAlphaShapeCell_3}\\
+\ccRefConceptPage{FixedAlphaShapeVertex_3}\\
\subsection*{Classes}
@@ -130,3 +137,7 @@ general or regularized.
%\ccRefIdfierPage{CGAL::Weighted_alpha_shape_euclidean_traits_3}\\
\ccRefIdfierPage{CGAL::Alpha_shape_vertex_base_3}\\
\ccRefIdfierPage{CGAL::Alpha_shape_cell_base_3}
+
+\ccRefIdfierPage{CGAL::Fixed_alpha_shape_3
}\\
+\ccRefIdfierPage{CGAL::Fixed_alpha_shape_vertex_base_3}\\
+\ccRefIdfierPage{CGAL::Fixed_alpha_shape_cell_base_3}
diff --git a/Alpha_shapes_3/doc_tex/Alpha_shapes_3_ref/main.tex b/Alpha_shapes_3/doc_tex/Alpha_shapes_3_ref/main.tex
index bc0e8aa5e81..15ca63e59f3 100644
--- a/Alpha_shapes_3/doc_tex/Alpha_shapes_3_ref/main.tex
+++ b/Alpha_shapes_3/doc_tex/Alpha_shapes_3_ref/main.tex
@@ -17,4 +17,12 @@
\input{Alpha_shapes_3_ref/WeightedAlphaShapeTraits_3.tex}
\input{Alpha_shapes_3_ref/Weighted_alpha_shape_euclidean_traits_3.tex}
+\input{Alpha_shapes_3_ref/FixedAlphaShapeTraits_3.tex}
+\input{Alpha_shapes_3_ref/FixedAlphaShapeCellBase_3.tex}
+\input{Alpha_shapes_3_ref/FixedAlphaShapeVertexBase_3.tex}
+\input{Alpha_shapes_3_ref/Fixed_alpha_shape_3.tex}
+\input{Alpha_shapes_3_ref/Fixed_alpha_shape_cell_base_3.tex}
+\input{Alpha_shapes_3_ref/Fixed_alpha_shape_vertex_base_3.tex}
+\input{Alpha_shapes_3_ref/FixedWeightedAlphaShapeTraits_3.tex}
+
%% EOF
diff --git a/Alpha_shapes_3/examples/Alpha_shapes_3/ex_alpha_shapes_3.cpp b/Alpha_shapes_3/examples/Alpha_shapes_3/ex_alpha_shapes_3.cpp
index e212923c0ee..0712f4f039e 100644
--- a/Alpha_shapes_3/examples/Alpha_shapes_3/ex_alpha_shapes_3.cpp
+++ b/Alpha_shapes_3/examples/Alpha_shapes_3/ex_alpha_shapes_3.cpp
@@ -34,7 +34,7 @@ int main()
// compute alpha shape
Alpha_shape_3 as(lp.begin(),lp.end());
- std::cout << "Alpha shape computed in REGULARIZED mode by defaut"
+ std::cout << "Alpha shape computed in REGULARIZED mode by default"
<< std::endl;
// find optimal alpha value
diff --git a/Alpha_shapes_3/examples/Alpha_shapes_3/ex_fixed_weighted_alpha_shapes_3.cpp b/Alpha_shapes_3/examples/Alpha_shapes_3/ex_fixed_weighted_alpha_shapes_3.cpp
new file mode 100644
index 00000000000..e80c12498f9
--- /dev/null
+++ b/Alpha_shapes_3/examples/Alpha_shapes_3/ex_fixed_weighted_alpha_shapes_3.cpp
@@ -0,0 +1,57 @@
+#include
+#include
+#include
+#include
+#include
+#include
+#include
+
+typedef CGAL::Exact_predicates_inexact_constructions_kernel K;
+
+typedef CGAL::Regular_triangulation_euclidean_traits_3 Gt;
+
+typedef CGAL::Fixed_alpha_shape_vertex_base_3 Vb;
+typedef CGAL::Fixed_alpha_shape_cell_base_3 Fb;
+typedef CGAL::Triangulation_data_structure_3 Tds;
+typedef CGAL::Regular_triangulation_3 Triangulation_3;
+typedef CGAL::Fixed_alpha_shape_3 Fixed_alpha_shape_3;
+
+typedef Fixed_alpha_shape_3::Cell_handle Cell_handle;
+typedef Fixed_alpha_shape_3::Vertex_handle Vertex_handle;
+typedef Fixed_alpha_shape_3::Facet Facet;
+typedef Fixed_alpha_shape_3::Edge Edge;
+typedef Gt::Weighted_point Weighted_point;
+typedef Gt::Bare_point Bare_point;
+
+int main()
+{
+ std::list lwp;
+
+ //input : a small molecule
+ lwp.push_back(Weighted_point(Bare_point( 1, -1, -1), 4));
+ lwp.push_back(Weighted_point(Bare_point(-1, 1, -1), 4));
+ lwp.push_back(Weighted_point(Bare_point(-1, -1, 1), 4));
+ lwp.push_back(Weighted_point(Bare_point( 1, 1, 1), 4));
+ lwp.push_back(Weighted_point(Bare_point( 2, 2, 2), 1));
+
+ //build one alpha_shape with alpha=0
+ Fixed_alpha_shape_3 as(lwp.begin(), lwp.end(), 0);
+
+ //explore the 0-shape - It is dual to the boundary of the union.
+ std::list cells;
+ std::list facets;
+ std::list edges;
+ as.get_alpha_shape_cells(std::back_inserter(cells),
+ Fixed_alpha_shape_3::INTERIOR);
+ as.get_alpha_shape_facets(std::back_inserter(facets),
+ Fixed_alpha_shape_3::REGULAR);
+ as.get_alpha_shape_facets(std::back_inserter(facets),
+ Fixed_alpha_shape_3::SINGULAR);
+ as.get_alpha_shape_edges(std::back_inserter(edges),
+ Fixed_alpha_shape_3::SINGULAR);
+ std::cout << " The 0-shape has : " << std::endl;
+ std::cout << cells.size() << " interior tetrahedra" << std::endl;
+ std::cout << facets.size() << " boundary facets" << std::endl;
+ std::cout << edges.size() << " singular edges" << std::endl;
+ return 0;
+}
diff --git a/Alpha_shapes_3/include/CGAL/Fixed_alpha_shape_3.h b/Alpha_shapes_3/include/CGAL/Fixed_alpha_shape_3.h
new file mode 100644
index 00000000000..0461ab84b12
--- /dev/null
+++ b/Alpha_shapes_3/include/CGAL/Fixed_alpha_shape_3.h
@@ -0,0 +1,1123 @@
+// Copyright (c) 2009 INRIA Sophia-Antipolis (France).
+// All rights reserved.
+//
+// This file is part of CGAL (www.cgal.org); you may redistribute it under
+// the terms of the Q Public License version 1.0.
+// See the file LICENSE.QPL distributed with CGAL.
+//
+// Licensees holding a valid commercial license may use this file in
+// accordance with the commercial license agreement provided with the so
+//
+// This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
+// WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
+//
+// $URL$
+// $Id$
+//
+//
+// Author(s) : Sebastien Loriot
+//
+
+#ifndef CGAL_FIXED_ALPHA_SHAPE_3_H
+#define CGAL_FIXED_ALPHA_SHAPE_3_H
+
+#include
+
+#include
+#include