CGAL 6.1 - 3D Alpha Shapes

Loading...
Searching...
No Matches
List of all members | Related Functions
CGAL::Fixed_alpha_shape_3< Dt > Class Template Reference
Reference Manual

`#include <CGAL/Fixed_alpha_shape_3.h>`

## Inherits from

Dt.

## Definition

template<typename Dt>
class CGAL::Fixed_alpha_shape_3< Dt >

The class `Fixed_alpha_shape_3` represents one (fixed) alpha shape of points in the 3D space for a real \( \alpha\).

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.

Template Parameters

  Dt | must be either `Delaunay_triangulation_3`, `Regular_triangulation_3`, `Periodic_3_Delaunay_triangulation_3` or `Periodic_3_regular_triangulation_3`. Note that `Dt::Geom_traits`, `Dt::Vertex`, and `Dt::Face` must be model the concepts `AlphaShapeTraits_3`, `AlphaShapeVertex_3` and `AlphaShapeFace_3`, respectively.

Note that this class is used for basic, weighted, and periodicAlpha Shapes.

The modifying functions `insert` and `remove` will overwrite the one inherited from the underlying triangulation class `Dt`. At the moment, only the static version is implemented.

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.

Examples
  Alpha_shapes_3/ex_fixed_weighted_alpha_shapes_3.cpp.

## Related Functions
(Note that these are not member functions.)
std::ostream & | operator<< (std::ostream &os, const Fixed_alpha_shape_3< Dt > &A)
| inserts the fixed alpha shape `A` into the stream `os`.

## Types
enum | Classification_type { EXTERIOR , SINGULAR , REGULAR , INTERIOR }
| Enum to classify the simplices of the underlying triangulation with respect to a given alpha value. More...
typedef unspecified_type | Gt
| the alpha shape traits type.
typedef Gt::FT | FT
| the number type of alpha.

## Creation
| Fixed_alpha_shape_3 (FT alpha=0)
| builds an empty fixed alpha shape and sets the alpha value to `alpha`.
| Fixed_alpha_shape_3 (Dt &dt, FT alpha=0)
| builds a fixed alpha shape from the triangulation `dt`, and sets the alpha value to `alpha`.
template<class InputIterator >
| Fixed_alpha_shape_3 (InputIterator first, InputIterator last, const FT &alpha=0)
| builds a fixed alpha shape for the points in the range `[first,last)` and sets the alpha value to `alpha`.

## Modifiers
Vertex_handle | insert (Point p, Cell_handle start=Cell_handle())
| inserts the point `p` in the underlying triangulation and returns the corresponding vertex.
void | remove (Vertex_handle v)
| removes the vertex `v` from the underlying triangulation.
void | clear ()
| clears the structure.

## Query Functions
const FT & | get_alpha (void) const
| returns the \( \alpha\)-value.
Classification_type | classify (Cell_handle c) const
| classifies the cell `c` of the underlying triangulation in the alpha complex.
Classification_type | classify (Facet f) const
| classifies the facet `f` of the underlying triangulation in the alpha complex.
Classification_type | 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 | classify (const Edge &e) const
| classifies the edge `e` of the underlying triangulation in the alpha complex.
Classification_type | classify (Vertex_handle v) const
| classifies the vertex `v` of the underlying triangulation in the alpha complex.
template<class OutputIterator >
OutputIterator | 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`.
template<class OutputIterator >
OutputIterator | 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`.
template<class OutputIterator >
OutputIterator | 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`.
template<class OutputIterator >
OutputIterator | 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`.

## Member Typedef Documentation

## ◆ Gt

template<typename Dt >

typedef unspecified_type CGAL::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.

## Member Enumeration Documentation

## ◆ Classification_type

template<typename Dt >

enum CGAL::Fixed_alpha_shape_3::Classification_type

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.

Enumerator
EXTERIOR |
SINGULAR |
REGULAR |
INTERIOR |

## Constructor & Destructor Documentation

## ◆ Fixed_alpha_shape_3() [1/2]

template<typename Dt >

CGAL::Fixed_alpha_shape_3< Dt >::Fixed_alpha_shape_3 | ( | Dt & | dt,
|  | FT | alpha = `0`
| ) |  |

builds a fixed alpha shape from the triangulation `dt`, and sets the alpha value to `alpha`.

Attention
  This operation swaps `*this` and `dt`, that is `dt` is an empty triangulation once the fixed alpha shape is built.

## ◆ Fixed_alpha_shape_3() [2/2]

template<typename Dt >
template<class InputIterator >

CGAL::Fixed_alpha_shape_3< Dt >::Fixed_alpha_shape_3 | ( | InputIterator | first,
|  | InputIterator | last,
|  | const FT & | alpha = `0`
| ) |  |

builds a fixed alpha shape for the points in the range `[first,last)` and sets the alpha value to `alpha`.

Template Parameters

  InputIterator | must be an input iterator with value type `Point` (the type point of the underlying triangulation.)

## Member Function Documentation

## ◆ get_alpha_shape_cells()

template<typename Dt >
template<class OutputIterator >

OutputIterator CGAL::Fixed_alpha_shape_3< Dt >::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.

## ◆ get_alpha_shape_edges()

template<typename Dt >
template<class OutputIterator >

OutputIterator CGAL::Fixed_alpha_shape_3< Dt >::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.

## ◆ get_alpha_shape_facets()

template<typename Dt >
template<class OutputIterator >

OutputIterator CGAL::Fixed_alpha_shape_3< Dt >::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.

## ◆ get_alpha_shape_vertices()

template<typename Dt >
template<class OutputIterator >

OutputIterator CGAL::Fixed_alpha_shape_3< Dt >::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.

## ◆ insert()

template<typename Dt >

Vertex_handle CGAL::Fixed_alpha_shape_3< Dt >::insert | ( | Point | p,
|  | Cell_handle | start = `Cell_handle()`
| ) |  |

inserts the 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.

## ◆ remove()

template<typename Dt >

void CGAL::Fixed_alpha_shape_3< Dt >::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.

## Friends And Related Function Documentation

## ◆ operator<<()

template<typename Dt >

std::ostream & operator<< | ( | std::ostream & | os,
|  | const Fixed_alpha_shape_3< Dt > & | A
| ) |  |
| related

inserts the fixed alpha shape `A` into the stream `os`.

An overlaoad of `operator<<` must be available for `GT::Point`.