Class

CGAL::Linear_cell_complex<d,d2,LCCTraits,CMItems,Alloc>

#include <CGAL/Linear_cell_complex.h>

Definition

The class Linear_cell_complex<d,d2,LCCTraits,CMItems,Alloc> represents a linear cell complex in dimension d, in an ambient space of dimension d2. This is a model of the concept of CombinatorialMap adding a requirement to ensure that each vertex of the map is associated with a model of CellAttributeWithPoint.

Is Model for the Concepts

CombinatorialMap

Inherits From

CGAL::Combinatorial_map<d,CMItems,Alloc>

Parameters

d an integer for the dimension of the combinatorial map,
d2 an integer for the dimension of the ambient space,
LCCTraits must be a model of the LinearCellComplexTraits concept, satisfying LCCTraits::ambiant_dimension==d2,
CMItems must be a model of the CombinatorialMapItems concept,
Alloc has to match the standard allocator requirements.

There are four default template arguments: d2 is equal to d, LCCTraits is equal to CGAL::Linear_cell_complex_traits<d2>, CMItems is equal to CGAL::Linear_cell_complex_min_items<d> and Alloc is CGAL_ALLOCATOR(int).

Note that there is an additional, and undocumented, template parameter CMap for Linear_cell_complex<d,d2,LCCTraits,CMItems,Alloc,CMap> allowing to inherit from any model of the CombinatorialMap concept.

Creation

Linear_cell_complex<d,d2,LCCTraits,CMItems,Alloc> lcc;

Constants

static unsigned int ambient_dimension = d2; must be >1.

Types

typedef Linear_cell_complex<d,d2,LCCTraits,CMItems,Alloc>
Self;
typedef CMItems::Dart_wrapper<Self>::Dart
Dart; The type of dart, must satisfy Dart::dimension==d.

typedef LCCTraits Traits;
typedef CMItems Items;
typedef Alloc Alloc;

typedef Traits::FT FT;
typedef Traits::Point Point;
typedef Traits::Vector Vector;

Linear_cell_complex<d,d2,LCCTraits,CMItems,Alloc>::Vertex_attribute
Type of 0-attributes, a model of CellAttributeWithPoint concept (a shortcut for Attribute_type_d<0>::type).

Linear_cell_complex<d,d2,LCCTraits,CMItems,Alloc>::Vertex_attribute_handle
Handle through 0-attributes (a shortcut for Attribute_handle_type_d<0>::type).

Linear_cell_complex<d,d2,LCCTraits,CMItems,Alloc>::Vertex_attribute_const_handle
Const handle through 0-attributes (a shortcut for Attribute_const_handle_type_d<0>::type).

Linear_cell_complex<d,d2,LCCTraits,CMItems,Alloc>::Vertex_attribute_range
Range of all the 0-attributes, a model of the Range concept (a shortcut for Attribute_range_d<0>::type). Iterator inner type is bidirectional iterator and value type is Vertex_attribute.

Linear_cell_complex<d,d2,LCCTraits,CMItems,Alloc>::Vertex_attribute_const_range
Const range of all the 0-attributes, a model of the ConstRange concept a shortcut for Attribute_const_range_d<0>::type). Iterator inner type is bidirectional iterator and value type is Vertex_attribute.

Range Access Member Functions

Vertex_attribute_range& lcc.vertex_attributes () Returns a range of all the 0-attributes in lcc (a shortcut for attributes<0>()).

Vertex_attribute_const_range& lcc.vertex_attributes () const Returns a const range of all the 0-attributes in lcc (a shortcut for attributes<0>() const).

Access Member Functions

bool lcc.is_valid () const Returns true iff lcc is valid.
A linear cell complex lcc is valid if it is a valid combinatorial map, and if for each dart handle dh such that *dhlcc.darts(): dh->attribute<0>()!=NULL.

size_type lcc.number_of_vertex_attributes () const
Returns the number of 0-attributes in lcc (a shortcut for number_of_attributes<0>()).

Static Member Functions

static Vertex_attribute_handle vertex_attribute ( Dart_handle dh)
Returns the 0-attribute associated with dh.

static Vertex_attribute_const_handle
vertex_attribute ( Dart_const_handle dh)
Returns the 0-attribute associated with dh, when dh is const.

static Point& point ( Dart_handle dh) Returns the point in the 0-attribute associated with dh.

static Point point ( Dart_const_handle dh) Returns the point in the 0-attribute associated with dh, when dh is const.

Modifiers

Dart_handle lcc.create_dart ( Vertex_attribute_handle vh)
Creates a new dart in lcc, sets its associated 0-attribute to vh and returns the corresponding handle.
Precondition: *vhlcc.vertex_attributes().

