Class

CGAL::Fixed_alpha_shape_3<Dt>

Definition

The class Fixed_alpha_shape_3<Dt> represents one (fixed) alpha shape of points in the 3D space for a real α. It maintains an underlying triangulation of the class Dt which represents connectivity and order among its faces. Each k-dimensional face of the 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 basic or a weighted Alpha Shape .

#include <CGAL/Fixed_alpha_shape_3.h>

Inherits From

Dt

This class is the underlying triangulation class.

The modifying functions insert and remove will overwrite the inherited functions.

Types

Fixed_alpha_shape_3<Dt>::Gt
the alpha shape traits type.

it has to derive from a triangulation traits class. For example Dt::Point is a Point class.

typedef Gt::FT FT; the number type of alpha.

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.

Creation

Fixed_alpha_shape_3<Dt> A ( FT alpha = 0);
Introduces an empty alpha shape data structure A and set the alpha value to alpha.


Fixed_alpha_shape_3<Dt> A ( Dt& dt, FT alpha = 0);
Builds an alpha shape from the triangulation dt, and set the alpha value to alpha. Be careful that this operation destroys the triangulation.


template < class InputIterator >
Fixed_alpha_shape_3<Dt> A ( InputIterator first, InputIterator last, FT alpha = 0);
Builds an alpha shape data structure for the points in the range [.first, last.) and set the alpha value to alpha.
Requirement: The value_type of first and last is Point (the type point of the underlying triangulation.)

Modifiers

Vertex_handle A.insert ( Point p, Cell_handle start = Cell_handle())
Inserts point p in the underlying triangulation and returns the corresponding vertex. The optional argument 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.

void A.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

void A.clear () Clears the structure.

Query Functions

FT A.get_alpha ( void) const Returns the α-value.

Classification_type A.classify ( Cell_handle c) const Classifies the cell c of the underlying triangulation in the alpha complex.

Classification_type A.classify ( Facet f) const Classifies the facet f of the underlying triangulation in the alpha complex.

Classification_type A.classify ( Cell_handle f, int i) const
Classifies the facet of the cell f opposite to the vertex with index i of the underlying triangulation in the alpha complex.

Classification_type A.classify ( Edge e) const Classifies the edge e of the underlying triangulation in the alpha complex.

Classification_type A.classify ( Vertex_handle v) const
Classifies the vertex v of the underlying triangulation in the alpha complex.

template<class OutputIterator>
OutputIterator A.get_alpha_shape_cells ( OutputIterator it, Classification_type type)
Writes the cells which are of type type in the alpha complex to the sequence pointed to by the output iterator it. Returns past the end of the output sequence.

template<class OutputIterator>
OutputIterator A.get_alpha_shape_facets ( OutputIterator it, Classification_type type)
Writes the facets which are of type type in the alpha complex to the sequence pointed to by the output iterator it. Returns past the end of the output sequence.

template<class OutputIterator>
OutputIterator A.get_alpha_shape_edges ( OutputIterator it, Classification_type type)
Writes the edges which are of type type in the alpha complex to the sequence pointed to by the output iterator it. Returns past the end of the output sequence.

template<class OutputIterator>
OutputIterator A.get_alpha_shape_vertices ( OutputIterator it, Classification_type type)
Writes the vertices which are of type type in the alpha complex to the sequence pointed to by the output iterator it. Returns past the end of the output sequence.

I/O

The I/O operators are defined for iostream, and for the window stream provided by Cgal. The format for the iostream is an internal format.

#include <CGAL/IO/io.h>

ostream& ostream& os << A Inserts the alpha shape A into the stream os.
Requirement: The insert operator must be defined for GT::Point.