CGAL 5.6 - Linear Cell Complex
|
The concept LinearCellComplex
represents a linear cell complex in dimension d
, in an ambient space of dimension d2
. This is a model of the concept of GenericMap
adding a requirement to ensure that each vertex of the map is associated with a model of CellAttributeWithPoint
.
GenericMap
Creation | |
LinearCellComplex () | |
Default constructor creating an empty linear cell complex. | |
Constants | |
static unsigned int | ambient_dimension |
Ambient dimension, must be > 1. | |
Types | |
typedef Traits::FT | FT |
typedef Traits::Point | Point |
typedef Traits::Vector | Vector |
typedef unspecified_type | Vertex_attribute |
Type of 0-attributes, a model of CellAttributeWithPoint concept (a shortcut for Attribute_type<0>::type ). | |
typedef unspecified_type | Vertex_attribute_descriptor |
Descriptor through 0-attributes (a shortcut for Attribute_descriptor<0>::type ). | |
typedef unspecified_type | Vertex_attribute_const_descriptor |
Const descriptor through 0-attributes (a shortcut for Attribute_const_descriptor<0>::type ). | |
typedef unspecified_type | Vertex_attribute_range |
Range of all the 0-attributes, a model of the Range concept (a shortcut for Attribute_range<0>::type ). More... | |
typedef unspecified_type | Vertex_attribute_const_range |
Const range of all the 0-attributes, a model of the ConstRange concept a shortcut for Attribute_const_range<0>::type ). More... | |
Range Access Member Functions | |
Vertex_attribute_range & | vertex_attributes () |
Returns a range of all the 0-attributes in this linear cell complex (a shortcut for attributes<0>() ). | |
Vertex_attribute_const_range & | vertex_attributes () const |
Returns a const range of all the 0-attributes in this linear cell complex (a shortcut for attributes<0>() const ). | |
Access Member Functions | |
bool | is_valid () const |
Returns true iff this linear cell complex is valid. More... | |
size_type | number_of_vertex_attributes () const |
Returns the number of 0-attributes in this linear cell complex (a shortcut for number_of_attributes<0>() ). | |
Vertex_attribute_descriptor | vertex_attribute (Dart_descriptor d) |
Returns the 0-attribute associated with d . | |
Vertex_attribute_const_descriptor | vertex_attribute (Dart_const_descriptor d) |
Returns the 0-attribute associated with d , when d is const. | |
Point & | point_of_vertex_attribute (Vertex_attribute_descriptor v) |
Returns the point in the 0-attribute v . | |
const Point & | point_of_vertex_attribute (Vertex_attribute_const_descriptor v) const |
Returns the point in the 0-attribute v , when v is const. | |
Point & | point (Dart_descriptor d) |
Returns the point in the 0-attribute associated with d . | |
const Point & | point (Dart_const_descriptor d) const |
Returns the point in the 0-attribute associated with d , when d is const. | |
Modifiers | |
Dart_descriptor | create_dart (Vertex_attribute_descriptor v) |
Creates a new dart in this linear cell complex, sets its associated 0-attribute to v and returns the corresponding descriptor. More... | |
Dart_descriptor | create_dart (const Point &apoint) |
Creates a new dart in this linear cell complex, 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 descriptor. | |
template<typename T1 > | |
Vertex_attribute_descriptor | create_vertex_attribute (T1 t1) |
Creates a new 0-attribute in this linear cell complex, and returns the corresponding descriptor (a shortcut for create_attribute<0>(t1) ). More... | |
void | erase_vertex_attribute (Vertex_attribute_descriptor v) |
Removes the 0-attribute pointed to by v from this linear cell complex (a shortcut for erase_attribute<0>(v) ). More... | |
void | set_vertex_attribute (Dart_descriptor d, Vertex_attribute_descriptor v) |
Associates the 0-attribute of all the darts of the 0-cell containing d to v (a shortcut for set_attribute<0>(d,v) ). More... | |
Attributes management | |
void | correct_invalid_attributes () |
Correct the invalid attributes of the linear cell complex. More... | |
Operations | |
template<unsigned int i> | |
Point | barycenter (Dart_const_descriptor d) const |
Returns the barycenter of the i-cell containing d . More... | |
template<unsigned int i> | |
Dart_descriptor | insert_point_in_cell (Dart_descriptor d, Point p) |
Inserts a point, copy of p , in the i-cell containing d . More... | |
template<unsigned int i> | |
Dart_descriptor | insert_barycenter_in_cell (Dart_descriptor d) |
Inserts a point in the barycenter of the i-cell containing d . More... | |
Dart_descriptor | insert_dangling_cell_1_in_cell_2 (Dart_descriptor d, Point p) |
Inserts a 1-cell in the 2-cell containing d , the 1-cell being attached only by one of its vertex to the 0-cell containing d . More... | |
Constructions | |
Dart_descriptor | make_segment (const Point &p0, const Point &p1) |
Creates an isolated segment in this linear cell complex (two darts linked by \( \beta_2\)) having p0 , p1 as points. More... | |
Dart_descriptor | make_triangle (const Point &p0, const Point &p1, const Point &p2) |
Creates an isolated triangle in this linear cell complex having p0 , p1 , p2 as points. More... | |
Dart_descriptor | make_quadrangle (const Point &p0, const Point &p1, const Point &p2, const Point &p3) |
Creates an isolated quadrangle in this linear cell complex having p0 , p1 , p2 , p3 as points. More... | |
Dart_descriptor | make_tetrahedron (const Point &p0, const Point &p1, const Point &p2, const Point &p3) |
Creates an isolated tetrahedron in this linear cell complex having p0 , p1 ,p2 ,p3 as points. More... | |
Dart_descriptor | make_hexahedron (const Point &p0, const Point &p1, const Point &p2, const Point &p3, const Point &p4, const Point &p5, const Point &p6, const Point &p7) |
Creates an isolated hexahedron in this linear cell complex having p0 , p1 , p2 , p3 , p4 , p5 , p6 , p7 as points. More... | |
Const range of all the 0-attributes, a model of the ConstRange
concept a shortcut for Attribute_const_range<0>::type
).
Iterator inner type is bidirectional iterator and value type is Vertex_attribute
.
Range of all the 0-attributes, a model of the Range
concept (a shortcut for Attribute_range<0>::type
).
Iterator inner type is bidirectional iterator and value type is Vertex_attribute
.
Point LinearCellComplex::barycenter | ( | Dart_const_descriptor | d | ) | const |
void LinearCellComplex::correct_invalid_attributes | ( | ) |
Correct the invalid attributes of the linear cell complex.
We can have invalid attribute either if we have called set_automatic_attributes_management(false)
before to use some modification operations or if we have modified the combinatorial map by using low level operations.
The validation process of a linear cell complex validates its generic map (cf. correct_invalid_attributes()
), and for each dart d
having no vertex attribute, a new vertex attribute is created, with its Point initialized to CGAL::Origin
, and all the darts of the 0-cell containing d
are linked with the new attribute.
Dart_descriptor LinearCellComplex::create_dart | ( | Vertex_attribute_descriptor | v | ) |
Creates a new dart in this linear cell complex, sets its associated 0-attribute to v
and returns the corresponding descriptor.
v
\( \in \) vertex_attributes()
. Vertex_attribute_descriptor LinearCellComplex::create_vertex_attribute | ( | T1 | t1 | ) |
Creates a new 0-attribute in this linear cell complex, and returns the corresponding descriptor (a shortcut for create_attribute<0>(t1)
).
Calls the constructor of Vertex_attribute
having T1
as parameter. Overloads of this member function are defined that take from zero to nine arguments. With zero argument, create_vertex_attribute()
creates a new 0-attribute by using the default constructor.
void LinearCellComplex::erase_vertex_attribute | ( | Vertex_attribute_descriptor | v | ) |
Removes the 0-attribute pointed to by v
from this linear cell complex (a shortcut for erase_attribute<0>(v)
).
v
\( \in \) vertex_attributes()
. Dart_descriptor LinearCellComplex::insert_barycenter_in_cell | ( | Dart_descriptor | d | ) |
Inserts a point in the barycenter of the i-cell containing d
.
Returns a descriptor on one dart of this cell.
If are_attributes_automatically_managed()
==true
, if i-attributes are non void, Attribute_type<i>::type::On_split
(a,a') is called, with a the original i-attribute associated with d and a' each new i-attribute created during the operation.
If are_attributes_automatically_managed()
==false
, non void attributes are not updated; thus the combinatorial map can be no more valid after this operation.
Dart_descriptor LinearCellComplex::insert_dangling_cell_1_in_cell_2 | ( | Dart_descriptor | d, |
Point | p | ||
) |
Inserts a 1-cell in the 2-cell containing d
, the 1-cell being attached only by one of its vertex to the 0-cell containing d
.
The second vertex is associated with a new 0-attribute containing a copy of p
as point. Returns a descriptor on one dart belonging to the new 0-cell.
If are_attributes_automatically_managed()
==false
, non void attributes are not updated; thus the combinatorial map can be no more valid after this operation.
Dart_descriptor LinearCellComplex::insert_point_in_cell | ( | Dart_descriptor | d, |
Point | p | ||
) |
Inserts a point, copy of p
, in the i-cell containing d
.
Returns a descriptor on one dart of this cell.
If are_attributes_automatically_managed()
==true
, if i-attributes are non void, Attribute_type<i>::type::On_split
(a,a') is called, with a the original i-attribute associated with d and a' each new i-attribute created during the operation.
If are_attributes_automatically_managed()
==false
, non void attributes are not updated; thus the combinatorial map can be no more valid after this operation.
bool LinearCellComplex::is_valid | ( | ) | const |
Returns true iff this linear cell complex is valid.
A linear cell complex lcc
is valid if it is a valid generic map (cf. GenericMap::is_valid()
), and if for each dart descriptor d such that d
\( \in \) darts()
: vertex_attribute(d)
!=null_descriptor
.
Dart_descriptor LinearCellComplex::make_hexahedron | ( | const Point & | p0, |
const Point & | p1, | ||
const Point & | p2, | ||
const Point & | p3, | ||
const Point & | p4, | ||
const Point & | p5, | ||
const Point & | p6, | ||
const Point & | p7 | ||
) |
Creates an isolated hexahedron in this linear cell complex having p0
, p1
, p2
, p3
, p4
, p5
, p6
, p7
as points.
Returns a descriptor on the dart associated with p0
, with edge [p0
,p5
] and belonging to the 2-cell having p0
, p5
, p6
, p1
as points.
dimension
\( \geq \) 2.Dart_descriptor LinearCellComplex::make_quadrangle | ( | const Point & | p0, |
const Point & | p1, | ||
const Point & | p2, | ||
const Point & | p3 | ||
) |
Creates an isolated quadrangle in this linear cell complex having p0
, p1
, p2
, p3
as points.
Returns a descriptor on the dart associated with p0
and with edge [p0
,p1
].
dimension
\( \geq\) 1.Creates an isolated segment in this linear cell complex (two darts linked by \( \beta_2\)) having p0
, p1
as points.
Returns a descriptor on the dart associated with p0
.
dimension
\( \geq\) 2.Dart_descriptor LinearCellComplex::make_tetrahedron | ( | const Point & | p0, |
const Point & | p1, | ||
const Point & | p2, | ||
const Point & | p3 | ||
) |
Creates an isolated tetrahedron in this linear cell complex having p0
, p1
,p2
,p3
as points.
Returns a descriptor on the dart associated with p0
, with edge [p0
,p1
] and belonging to the 2-cell having p0
, p1
, p2
as points.
dimension
\( \geq\) 2.Dart_descriptor LinearCellComplex::make_triangle | ( | const Point & | p0, |
const Point & | p1, | ||
const Point & | p2 | ||
) |
Creates an isolated triangle in this linear cell complex having p0
, p1
, p2
as points.
Returns a descriptor on the dart associated with p0
and with edge [p0
,p1
].
dimension
\( \geq\) 1.void LinearCellComplex::set_vertex_attribute | ( | Dart_descriptor | d, |
Vertex_attribute_descriptor | v | ||
) |
Associates the 0-attribute of all the darts of the 0-cell containing d
to v
(a shortcut for set_attribute<0>(d,v)
).
d
\( \in \) darts()
and v
\( \in \) vertex_attributes()
.