Subject: CGAL users discussion list
List archive
- From: Stephane Tayeb <>
- To:
- Subject: Re: [cgal-discuss] convex hull for points
- Date: Thu, 27 Aug 2009 16:18:39 +0200
Hi,
wrote:
I came up with this piece of code which compiles fine, but I get an exceptionUsing your pointer without checking if the cast is a success (facet != NULL) is not a good idea I think.
when I try to do a "facet->second". Could anybody please give a hint on how to
fix it?
std::list<CGAL::Object> facets;
as.filtration(std::back_inserter(facets));
std::list<CGAL::Object>::iterator fit;
for(fit = facets.begin(); fit != facets.end(); fit++)
{
const CGAL::Facet* facet = CGAL::object_cast<Facet>(&(*fit));
I don't know if it can help.
for(int i = 0; i < 4; i++)
{
if(i != facet->second) // **** Exception here
{
std::cout << " " <<
Point_map[facet->first->vertex(i)->point()];
}
}
std::cout << std::endl;
}
Regards,
--
Stephane Tayeb
Software engineer - INRIA Sophia Antipolis
Geometrica Project-Team
- Re: Re: [cgal-discuss] convex hull for points, astropic, 08/27/2009
- Re: [cgal-discuss] convex hull for points, Camille Wormser, 08/27/2009
- Re: Re: [cgal-discuss] convex hull for points, astropic, 08/28/2009
- Re: [cgal-discuss] convex hull for points, Stephane Tayeb, 08/27/2009
- Re: Re: [cgal-discuss] convex hull for points, astropic, 08/28/2009
- Re: [cgal-discuss] convex hull for points, Camille Wormser, 08/27/2009
Archive powered by MHonArc 2.6.16.