mirror of https://github.com/CGAL/cgal
add set_infinite_vertex to Triangulation_3 and use it with copy_tds
the 2D version already exists
This commit is contained in:
parent
f915998b2f
commit
498492e770
|
|
@ -91,7 +91,7 @@ void make_one_run(const char* filename){
|
||||||
|
|
||||||
//copy triangulation for familly alpha-shape
|
//copy triangulation for familly alpha-shape
|
||||||
WDT T1;
|
WDT T1;
|
||||||
T1.infinite_vertex() = T1.tds().copy_tds( wfixed_as.tds(), wfixed_as.infinite_vertex() );
|
T1.set_infinite_vertex( T1.tds().copy_tds( wfixed_as.tds(), wfixed_as.infinite_vertex() ) );
|
||||||
std::cout << "Build familly weighted alpha complex" << std::endl;
|
std::cout << "Build familly weighted alpha complex" << std::endl;
|
||||||
time.start();
|
time.start();
|
||||||
WAS w_as(T1,0,WAS::GENERAL);
|
WAS w_as(T1,0,WAS::GENERAL);
|
||||||
|
|
@ -102,7 +102,7 @@ void make_one_run(const char* filename){
|
||||||
|
|
||||||
//copy triangulation for familly alpha-shape
|
//copy triangulation for familly alpha-shape
|
||||||
WDT_f T1f;
|
WDT_f T1f;
|
||||||
T1f.infinite_vertex() = T1f.tds().copy_tds(wfixed_as.tds(),wfixed_as.infinite_vertex());
|
T1f.set_infinite_vertex( T1f.tds().copy_tds(wfixed_as.tds(),wfixed_as.infinite_vertex()) );
|
||||||
|
|
||||||
std::cout << "Build familly filtered weighted alpha complex" << std::endl;
|
std::cout << "Build familly filtered weighted alpha complex" << std::endl;
|
||||||
time.start();
|
time.start();
|
||||||
|
|
|
||||||
|
|
@ -217,7 +217,7 @@ void test_dynamic_insert(const std::list<Weighted_point >& lst)
|
||||||
// std::cout << ++k << " " << std::flush;
|
// std::cout << ++k << " " << std::flush;
|
||||||
dynamic_as.insert(*it);
|
dynamic_as.insert(*it);
|
||||||
WFixed_DT tr_copy;
|
WFixed_DT tr_copy;
|
||||||
tr_copy.infinite_vertex() = tr_copy.tds().copy_tds( dynamic_as.tds(), dynamic_as.infinite_vertex() );
|
tr_copy.set_infinite_vertex( tr_copy.tds().copy_tds( dynamic_as.tds(), dynamic_as.infinite_vertex() ) );
|
||||||
WFixed_AS static_as (tr_copy);
|
WFixed_AS static_as (tr_copy);
|
||||||
compare_all(dynamic_as,static_as);
|
compare_all(dynamic_as,static_as);
|
||||||
}
|
}
|
||||||
|
|
@ -234,7 +234,7 @@ void test_dynamic_remove(const std::list<Weighted_point >& lst)
|
||||||
{
|
{
|
||||||
// std::cout << ++k << " " << std::flush;
|
// std::cout << ++k << " " << std::flush;
|
||||||
WFixed_DT tr_copy;
|
WFixed_DT tr_copy;
|
||||||
tr_copy.infinite_vertex() = tr_copy.tds().copy_tds( dynamic_as.tds(), dynamic_as.infinite_vertex() );
|
tr_copy.set_infinite_vertex( tr_copy.tds().copy_tds( dynamic_as.tds(), dynamic_as.infinite_vertex() ) );
|
||||||
WFixed_AS static_as( tr_copy );
|
WFixed_AS static_as( tr_copy );
|
||||||
compare_all(dynamic_as,static_as);
|
compare_all(dynamic_as,static_as);
|
||||||
dynamic_as.remove(dynamic_as.finite_vertices_begin());
|
dynamic_as.remove(dynamic_as.finite_vertices_begin());
|
||||||
|
|
@ -262,7 +262,7 @@ void make_one_run(const char* filename){
|
||||||
|
|
||||||
//copy triangulation for familly alpha-shape
|
//copy triangulation for familly alpha-shape
|
||||||
WDT T1;
|
WDT T1;
|
||||||
T1.infinite_vertex() = T1.tds().copy_tds( wfixed_as.tds(),wfixed_as.infinite_vertex() );
|
T1.set_infinite_vertex( T1.tds().copy_tds( wfixed_as.tds(),wfixed_as.infinite_vertex() ) );
|
||||||
std::cout << "Build familly weighted alpha complex" << std::endl;
|
std::cout << "Build familly weighted alpha complex" << std::endl;
|
||||||
WAS w_as(T1,0,WAS::GENERAL);
|
WAS w_as(T1,0,WAS::GENERAL);
|
||||||
|
|
||||||
|
|
@ -278,7 +278,7 @@ void make_one_run(const char* filename){
|
||||||
//---Test alpha shape
|
//---Test alpha shape
|
||||||
Fixed_DT delaunay0(lst.begin(),lst.end());
|
Fixed_DT delaunay0(lst.begin(),lst.end());
|
||||||
DT delaunay1;
|
DT delaunay1;
|
||||||
delaunay1.infinite_vertex() = delaunay1.tds().copy_tds( delaunay0.tds(),delaunay0.infinite_vertex() );
|
delaunay1.set_infinite_vertex( delaunay1.tds().copy_tds( delaunay0.tds(),delaunay0.infinite_vertex() ) );
|
||||||
|
|
||||||
std::cout << "Build Fixed alpha complex" << std::endl;
|
std::cout << "Build Fixed alpha complex" << std::endl;
|
||||||
Fixed_AS fixed_as(delaunay0);
|
Fixed_AS fixed_as(delaunay0);
|
||||||
|
|
|
||||||
|
|
@ -1071,7 +1071,8 @@ Point circumcenter(Face_handle f) const;
|
||||||
/// @{
|
/// @{
|
||||||
|
|
||||||
/*!
|
/*!
|
||||||
\cgalAdvanced
|
\cgalAdvanced This method is meant to be used only if you have done a low-level operation on the underlying tds that invalidated the infinite vertex.
|
||||||
|
Sets the infinite vertex.
|
||||||
*/
|
*/
|
||||||
void set_infinite_vertex(const Vertex_handle& v);
|
void set_infinite_vertex(const Vertex_handle& v);
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -41,8 +41,8 @@ int main()
|
||||||
DT2_epic dt2_epic;
|
DT2_epic dt2_epic;
|
||||||
dt2_epic.insert(points.begin(), points.end());
|
dt2_epic.insert(points.begin(), points.end());
|
||||||
DT2_epec dt2_epec;
|
DT2_epec dt2_epec;
|
||||||
dt2_epec.infinite_vertex() =
|
dt2_epec.set_infinite_vertex(
|
||||||
dt2_epec.tds().copy_tds( dt2_epic.tds(),dt2_epic.infinite_vertex(), Convert_vertex(), Convert_face() );
|
dt2_epec.tds().copy_tds( dt2_epic.tds(),dt2_epic.infinite_vertex(), Convert_vertex(), Convert_face() ) );
|
||||||
|
|
||||||
CGAL_assertion( dt2_epec.is_valid() );
|
CGAL_assertion( dt2_epec.is_valid() );
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -305,6 +305,12 @@ Returns the infinite vertex.
|
||||||
*/
|
*/
|
||||||
Vertex_handle infinite_vertex();
|
Vertex_handle infinite_vertex();
|
||||||
|
|
||||||
|
/*!
|
||||||
|
\cgalAdvanced This method is meant to be used only if you have done a low-level operation on the underlying tds that invalidated the infinite vertex.
|
||||||
|
Sets the infinite vertex.
|
||||||
|
*/
|
||||||
|
void set_infinite_vertex(Vertex_handle v);
|
||||||
|
|
||||||
/*!
|
/*!
|
||||||
Returns a cell incident to the infinite vertex.
|
Returns a cell incident to the infinite vertex.
|
||||||
*/
|
*/
|
||||||
|
|
|
||||||
|
|
@ -40,8 +40,8 @@ int main()
|
||||||
|
|
||||||
DT3_epic dt3_epic(points.begin(), points.end());
|
DT3_epic dt3_epic(points.begin(), points.end());
|
||||||
DT3_epec dt3_epec;
|
DT3_epec dt3_epec;
|
||||||
dt3_epec.infinite_vertex() =
|
dt3_epec.set_infinite_vertex(
|
||||||
dt3_epec.tds().copy_tds( dt3_epic.tds(),dt3_epic.infinite_vertex(), Convert_vertex(), Convert_cell() );
|
dt3_epec.tds().copy_tds( dt3_epic.tds(),dt3_epic.infinite_vertex(), Convert_vertex(), Convert_cell() ) );
|
||||||
|
|
||||||
CGAL_assertion( dt3_epec.is_valid() );
|
CGAL_assertion( dt3_epec.is_valid() );
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -411,6 +411,9 @@ public:
|
||||||
|
|
||||||
Vertex_handle infinite_vertex() const
|
Vertex_handle infinite_vertex() const
|
||||||
{ return infinite; }
|
{ return infinite; }
|
||||||
|
|
||||||
|
void set_infinite_vertex(Vertex_handle v)
|
||||||
|
{ infinite=v;}
|
||||||
|
|
||||||
Cell_handle infinite_cell() const
|
Cell_handle infinite_cell() const
|
||||||
{
|
{
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue