mirror of https://github.com/CGAL/cgal
Update doc of BGL for LCC, following Sebastien comments.
This commit is contained in:
parent
1bb0a3dda3
commit
09f82093a3
|
|
@ -6,7 +6,7 @@ namespace CGAL {
|
||||||
|
|
||||||
\cgalModifBegin
|
\cgalModifBegin
|
||||||
|
|
||||||
The class `Linear_cell_complex_bgl_min_items` defines `void` as the information associated with darts, and the attributes used. In this class, 0- and 2-attributes are enabled and have ids.
|
The class `Linear_cell_complex_bgl_min_items` defines `void` as the information associated with darts, darts have ids and 0- and 2-attributes are enabled and have ids.
|
||||||
|
|
||||||
\cgalModels `LinearCellComplexItems`
|
\cgalModels `LinearCellComplexItems`
|
||||||
|
|
||||||
|
|
@ -21,6 +21,7 @@ struct Linear_cell_complex_bgl_min_items
|
||||||
template <class LCC>
|
template <class LCC>
|
||||||
struct Dart_wrapper
|
struct Dart_wrapper
|
||||||
{
|
{
|
||||||
|
typedef CGAL::Tag_true Darts_with_id;
|
||||||
typedef CGAL::Cell_attribute_with_point_and_id<LCC> Vertex_attrib;
|
typedef CGAL::Cell_attribute_with_point_and_id<LCC> Vertex_attrib;
|
||||||
typedef CGAL::Cell_attribute_with_id<LCC> Face_attrib;
|
typedef CGAL::Cell_attribute_with_id<LCC> Face_attrib;
|
||||||
typedef CGAL::cpp11::tuple<Vertex_attrib, void, Face_attrib> Attributes;
|
typedef CGAL::cpp11::tuple<Vertex_attrib, void, Face_attrib> Attributes;
|
||||||
|
|
@ -29,7 +30,7 @@ struct Linear_cell_complex_bgl_min_items
|
||||||
|
|
||||||
\endcode
|
\endcode
|
||||||
|
|
||||||
\sa `CGAL::Linear_cell_complex_for_generalized_map<d,d2,LCCTraits,Items,Alloc>`
|
\sa `CGAL::Linear_cell_complex_min_item`
|
||||||
|
|
||||||
\cgalModifEnd
|
\cgalModifEnd
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -0,0 +1,32 @@
|
||||||
|
|
||||||
|
namespace CGAL {
|
||||||
|
|
||||||
|
/*!
|
||||||
|
\ingroup PkgBGLHelper
|
||||||
|
|
||||||
|
\cgalModifBegin
|
||||||
|
|
||||||
|
The class `Linear_cell_complex_for_bgl_combinatorial_map_helper` defines a `CGAL::Linear_cell_complex_for_combinatorial_map` as inner type, named `type`, having 'CGAL::Linear_cell_complex_bgl_min_items` as items class. With this item class, no information are associated with darts, darts have ids and 0- and 2-attributes are enabled and have ids.
|
||||||
|
|
||||||
|
\tparam d the dimension of the combinatorial map.
|
||||||
|
\tparam d2 the dimension of the ambient space. Equal to `d` by default.
|
||||||
|
\tparam LCCTraits be a model of the `LinearCellComplexTraits` concept, satisfying \link LinearCellComplexTraits::ambient_dimension `LCCTraits::ambient_dimension`\endlink`==d2`. Equal to `CGAL::Linear_cell_complex_traits<d2>` by default.
|
||||||
|
\tparam Alloc has to match the standard allocator requirements. Equal to `CGAL_ALLOCATOR(int)` by default.
|
||||||
|
|
||||||
|
\sa `CGAL::Linear_cell_complex_bgl_min_item`
|
||||||
|
\sa `CGAL::Linear_cell_complex_for_combinatorial_map<d,d2,Traits,Items,Alloc>`
|
||||||
|
|
||||||
|
\cgalModifEnd
|
||||||
|
|
||||||
|
*/
|
||||||
|
template< typename d, typename d2, typename LCCTraits, typename Alloc >
|
||||||
|
class Linear_cell_complex_for_bgl_combinatorial_map_helper {
|
||||||
|
public:
|
||||||
|
/// Type of the Linear_cell_complex_for_combinatorial_map.
|
||||||
|
typedef CGAL::Linear_cell_complex_for_combinatorial_map
|
||||||
|
<d, d2, LCCTraits, CGAL::Linear_cell_complex_bgl_min_items,
|
||||||
|
Alloc> type;
|
||||||
|
|
||||||
|
}; /* end Linear_cell_complex_for_bgl_combinatorial_map_helper */
|
||||||
|
|
||||||
|
} /* end namespace CGAL */
|
||||||
|
|
@ -114,6 +114,7 @@ user might encounter.
|
||||||
|
|
||||||
- \link BGLSMGT `boost::graph_traits< CGAL::Surface_mesh<P> >` \endlink
|
- \link BGLSMGT `boost::graph_traits< CGAL::Surface_mesh<P> >` \endlink
|
||||||
- \link BGLPolyGT `boost::graph_traits< CGAL::Polyhedron_3<T> >` \endlink
|
- \link BGLPolyGT `boost::graph_traits< CGAL::Polyhedron_3<T> >` \endlink
|
||||||
|
- \link BGLLCCGT `boost::graph_traits< CGAL::Linear_cell_complex_for_combinatorial_map<...> >` \endlink
|
||||||
- \link BGLT2GT `boost::graph_traits< CGAL::Triangulation_2<GT, TDS> >` \endlink
|
- \link BGLT2GT `boost::graph_traits< CGAL::Triangulation_2<GT, TDS> >` \endlink
|
||||||
- \link BGLArgtGT `boost::graph_traits< CGAL::Arrangement_2<T,DC> >` \endlink
|
- \link BGLArgtGT `boost::graph_traits< CGAL::Arrangement_2<T,DC> >` \endlink
|
||||||
- \link BGLOMPAK `boost::graph_traits<OpenMesh::PolyMesh_ArrayKernelT<K> >` \endlink
|
- \link BGLOMPAK `boost::graph_traits<OpenMesh::PolyMesh_ArrayKernelT<K> >` \endlink
|
||||||
|
|
@ -131,6 +132,8 @@ user might encounter.
|
||||||
- `CGAL::Dual`
|
- `CGAL::Dual`
|
||||||
- `CGAL::Graph_with_descriptor_with_graph`
|
- `CGAL::Graph_with_descriptor_with_graph`
|
||||||
- `CGAL::Graph_with_descriptor_with_graph_property_map`
|
- `CGAL::Graph_with_descriptor_with_graph_property_map`
|
||||||
|
- `CGAL::Linear_cell_complex_bgl_min_items`
|
||||||
|
- `CGAL::Linear_cell_complex_for_bgl_combinatorial_map_helper`
|
||||||
|
|
||||||
## Helper Functions ##
|
## Helper Functions ##
|
||||||
- `CGAL::is_border()`
|
- `CGAL::is_border()`
|
||||||
|
|
|
||||||
|
|
@ -16,3 +16,5 @@ Property_map
|
||||||
Nef_3
|
Nef_3
|
||||||
Miscellany
|
Miscellany
|
||||||
Polygon_mesh_processing
|
Polygon_mesh_processing
|
||||||
|
Combinatorial_map
|
||||||
|
Linear_cell_complex
|
||||||
|
|
@ -86,7 +86,7 @@ that is the default hash functor of `CGAL::Unique_hash_map`.
|
||||||
|
|
||||||
\cgalModifBegin
|
\cgalModifBegin
|
||||||
|
|
||||||
\section BGLLCCGT Specialization for the Linear Cell Complex Class
|
\section BGLLCCGT Specialization for the Linear_cell_complex_for_combinatorial_map Class
|
||||||
|
|
||||||
Defined in `<CGAL/boost/graph/graph_traits_Linear_cell_complex_for_combinatorial_map.h>`
|
Defined in `<CGAL/boost/graph/graph_traits_Linear_cell_complex_for_combinatorial_map.h>`
|
||||||
|
|
||||||
|
|
@ -125,19 +125,23 @@ For convenience, the type `edge_descriptor` is hashable using the functor `CGAL:
|
||||||
\subsection Requirements
|
\subsection Requirements
|
||||||
|
|
||||||
<ul>
|
<ul>
|
||||||
<li> The item class used by`CGAL::Linear_cell_complex_for_combinatorial_map` must have both 0-attributes and 2-attributes enabled; moreover the corresponding type of attributes must store an id and must define the two fonctions:
|
<li> The item class used by `CGAL::Linear_cell_complex_for_combinatorial_map` must have both 0-attributes and 2-attributes enabled.</li>
|
||||||
\code
|
|
||||||
int id() const; // Returns the index.
|
|
||||||
int& id(); // Returns a reference to the index stored in the attribute.
|
|
||||||
\endcode
|
|
||||||
</li>
|
|
||||||
|
|
||||||
<li> No dart is 1-free, nor 2-free. Holes in a mesh are represented by using the same convention than for `CGAL::Polyhedron_3` and `CGAL::Surface_mesh`: a dart <code>d</code> belongs to a border if the 2-attribute of <code>beta<2>(d)</code> is NULL.</li>
|
<li> No dart is 1-free, nor 2-free. Holes in a mesh are represented by using the same convention than for `CGAL::Polyhedron_3` and `CGAL::Surface_mesh`: a dart <code>d</code> belongs to a border if the 2-attribute of <code>beta<2>(d)</code> is NULL.</li>
|
||||||
|
|
||||||
<li> All darts of the linear cell complexes must be associated with a 2-attribute, except darts that represent holes.</li>
|
<li> All darts of the linear cell complexes must be associated with a 2-attribute, except darts that represent holes.</li>
|
||||||
|
|
||||||
|
<li> In order to use property maps, darts and types associated with of 0- and 2-attributes must define the two fonctions:
|
||||||
|
\code
|
||||||
|
int id() const; // Returns the index.
|
||||||
|
int& id(); // Returns a reference to the index stored in the attribute.
|
||||||
|
\endcode
|
||||||
</ul>
|
</ul>
|
||||||
|
|
||||||
Note that it is possible to use `CGAL::Cell_attribute_with_id` and `CGAL::Cell_attribute_with_point_and_id` classes to define your item class using attributes with id. Note also that there is a template alias, `CGAL::Linear_cell_complex_for_bgl_combinatorial_map` that defines the default template parameter for the item class that satisfies all the constraints given above.
|
For darts, this can is done by defining `Darts_with_id` as `CGAL::Tag_true` in the `Dart_wrapper` struct of the item class. <br>
|
||||||
|
For attributes, it is possible to use `CGAL::Cell_attribute_with_id` and `CGAL::Cell_attribute_with_point_and_id` classes to define your item class using attributes with id.
|
||||||
|
|
||||||
|
You can also use the `CGAL::Linear_cell_complex_bgl_min_items` item class, or you can use directly the `CGAL::Linear_cell_complex_for_bgl_combinatorial_map_helper` class.
|
||||||
|
|
||||||
\cgalModifEnd
|
\cgalModifEnd
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue