Subject: CGAL users discussion list
List archive
Re: [cgal-discuss] Triangulation_3::Facet_circulator and how to get its cell_handle and index...
Chronological Thread
- From:
- To:
- Subject: Re: [cgal-discuss] Triangulation_3::Facet_circulator and how to get its cell_handle and index...
- Date: Wed, 08 Aug 2007 13:14:42 +0200
Hi all,
I looked at this 'bug'. However, since Facet is just a typedef to pair<Cell,int>, there is no good return type for a potential operator->
So, I won't add it...
The same question is open in several places in Triangulations (2d for edges and 3d for facets and edges), we will think about a nice way to answer it globally.
In the meanwhile, as Laurent wrote, users can write (*fCirc).first instead of fCirc->first.
best
Monique Teillaud
Laurent Rineau wrote:
On Friday 13 July 2007 11:37:18 Thomas Zangl - Home wrote:
Dear List,
I am stuck getting the cell_handle and the index i out of a
Triangulation_3::Facet_circulator.
I converted some code using a Facet_iterator to a Facet_circulator
and, even that the circulator and the iterators data_type are supposed
to be the same, it does not work any longer. (compile error)
The code look like this:
Rt_Facet_circulator fCirc,fCircDone = t.incident_facets(*eIt);
do {
if (t.is_infinite(*fCirc)) continue;
cout << "---------------------------- Next face
----------------------------" << endl; // cell which the facet is part of
Rt_Cell_handle cell = fCirc->first;
// this is the index of the facet's opposite vertex
int faceIndex = fCirc->second;
}
The errors are of some kind "fCirc" has no member first and no member
second.
Hi,
Accdording to the documentation, your code should be correct. However, the type Facet_circulator of 3D triangulation do not have operator->. That is a bug.
For the moment, use "(*fCirc).first" instead of "fCirc->first".
- Re: [cgal-discuss] Triangulation_3::Facet_circulator and how to get its cell_handle and index..., Monique . Teillaud, 08/08/2007
Archive powered by MHonArc 2.6.16.