mirror of https://github.com/CGAL/cgal
Add _3 suffix and add example to the User Manual
This commit is contained in:
parent
5270bbfdc7
commit
5797ddb48c
|
|
@ -4,14 +4,14 @@ namespace CGAL {
|
|||
/*!
|
||||
\ingroup PkgLinearCellComplexClasses
|
||||
|
||||
The auxiliary class `Linear_cell_complex_incremental_builder` supports the incremental
|
||||
The auxiliary class `Linear_cell_complex_incremental_builder_3` supports the incremental
|
||||
construction of linear cell complexes.
|
||||
|
||||
\tparam LCC a linear cell complex
|
||||
*/
|
||||
|
||||
template < class LCC >
|
||||
class Linear_cell_complex_incremental_builder
|
||||
class Linear_cell_complex_incremental_builder_3
|
||||
{
|
||||
public:
|
||||
typedef LCC_ LCC;
|
||||
|
|
@ -26,7 +26,7 @@ class Linear_cell_complex_incremental_builder
|
|||
/*!
|
||||
* Constructor
|
||||
*/
|
||||
Linear_cell_complex_incremental_builder(LCC & alcc);
|
||||
Linear_cell_complex_incremental_builder_3(LCC & alcc);
|
||||
|
||||
/// @}
|
||||
|
||||
|
|
@ -141,6 +141,14 @@ Some examples of use of these operations are given in Section \ref ssec5dexample
|
|||
If \link GenericMap::set_automatic_attributes_management `set_automatic_attributes_management(false)`\endlink is called, all the future insertion or removal operations will not update non void attributes. These attributes will be updated latter by the call to \link GenericMap::set_automatic_attributes_management `set_automatic_attributes_management(true)`\endlink. This can be useful to speed up an algorithm which uses several successive insertion and removal operations. See example \ref ssecAttributesManagement "Automatic attributes management".
|
||||
\cgalAdvancedEnd
|
||||
|
||||
|
||||
\subsection Linear_cell_complexIncrementalBuilder Incremental Builder
|
||||
|
||||
A utility class `Linear_cell_complex_incremental_builder_3` helps in creating 2D and 3D linear cell complexes
|
||||
from a list of points followed by a list of facets that are represented as indices into the point list.
|
||||
Note that, compared to `Polyhedron_incremental_builder_3` it has only absolute indexing and no rollback
|
||||
mechanism.
|
||||
|
||||
\section Linear_cell_complexExamples Examples
|
||||
|
||||
\subsection Linear_cell_complexA3DLinearCellComplex A 3D Linear Cell Complex
|
||||
|
|
@ -264,10 +272,16 @@ Linking with the cmake target `CGAL::CGAL_Basic_viewer` will link with `CGAL_Qt5
|
|||
Result of the run of the draw_linear_cell_complex program. A window shows two 3D cubes and allows to navigate through the 3D scene.
|
||||
\cgalFigureEnd
|
||||
|
||||
\subsection Linear_cell_complexIncrementalBuilderExample Incremental Builder
|
||||
|
||||
The following example shows the incremental builder
|
||||
|
||||
\cgalExample{Linear_cell_complex/linear_cell_complex_3_incremental_builder.cpp}
|
||||
|
||||
|
||||
\section Linear_cell_complexDesign Design and Implementation History
|
||||
|
||||
This package was developed by Guillaume Damiand, with the help of Andreas Fabri, Sébastien Loriot and Laurent Rineau. Monique Teillaud and Bernd Gärtner contributed to the manual.
|
||||
|
||||
*/
|
||||
} /* namespace CGAL */
|
||||
|
||||
|
|
|
|||
|
|
@ -62,7 +62,7 @@
|
|||
- `CGAL::Linear_cell_complex_traits<d,K>`
|
||||
- `CGAL::Cell_attribute_with_point<LCC,Info_,Tag,OnMerge,OnSplit>`
|
||||
- `CGAL::Cell_attribute_with_point_and_id<LCC,Info_,Tag,OnMerge,OnSplit>`
|
||||
- `CGAL::Linear_cell_complex_incremental_builder<LCC>`
|
||||
- `CGAL::Linear_cell_complex_incremental_builder_3<LCC>`
|
||||
|
||||
\cgalCRPSection{Global Functions}
|
||||
\cgalCRPSubsection{Constructions for Linear Cell Complex}
|
||||
|
|
|
|||
|
|
@ -1,5 +1,5 @@
|
|||
#include <CGAL/Linear_cell_complex_for_combinatorial_map.h>
|
||||
#include <CGAL/Linear_cell_complex_incremental_builder.h>
|
||||
#include <CGAL/Linear_cell_complex_incremental_builder_3.h>
|
||||
#include <CGAL/draw_linear_cell_complex.h>
|
||||
|
||||
typedef CGAL::Linear_cell_complex_for_combinatorial_map<3, 3> LCC_3;
|
||||
|
|
|
|||
|
|
@ -9,8 +9,8 @@
|
|||
//
|
||||
// Author(s) : Guillaume Damiand <guillaume.damiand@liris.cnrs.fr>
|
||||
//
|
||||
#ifndef CGAL_LINEAR_CELL_COMPLEX_INCREMENTAL_BUILDER_H
|
||||
#define CGAL_LINEAR_CELL_COMPLEX_INCREMENTAL_BUILDER_H 1
|
||||
#ifndef CGAL_LINEAR_CELL_COMPLEX_INCREMENTAL_BUILDER_3_H
|
||||
#define CGAL_LINEAR_CELL_COMPLEX_INCREMENTAL_BUILDER_3_H 1
|
||||
|
||||
#include <vector>
|
||||
#include <cstddef>
|
||||
|
|
@ -127,7 +127,7 @@ struct Find_opposite_2_with_control<LCC, CGAL::Combinatorial_map_tag>
|
|||
{
|
||||
if (!lcc.template is_free<2>(res))
|
||||
{ // Here a dart vah1->vah2 already exists, and it was already 2-sewn.
|
||||
std::cerr<<"ERROR in My_linear_cell_complex_incremental_builder_3: try to use a same oriented edge twice."<<std::endl;
|
||||
std::cerr<<"ERROR in Linear_cell_complex_incremental_builder_3: try to use a same oriented edge twice."<<std::endl;
|
||||
return lcc.null_descriptor;
|
||||
}
|
||||
}
|
||||
|
|
@ -135,7 +135,7 @@ struct Find_opposite_2_with_control<LCC, CGAL::Combinatorial_map_tag>
|
|||
vertex_to_dart_map_in_surface,
|
||||
vah2, vah1)!=lcc.null_descriptor)
|
||||
{ // Here a dart vah1->vah2 already exists (but it was not already 2-sewn).
|
||||
std::cerr<<"ERROR in My_linear_cell_complex_incremental_builder_3: try to use a same oriented edge twice."<<std::endl;
|
||||
std::cerr<<"ERROR in Linear_cell_complex_incremental_builder_3: try to use a same oriented edge twice."<<std::endl;
|
||||
return lcc.null_descriptor;
|
||||
}
|
||||
|
||||
|
|
@ -159,7 +159,7 @@ struct Find_opposite_2_with_control<LCC, CGAL::Generalized_map_tag>
|
|||
{
|
||||
if (!lcc.template is_free<2>(res))
|
||||
{ // Here a dart vah1->vah2 already exists, and it was already 2-sewn.
|
||||
std::cerr<<"ERROR in My_linear_cell_complex_incremental_builder_3: try to use a same oriented edge twice."<<std::endl;
|
||||
std::cerr<<"ERROR in Linear_cell_complex_incremental_builder_3: try to use a same oriented edge twice."<<std::endl;
|
||||
return lcc.null_descriptor;
|
||||
}
|
||||
}
|
||||
|
|
@ -209,7 +209,7 @@ struct Add_edge_in_associative_array<LCC, CGAL::Generalized_map_tag>
|
|||
};
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
template<class LCC_, unsigned int dim=LCC_::dimension>
|
||||
struct Sew3_for_LCC_incremental_builder
|
||||
struct Sew3_for_LCC_incremental_builder_3
|
||||
{
|
||||
static void run(LCC_& lcc,
|
||||
typename LCC_::Dart_descriptor dh1, typename LCC_::Dart_descriptor dh2)
|
||||
|
|
@ -218,8 +218,8 @@ struct Sew3_for_LCC_incremental_builder
|
|||
{
|
||||
if(!lcc.template is_free<3>(dh1))
|
||||
{
|
||||
std::cerr<<"ERROR in My_linear_cell_complex_incremental_builder_3: "
|
||||
<<"it exists more than 2 faces with same indices."<<std::endl;
|
||||
std::cerr<<"ERROR in Linear_cell_complex_incremental_builder_3: "
|
||||
<<"it exist more than 2 faces with same indices."<<std::endl;
|
||||
}
|
||||
else
|
||||
{ lcc.template sew<3>(lcc.other_orientation(dh1), dh2); }
|
||||
|
|
@ -227,7 +227,7 @@ struct Sew3_for_LCC_incremental_builder
|
|||
}
|
||||
};
|
||||
template<class LCC_>
|
||||
struct Sew3_for_LCC_incremental_builder<LCC_, 2>
|
||||
struct Sew3_for_LCC_incremental_builder_3<LCC_, 2>
|
||||
{
|
||||
static void run(LCC_&, typename LCC_::Dart_descriptor, typename LCC_::Dart_descriptor)
|
||||
{}
|
||||
|
|
@ -319,7 +319,7 @@ public:
|
|||
if(LCC::dimension>2)
|
||||
{
|
||||
opposite=opposite_face();
|
||||
Sew3_for_LCC_incremental_builder<LCC>::run(lcc, opposite, min_dart);
|
||||
Sew3_for_LCC_incremental_builder_3<LCC>::run(lcc, opposite, min_dart);
|
||||
add_face_in_array();
|
||||
}
|
||||
return first_dart;
|
||||
|
|
@ -404,5 +404,5 @@ private:
|
|||
|
||||
} //namespace CGAL
|
||||
|
||||
#endif // CGAL_LINEAR_CELL_COMPLEX_INCREMENTAL_BUILDER_H //
|
||||
#endif // CGAL_LINEAR_CELL_COMPLEX_INCREMENTAL_BUILDER_3_H //
|
||||
// EOF //
|
||||
Loading…
Reference in New Issue