Replace Triangulaiton_hierarchy_3 by the Fast_location policy.

This commit is contained in:
Sylvain Pion 2009-11-04 13:21:12 +00:00
parent 828a6eeabc
commit e704029f4c
3 changed files with 20 additions and 23 deletions

View File

@ -195,10 +195,9 @@ points cannot be inserted or removed.
We currently do not specify concepts for the underlying triangulation
type. Models that work for a basic alpha-shape are the classes
\ccc{CGAL::Delaunay_triangulation_3} and
\ccc{CGAL::Triangulation_hierarchy_3} templated with a Delaunay
triangulation. A model that works for a weighted alpha-shape is
type. Models that work for a basic 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 triangulation needs a geometric traits class as argument.
@ -234,17 +233,18 @@ as underlying triangulation.
\subsection{Building Basic Alpha Shapes for Many Points}
When many points are input in the alpha shape, say more than 10 000,
it pays off to use a triangulation hierarchy as underlying triangulation
(cf. \ref{T3-concept-hierarchy}).
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}).
\ccIncludeExampleCode{Alpha_shapes_3/ex_alpha_shapes_with_hierarchy_3.cpp}
\ccIncludeExampleCode{Alpha_shapes_3/ex_alpha_shapes_with_fast_location_3.cpp}
%----------------------------------------------------------------------
\subsection{Example for Weighted Alpha-Shapes\label{I1_SectWeightedAS3D}}
The following examples build a weighted alpha shape requiring a
regular triangulation as underlying triangulation.
The alpha shape is build in \ccc{GENERAL} mode.
The alpha shape is built in \ccc{GENERAL} mode.
\ccIncludeExampleCode{Alpha_shapes_3/ex_weighted_alpha_shapes_3.cpp}

View File

@ -1,12 +1,12 @@
example_alpha : read input points, compute the alpha shape in
ex_alpha_shapes_3 : read input points, compute the alpha shape in
regularized mode and find the optimal value of $\alpha$, i. e. the smallest
$\alpha$ such that all input point are interior or on the boundary of the
alpha shape and the alpha shape has a single connected component.
$\alpha$ such that all input points are in the interior or on the boundary of
the alpha shape, and the alpha shape has a single connected component.
example_big_alpha : buid the alpha shape for a huge set of points using
a Delaunay hirarchy as underlying triangulation for efficiency.
ex_alpha_shapes_with_fast_location_3 : build the alpha shape using an
underlying Delaunay triangulation with Fast_location policy, for efficient
point location.
example_weight : build the weighted alpha shape of a small
set of spheres and explore the boundary of the alpha complex for $\alpha =0$.
ex_weighted_alpha_shapes_3 : build the weighted alpha shape of a small
set of spheres and explore the boundary of the alpha complex for $\alpha=0$.
This complex is the nerve of the union of the spheres.

View File

@ -1,6 +1,5 @@
#include <CGAL/Exact_predicates_inexact_constructions_kernel.h>
#include <CGAL/Delaunay_triangulation_3.h>
#include <CGAL/Triangulation_hierarchy_3.h>
#include <CGAL/Alpha_shape_3.h>
#include <fstream>
@ -10,12 +9,10 @@
typedef CGAL::Exact_predicates_inexact_constructions_kernel K;
typedef CGAL::Alpha_shape_vertex_base_3<K> Vb;
typedef CGAL::Triangulation_hierarchy_vertex_base_3<Vb> Vbh;
typedef CGAL::Alpha_shape_cell_base_3<K> Fb;
typedef CGAL::Triangulation_data_structure_3<Vbh,Fb> Tds;
typedef CGAL::Delaunay_triangulation_3<K,Tds> Delaunay;
typedef CGAL::Triangulation_hierarchy_3<Delaunay> Delaunay_hierarchy;
typedef CGAL::Alpha_shape_3<Delaunay_hierarchy> Alpha_shape_3;
typedef CGAL::Triangulation_data_structure_3<Vb,Fb> Tds;
typedef CGAL::Delaunay_triangulation_3<K,Tds,CGAL::Fast_location> Delaunay;
typedef CGAL::Alpha_shape_3<Delaunay> Alpha_shape_3;
typedef K::Point_3 Point;
typedef Alpha_shape_3::Alpha_iterator Alpha_iterator;
@ -23,7 +20,7 @@ typedef Alpha_shape_3::NT NT;
int main()
{
Delaunay_hierarchy dt;
Delaunay dt;
std::ifstream is("./data/bunny_1000");
int n;
is >> n;