Dart_handle lcc.create_dart ( Point apoint) Creates a new dart in lcc, creates a new 0-attribute initialized with apoint, sets the associated 0-attribute of the new dart to this new 0-attribute, and returns the corresponding handle.

Vertex_attribute_handle lcc.create_vertex_attribute () Creates a new 0-attribute in lcc, and returns the corresponding handle (a shortcut for create_attribute<0>()).

Vertex_attribute_handle lcc.create_vertex_attribute ( Point apoint)
Creates a new 0-attribute in lcc initialized with apoint, and returns the corresponding handle.

void lcc.erase_vertex_attribute ( Vertex_attribute_handle vh)
Removes the 0-attribute pointed to by vh from lcc (a shortcut for erase_attribute<0>(vh)).
Precondition: *vhlcc.vertex_attributes().

void lcc.set_vertex_attribute ( Dart_handle dh, Vertex_attribute_handle vh)
Associates the 0-attribute of all the darts of the 0-cell containing dh to vh (a shortcut for set_attribute<0>(dh,vh)).
Precondition: *dhlcc.darts() and *vhlcc.vertex_attributes().

Operations

template<unsigned int i>
Point lcc.barycenter ( Dart_const_handle dh) const
Returns the barycenter of the i-cell containing dh.
Precondition: 1≤idimension and *dhlcc.darts().

template <unsigned int i>
Dart_handle lcc.insert_point_in_cell ( Dart_handle dh, Point p)
Inserts a point, copy of p, in the i-cell containing dh. Returns a handle on one dart of this cell.
Precondition: 1≤dimension≤2 and *dhlcc.darts().
If i-attributes are non void, Attribute_type<i>::type::On_split(a,a') is called, with a the original i-attribute associated with dh and a' each new i-attribute created during the operation.

template <unsigned int i>
Dart_handle lcc.insert_barycenter_in_cell ( Dart_handle dh)
Inserts a point in the barycenter of the i-cell containing dh. Returns a handle on one dart of this cell.
Precondition: 1≤dimension≤2 and *dhlcc.darts().
If i-attributes are non void, Attribute_type<i>::type::On_split(a,a') is called, with a the original i-attribute associated with dh and a' each new i-attribute created during the operation.

Dart_handle lcc.insert_dangling_cell_1_in_cell_2 ( Dart_handle dh, Point p)
Inserts a 1-cell in the 2-cell containing dh, the 1-cell being attached only by one of its vertex to the 0-cell containing dh. The second vertex is associated with a new 0-attribute containing a copy of p as point. Returns a handle on one dart belonging to the new 0-cell.
Precondition: dimension≥2 and *dhlcc.darts().

Constructions

Dart_handle lcc.make_segment ( Point p0, Point p1)
Creates an isolated segment in lcc (two darts linked by β2) having p0, p1 as points. Returns a handle on the dart associated with p0.
Precondition: dimension≥2.
Example of r=lcc.make_segment(p0,p1).

Dart_handle lcc.make_triangle ( Point p0, Point p1, Point p2)
Creates an isolated triangle in lcc having p0, p1, p2 as points. Returns a handle on the dart associated with p0.
Precondition: dimension≥1.
Example of r=lcc.make_triangle(p0,p1,p2).

Dart_handle lcc.make_quadrangle ( Point p0, Point p1, Point p2, Point p3)
Creates an isolated quadrangle in lcc having p0, p1, p2, p3 as points. Returns a handle on the dart associated with p0.
Precondition: dimension≥1.
Example of r=lcc.make_quadrangle(p0,p1,p2,p3).

Dart_handle lcc.make_tetrahedron ( Point p0, Point p1, Point p2, Point p3)
Creates an isolated tetrahedron in lcc having p0, p1,p2,p3 as points. Returns a handle on the dart associated with p0 and belonging to the 2-cell having p0, p1, p2 as points.
Precondition: dimension≥2.
Example of r=lcc.make_tetrahedron(p0,p1,p2,p3).

Dart_handle make_hexahedron ( Point p0, Point p1, Point p2, Point p3, Point p4, Point p5, Point p6, Point p7)
Creates an isolated hexahedron in lcc having p0, p1, p2, p3, p4, p5, p6, p7 as points. Returns a handle on the dart associated with p0 and belonging to the 2-cell having p0, p5, p6, p1 as points.
Precondition: dimension≥2.
Example of r=lcc.make_hexahedron(p0,p1,p2,p3,p4,p5,p6,p7).

See Also

CombinatorialMap
CGAL::Combinatorial_map<d,CMItems,Alloc>
Dart
LinearCellComplexItems
CGAL::Linear_cell_complex_min_items<d>
LinearCellComplexTraits
CGAL::Linear_cell_complex_traits<d,K>