mirror of https://github.com/CGAL/cgal
[Small Feature] Rename plane_graph_to_lcc -> read_plane_graph_in_lcc
This commit is contained in:
parent
e170d7b0de
commit
afc4f72b26
|
|
@ -28,15 +28,15 @@ Here a small example:
|
||||||
\sa `CGAL::polyhedron_3_to_lcc<LCC,Polyhedron>`
|
\sa `CGAL::polyhedron_3_to_lcc<LCC,Polyhedron>`
|
||||||
*/
|
*/
|
||||||
template<class LCC>
|
template<class LCC>
|
||||||
typename LCC::Dart_descriptor plane_graph_to_lcc(LCC& lcc,
|
typename LCC::Dart_descriptor read_plane_graph_in_lcc(LCC& lcc,
|
||||||
std::istream& ais);
|
std::istream& ais);
|
||||||
|
|
||||||
/*!
|
/*!
|
||||||
\ingroup PkgLinearCellComplexConstructions
|
\ingroup PkgLinearCellComplexConstructions
|
||||||
\deprecated Use `plane_graph_to_lcc()` instead.
|
\deprecated Use `read_plane_graph_in_lcc()` instead.
|
||||||
*/
|
*/
|
||||||
template<class LCC>
|
template<class LCC>
|
||||||
[[deprecated("Use plane_graph_to_lcc instead")]]
|
[[deprecated("Use read_plane_graph_in_lcc instead")]]
|
||||||
typename LCC::Dart_descriptor import_from_plane_graph(LCC& lcc, std::istream& ais);
|
typename LCC::Dart_descriptor import_from_plane_graph(LCC& lcc, std::istream& ais);
|
||||||
|
|
||||||
} /* namespace CGAL */
|
} /* namespace CGAL */
|
||||||
|
|
|
||||||
|
|
@ -5,7 +5,7 @@ namespace CGAL{
|
||||||
Imports `apoly` (a `Polyhedron_3`) into `lcc`, a model of the `LinearCellComplex` concept. Objects are added in `lcc`, existing darts are not modified. Returns a dart created during the import.
|
Imports `apoly` (a `Polyhedron_3`) into `lcc`, a model of the `LinearCellComplex` concept. Objects are added in `lcc`, existing darts are not modified. Returns a dart created during the import.
|
||||||
\pre \link GenericMap::dimension `LCC::dimension`\endlink \f$ \geq\f$ 2 and \link LinearCellComplex::ambient_dimension `LCC::ambient_dimension`\endlink==3.
|
\pre \link GenericMap::dimension `LCC::dimension`\endlink \f$ \geq\f$ 2 and \link LinearCellComplex::ambient_dimension `LCC::ambient_dimension`\endlink==3.
|
||||||
|
|
||||||
\sa `CGAL::plane_graph_to_lcc<LCC>`
|
\sa `CGAL::read_plane_graph_in_lcc<LCC>`
|
||||||
\sa `CGAL::triangulation_3_to_lcc<LCC,Triangulation>`
|
\sa `CGAL::triangulation_3_to_lcc<LCC,Triangulation>`
|
||||||
*/
|
*/
|
||||||
template<class LCC,class Polyhedron>
|
template<class LCC,class Polyhedron>
|
||||||
|
|
|
||||||
|
|
@ -8,7 +8,7 @@ Objects are added in `lcc`, existing darts are not modified. Returns a dart crea
|
||||||
\pre \link GenericMap::dimension `LCC::dimension`\endlink \f$ \geq\f$ 3 and
|
\pre \link GenericMap::dimension `LCC::dimension`\endlink \f$ \geq\f$ 3 and
|
||||||
\link LinearCellComplex::ambient_dimension `LCC::ambient_dimension`\endlink==3.
|
\link LinearCellComplex::ambient_dimension `LCC::ambient_dimension`\endlink==3.
|
||||||
|
|
||||||
\sa `CGAL::plane_graph_to_lcc<LCC>`
|
\sa `CGAL::read_plane_graph_in_lcc<LCC>`
|
||||||
\sa `CGAL::polyhedron_3_to_lcc<LCC,Polyhedron>`
|
\sa `CGAL::polyhedron_3_to_lcc<LCC,Polyhedron>`
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -64,7 +64,7 @@ which constructs a vector as the difference of points `p2-p1`, and
|
||||||
\link LinearCellComplexTraits::Vector ` Vector `\endlink `operator() (const CGAL::Origin&, const ` \link Point ` Point`\endlink`& p)`
|
\link LinearCellComplexTraits::Vector ` Vector `\endlink `operator() (const CGAL::Origin&, const ` \link Point ` Point`\endlink`& p)`
|
||||||
which constructs a vector as the difference of point `p` and a point at the origin
|
which constructs a vector as the difference of point `p` and a point at the origin
|
||||||
(used in \link CGAL::barycenter `barycenter`\endlink
|
(used in \link CGAL::barycenter `barycenter`\endlink
|
||||||
and `CGAL::plane_graph_to_lcc`).
|
and `CGAL::read_plane_graph_in_lcc`).
|
||||||
typedef unspecified_type Construct_vector;
|
typedef unspecified_type Construct_vector;
|
||||||
|
|
||||||
/*!
|
/*!
|
||||||
|
|
@ -103,7 +103,7 @@ a model of \link Kernel::Direction_2 `Direction_2`\endlink.
|
||||||
typedef unspecified_type Direction_2;
|
typedef unspecified_type Direction_2;
|
||||||
|
|
||||||
/*!
|
/*!
|
||||||
a model of \link Kernel::ConstructDirection_2 `ConstructDirection_2`\endlink (used in `CGAL::plane_graph_to_lcc`).
|
a model of \link Kernel::ConstructDirection_2 `ConstructDirection_2`\endlink (used in `CGAL::read_plane_graph_in_lcc`).
|
||||||
*/
|
*/
|
||||||
typedef unspecified_type Construct_direction_2;
|
typedef unspecified_type Construct_direction_2;
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -109,7 +109,7 @@ There are two functions allowing to build a linear cell complex from two other \
|
||||||
<LI>\link ::polyhedron_3_to_lcc `polyhedron_3_to_lcc(lcc,ap)`\endlink: adds in `lcc` all the cells present in `ap`, a `Polyhedron_3`.
|
<LI>\link ::polyhedron_3_to_lcc `polyhedron_3_to_lcc(lcc,ap)`\endlink: adds in `lcc` all the cells present in `ap`, a `Polyhedron_3`.
|
||||||
</UL>
|
</UL>
|
||||||
|
|
||||||
Lastly, the function \link ::plane_graph_to_lcc `plane_graph_to_lcc(lcc,ais)`\endlink adds in `lcc` all the cells reconstructed from the planar graph read in `ais`, a `std::istream` (see the \link ::plane_graph_to_lcc `reference manual`\endlink for the file format).
|
Lastly, the function \link ::read_plane_graph_in_lcc `read_plane_graph_in_lcc(lcc,ais)`\endlink adds in `lcc` all the cells reconstructed from the planar graph read in `ais`, a `std::istream` (see the \link ::read_plane_graph_in_lcc `reference manual`\endlink for the file format).
|
||||||
|
|
||||||
\subsection Linear_cell_complexModificationOperations Modification Operations
|
\subsection Linear_cell_complexModificationOperations Modification Operations
|
||||||
\anchor ssecmodifop
|
\anchor ssecmodifop
|
||||||
|
|
|
||||||
|
|
@ -62,7 +62,7 @@
|
||||||
|
|
||||||
\cgalCRPSection{Global Functions}
|
\cgalCRPSection{Global Functions}
|
||||||
\cgalCRPSubsection{Constructions for Linear Cell Complex}
|
\cgalCRPSubsection{Constructions for Linear Cell Complex}
|
||||||
- `CGAL::plane_graph_to_lcc<LCC>` (formerly `import_from_plane_graph`)
|
- `CGAL::read_plane_graph_in_lcc<LCC>` (formerly `import_from_plane_graph`)
|
||||||
- `CGAL::triangulation_3_to_lcc<LCC,Triangulation>` (formerly `import_from_triangulation_3`)
|
- `CGAL::triangulation_3_to_lcc<LCC,Triangulation>` (formerly `import_from_triangulation_3`)
|
||||||
- `CGAL::polyhedron_3_to_lcc<LCC,Polyhedron>` (formerly `import_from_polyhedron_3`)
|
- `CGAL::polyhedron_3_to_lcc<LCC,Polyhedron>` (formerly `import_from_polyhedron_3`)
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -24,7 +24,7 @@ create_single_source_cgal_program(
|
||||||
"linear_cell_complex_3_with_colored_vertices.cpp")
|
"linear_cell_complex_3_with_colored_vertices.cpp")
|
||||||
create_single_source_cgal_program("linear_cell_complex_3_with_mypoint.cpp")
|
create_single_source_cgal_program("linear_cell_complex_3_with_mypoint.cpp")
|
||||||
create_single_source_cgal_program("linear_cell_complex_4.cpp")
|
create_single_source_cgal_program("linear_cell_complex_4.cpp")
|
||||||
create_single_source_cgal_program("plane_graph_to_lcc_2.cpp")
|
create_single_source_cgal_program("read_plane_graph_in_lcc_2.cpp")
|
||||||
create_single_source_cgal_program("voronoi_2.cpp")
|
create_single_source_cgal_program("voronoi_2.cpp")
|
||||||
create_single_source_cgal_program("voronoi_3.cpp")
|
create_single_source_cgal_program("voronoi_3.cpp")
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -8,7 +8,7 @@ Examples for Linear_cell_complex package:
|
||||||
Three "basic" examples, detailed in the user manual.
|
Three "basic" examples, detailed in the user manual.
|
||||||
|
|
||||||
|
|
||||||
* plane_graph_to_lcc_2.cpp
|
* read_plane_graph_in_lcc_2.cpp
|
||||||
|
|
||||||
Program allowing to transform a planar graph into a 2D linear cell complex.
|
Program allowing to transform a planar graph into a 2D linear cell complex.
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -42,7 +42,7 @@ int main(int narg, char** argv)
|
||||||
|
|
||||||
std::ifstream is(filename.c_str());
|
std::ifstream is(filename.c_str());
|
||||||
std::cout<<"Import plane graph from "<<filename<<std::endl;
|
std::cout<<"Import plane graph from "<<filename<<std::endl;
|
||||||
CGAL::plane_graph_to_lcc(lcc, is);
|
CGAL::read_plane_graph_in_lcc(lcc, is);
|
||||||
|
|
||||||
// Display the lcc characteristics.
|
// Display the lcc characteristics.
|
||||||
std::cout<<"LCC characteristics:"<<std::endl<<" ";
|
std::cout<<"LCC characteristics:"<<std::endl<<" ";
|
||||||
|
|
@ -36,7 +36,7 @@ namespace CGAL {
|
||||||
* Imports a plane-embedded graph from a list of points and edges represented as pairs of vertex indices
|
* Imports a plane-embedded graph from a list of points and edges represented as pairs of vertex indices
|
||||||
*/
|
*/
|
||||||
template< class LCC >
|
template< class LCC >
|
||||||
typename LCC::Dart_descriptor plane_graph_to_lcc(LCC& alcc,
|
typename LCC::Dart_descriptor read_plane_graph_in_lcc(LCC& alcc,
|
||||||
const std::vector<typename LCC::Point>& vertices,
|
const std::vector<typename LCC::Point>& vertices,
|
||||||
const std::vector<size_t>& edge_indices)
|
const std::vector<size_t>& edge_indices)
|
||||||
{
|
{
|
||||||
|
|
@ -131,13 +131,13 @@ namespace CGAL {
|
||||||
}
|
}
|
||||||
|
|
||||||
template< class LCC >
|
template< class LCC >
|
||||||
[[deprecated("Use plane_graph_to_lcc instead")]]
|
[[deprecated("Use read_plane_graph_in_lcc instead")]]
|
||||||
typename LCC::Dart_descriptor
|
typename LCC::Dart_descriptor
|
||||||
import_from_plane_graph(LCC& alcc,
|
import_from_plane_graph(LCC& alcc,
|
||||||
const std::vector<typename LCC::Point>& vertices,
|
const std::vector<typename LCC::Point>& vertices,
|
||||||
const std::vector<size_t>& edge_indices)
|
const std::vector<size_t>& edge_indices)
|
||||||
{
|
{
|
||||||
return plane_graph_to_lcc(alcc, vertices, edge_indices);
|
return read_plane_graph_in_lcc(alcc, vertices, edge_indices);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
@ -148,7 +148,7 @@ import_from_plane_graph(LCC& alcc,
|
||||||
* @return A dart created during the conversion.
|
* @return A dart created during the conversion.
|
||||||
*/
|
*/
|
||||||
template< class LCC >
|
template< class LCC >
|
||||||
typename LCC::Dart_descriptor plane_graph_to_lcc(LCC& alcc,
|
typename LCC::Dart_descriptor read_plane_graph_in_lcc(LCC& alcc,
|
||||||
std::istream& ais)
|
std::istream& ais)
|
||||||
{
|
{
|
||||||
using FT = typename LCC::FT;
|
using FT = typename LCC::FT;
|
||||||
|
|
@ -195,32 +195,32 @@ import_from_plane_graph(LCC& alcc,
|
||||||
edge_indices.push_back(v2);
|
edge_indices.push_back(v2);
|
||||||
}
|
}
|
||||||
|
|
||||||
return plane_graph_to_lcc(alcc, vertices, edge_indices);
|
return read_plane_graph_in_lcc(alcc, vertices, edge_indices);
|
||||||
}
|
}
|
||||||
|
|
||||||
template <class LCC>
|
template <class LCC>
|
||||||
[[deprecated("Use plane_graph_to_lcc instead")]]
|
[[deprecated("Use read_plane_graph_in_lcc instead")]]
|
||||||
typename LCC::Dart_descriptor
|
typename LCC::Dart_descriptor
|
||||||
import_from_plane_graph(LCC& alcc, std::istream& ais)
|
import_from_plane_graph(LCC& alcc, std::istream& ais)
|
||||||
{
|
{
|
||||||
return plane_graph_to_lcc(alcc, ais);
|
return read_plane_graph_in_lcc(alcc, ais);
|
||||||
}
|
}
|
||||||
|
|
||||||
template < class LCC >
|
template < class LCC >
|
||||||
typename LCC::Dart_descriptor
|
typename LCC::Dart_descriptor
|
||||||
plane_graph_to_lcc(LCC& alcc, const char* filename)
|
read_plane_graph_in_lcc(LCC& alcc, const char* filename)
|
||||||
{
|
{
|
||||||
std::ifstream input(filename);
|
std::ifstream input(filename);
|
||||||
if (!input.is_open()) return alcc.null_descriptor;
|
if (!input.is_open()) return alcc.null_descriptor;
|
||||||
return plane_graph_to_lcc(alcc, input);
|
return read_plane_graph_in_lcc(alcc, input);
|
||||||
}
|
}
|
||||||
|
|
||||||
template <class LCC>
|
template <class LCC>
|
||||||
[[deprecated("Use plane_graph_to_lcc instead")]]
|
[[deprecated("Use read_plane_graph_in_lcc instead")]]
|
||||||
typename LCC::Dart_descriptor
|
typename LCC::Dart_descriptor
|
||||||
import_from_plane_graph(LCC& alcc, const char* filename)
|
import_from_plane_graph(LCC& alcc, const char* filename)
|
||||||
{
|
{
|
||||||
return plane_graph_to_lcc(alcc, filename);
|
return read_plane_graph_in_lcc(alcc, filename);
|
||||||
}
|
}
|
||||||
|
|
||||||
template < class LCC >
|
template < class LCC >
|
||||||
|
|
|
||||||
|
|
@ -382,7 +382,7 @@ bool test_LCC_2()
|
||||||
std::cout<<"Error: impossible to open 'data/graph.txt'"<<std::endl;
|
std::cout<<"Error: impossible to open 'data/graph.txt'"<<std::endl;
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
CGAL::plane_graph_to_lcc<LCC>(lcc,in);
|
CGAL::read_plane_graph_in_lcc<LCC>(lcc,in);
|
||||||
if ( !check_number_of_cells_2(lcc, 66, 166, 104, 2) )
|
if ( !check_number_of_cells_2(lcc, 66, 166, 104, 2) )
|
||||||
return false;
|
return false;
|
||||||
lcc.clear();
|
lcc.clear();
|
||||||
|
|
@ -431,7 +431,7 @@ struct Test_change_orientation_LCC_2<LCC, CGAL::Combinatorial_map_tag>
|
||||||
std::cout<<"Error: impossible to open 'data/graph.txt'"<<std::endl;
|
std::cout<<"Error: impossible to open 'data/graph.txt'"<<std::endl;
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
CGAL::plane_graph_to_lcc<LCC>(lcc,in);
|
CGAL::read_plane_graph_in_lcc<LCC>(lcc,in);
|
||||||
|
|
||||||
trace_test_begin();
|
trace_test_begin();
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -15,7 +15,7 @@ int main()
|
||||||
input << "3 3\n0.0 0.0\n1.0 0.0\n0.0 1.0\n0 1\n1 2\n2 0\n";
|
input << "3 3\n0.0 0.0\n1.0 0.0\n0.0 1.0\n0 1\n1 2\n2 0\n";
|
||||||
|
|
||||||
// Test new function
|
// Test new function
|
||||||
auto d1 = CGAL::plane_graph_to_lcc(lcc1, input);
|
auto d1 = CGAL::read_plane_graph_in_lcc(lcc1, input);
|
||||||
assert(d1 != LCC::null_descriptor);
|
assert(d1 != LCC::null_descriptor);
|
||||||
|
|
||||||
// Rewind input stream for second test
|
// Rewind input stream for second test
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue