Subject: CGAL users discussion list
List archive
- From: Song Lin <>
- To:
- Subject: [cgal-discuss] problem in modifying c.neighbor(int i)
- Date: Sun, 09 May 2010 14:14:31 +0800
Hi,
the typedef part of my codes are:
typedef CGAL::Exact_predicates_inexact_constructions_kernel Kk;
typedef CGAL::Regular_triangulation_euclidean_traits_3<Kk> Gt;
typedef CGAL::Alpha_shape_vertex_base_3<Gt> Vb_as;
typedef CGAL::Triangulation_vertex_base_with_info_3<int, Kk, Vb_as> Vb;
typedef CGAL::Alpha_shape_cell_base_3<Gt> Cb_as;
typedef CGAL::Triangulation_cell_base_with_info_3<int, Kk, Cb_as> Cb;
typedef CGAL::Triangulation_data_structure_3<Vb,Cb> Tds;
typedef CGAL::Regular_triangulation_3<Gt,Tds> Triangulation_3;
typedef CGAL::Alpha_shape_3<Triangulation_3> Alpha_shape_3;
typedef Alpha_shape_3::Cell_handle Cell_handle;
typedef Alpha_shape_3::Vertex_handle Vertex_handle;
typedef Alpha_shape_3::Facet Facet;
typedef Alpha_shape_3::Edge Edge;
typedef Gt::Weighted_point Weighted_point;
typedef Gt::Bare_point Bare_point;
for a cell in Alpha_shape_3,
Alpha_shape_3::Finite_cells_iterator cit;
I tried to modify the info() of its neighbors:
for (int i=0;i<4;i++)
{
cit->neighbor(i)->info()=1;
}
but after I ran the program and checked the info():
for (cit = as.finite_cells_begin(); cit != as.finite_cells_end();cit++)
{
if(cit->neighbor(i)->info()==1)
}
I found nothing was changed. It seems that cit->neighbor(i) returns a
"copy" of cit->neighbor(i) but not cit->neighbor(i) itself. (So that
nothing in Alpha_shape_3 was changed.)
Any one can tell me how to modify cit->neighbor(i)? (so that
Alpha_shape_3 was changed as well?)
Best regards,
Lin
--
Center of Computational and Systems Biology,
Institute of Biophysics, CAS.
15 Datun Road, Chaoyang District
Beijing, 100101
P.R.China
- [cgal-discuss] problem in modifying c.neighbor(int i), Song Lin, 05/09/2010
Archive powered by MHonArc 2.6.16.