The class Alpha_shape_2<Dt> represents the family of α-shapes of points in a plane for all positive α. It maintains the underlying triangulation Dt which represents connectivity and order among its faces. Each k-dimensional face of the Dt is associated with an interval that specifies for which values of α the face belongs to the α-shape. There are links between the intervals and the k-dimensional faces of the triangulation.
Note that this class is at the same time used for basic and for weighted Alpha Shapes .
#include <CGAL/Alpha_shape_2.h>
Dt
This class is the underlying triangulation class.
The modifying functions insert and remove will overwrite the inherited functions. At the moment, only the static version is implemented.
| |
the alpha shape traits type.
|
|
| the number type for computation. |
| |||
A bidirectional and non-mutable iterator that allow to traverse
the increasing sequence of different α-values.
| |||
| |||
A bidirectional and non-mutable iterator that allow to traverse
the vertices which belongs to the α-shape for the current α.
| |||
| |||
A bidirectional and non-mutable iterator that allow to traverse
the edges which belongs to the α-shape for the current α.
| |||
| |||
Distinguishes the different cases for classifying a k-dimensional face
of the underlying triangulation of the α-shape. EXTERIOR if the face does not belong to the α-complex. SINGULAR if the face belongs to the boundary of the α-shape, but is not incident to any 2-dimensional face of the α-complex REGULAR if the face belongs to the boundary of the α-shape and is incident to a 2-dimensional face of the α-complex INTERIOR if the face belongs to the α-complex, but does not belong to the boundary of the α-shape.
| |||
| |||
In general, an alpha shape can be disconnected and contain many singular edges
or vertices. Its regularized version is formed by the set of regular edges
and their vertices.
|
| |||
Introduces an empty α-shape A for a positive α-value
alpha.
| |||
| |||
| |||
Initializes the family of alpha-shapes with the points in the range
[.first, last.) and
introduces an α-shape A for a positive α-value
alpha.
|
| ||||
|
| |||
Initialize the family of alpha-shapes with the points in the range
[.first, last.). Returns the number of
inserted points. If the function is applied to an non-empty family of alpha-shape, it is cleared before initialization.
| ||||
|
| Clears the structure. | ||
|
|
Sets the α-value to alpha.
Returns the previous α-value.
| ||
|
| Returns the current α-value. | ||
|
|
Returns the n-th alpha-value, sorted in an increasing order.
| ||
|
| Returns the number of different alpha-values. | ||
|
| Sets A to its general or regularized version. Returns the previous mode. | ||
|
| Returns whether A is general or regularized. | ||
|
| Starts at an arbitrary finite vertex which belongs to the α-shape for the current α. | ||
|
| Past-the-end iterator. | ||
|
| Starts at an arbitrary finite edge which belongs to the α-shape for the current α. In regularized mode, edges are represented as a pair (f,i), where f is an interior face of the α-shape. | ||
|
| Past-the-end iterator. |
|
| |
Locates a point p in the underlying triangulation and Classifies the associated k-face with respect to A. | ||
|
| |
Classifies the face f of the underlying triangulation with respect to A. | ||
|
| |
Classifies the edge e of the underlying triangulation with respect to A. | ||
|
| |
Classifies the edge of the face f opposite to the vertex with index i of the underlying triangulation with respect to A. | ||
|
| |
Classifies the vertex v of the underlying triangulation with respect to A. |
|
| |
Returns the number of solid components of A, that is, the number of components of its regularized version. | ||
|
| |
Returns an iterator pointing to the first element with α-value
such that A satisfies the following two properties: nb_components equals the number of solid components and all data points are either on the boundary or in the interior of the regularized version of A. If no such value is found, the iterator points to the first element with α-value such that A satisfies the second property. |
The I/O operators are defined for iostream. The format for the iostream is an internal format.
#include <CGAL/IO/io.h>
|
|
Inserts the alpha shape A for the current α-value into the stream os.
|
The cross links between the intervals and the k-dimensional faces of the triangulation are realized using methods in the k-dimensional faces themselves.
A.alpha find uses linear search, while A.alpha lower bound and A.alpha upper bound use binary search. A.number of solid components performs a graph traversal and takes time linear in the number of faces of the underlying triangulation. A.find optimal alpha uses binary search and takes time O( n log n ), where n is the number of points.