Skip to Content.
Sympa Menu

cgal-discuss - Re: [cgal-discuss] Checking for a vertex in a Polyhedron

Subject: CGAL users discussion list

List archive

Re: [cgal-discuss] Checking for a vertex in a Polyhedron


Chronological Thread 
  • From: Andreas Fabri <>
  • To:
  • Subject: Re: [cgal-discuss] Checking for a vertex in a Polyhedron
  • Date: Mon, 07 Feb 2011 08:51:01 +0100
  • Organization: GeometryFactory


You might give this a try:

std::map<Point_3, Vertex_handle>

andreas

On 05/02/2011 17:36, vanimurarka wrote:

Hi,

Is there a way I can query a polyhedron model to check whether a point
exists as a vertex in the polyhedron?

I looked into the documentation and could not seem to find any direct query.
I do not really want to iterate over the whole set of vertices because this
query needs to be done repeatedly in the algorithm I am implementing.

If there is no direct query, what are the suggestions for the shortest /
most efficient way of obtaining this information?

At present, the best I can think of is to maintain a separate HashTable of
the vertices added to the polyhedron, where the x-y-z co-ordinate of the
vertex is concatinated as a string to serve as the key of the HashTable.
Then when I have a new point, I can use its co-ordinate values to query the
HashTable. However, I might possibly run into accuracy issues.

Thanks

Vani




Archive powered by MHonArc 2.6.16.

Top of Page