Subject: CGAL users discussion list
List archive
- From: <>
- To:
- Subject: [cgal-discuss] Map with Polyhedron::Vertex_handle
- Date: Thu, 10 Sep 2009 12:32:42 +0200 (CEST)
Good afternoon.
We use CGAL library and self-learn with CGAL on-line manual and tutorials. We
succeeded in calculating the volume of intersections of nefpolyhedrons.
We want to store a polyhedron in two arrays (points (X,Y,Z)) and facets
(points
indexes)).
When building the array which contains the points we are trying to use a map.
We get a compilation error that we can’t overcome with. Here is one of the
versions of the short code we have tried.
std::map<Polyhedron::Vertex_handle,int> listVertex;
int ind = 0;
std::map< Polyhedron::Vertex_handle,int>::iterator mit;
for (Polyhedron::Vertex_iterator vit = polyhedron.vertices_begin();
vit
!= polyhedron.vertices_end(); ++vit)
{
Vertex v = *vit;
PointXYZ p(0, v.point()[0], v.point()[1], v.point()[2]);
tabPolyhedronPoint.push_back(p);
listVertex[vit] = ind; compilation error
The error is:
Error 17 error C2678: binary '<' : no operator found which takes a
left-hand operand of type 'const Vertex_handle' (or there is no acceptable
conversion) C:\Program Files\Microsoft Visual Studio
8\VC\include\functional 143
Please could you give us an example or a link to an example using map[]
properly on Polyhedron::Vertex_handle?
Best regards.
- [cgal-discuss] Map with Polyhedron::Vertex_handle, pascale.bergeret, 09/10/2009
- Re: [cgal-discuss] Map with Polyhedron::Vertex_handle, Camille Wormser, 09/10/2009
Archive powered by MHonArc 2.6.16.