0

I would like to know that how can we access all tetrahedrons incident on a vertex in a CGAL 3D triangulation?

I have seen cell() function for vertex, but it seems to allow access to one(arbitrarily selected?) tetrahedron only.

Pranav
  • 475
  • 4
  • 25

2 Answers2

4

The answer you are looking for should be TDS::incident_cells.

Pranav
  • 475
  • 4
  • 25
olivier
  • 221
  • 3
  • 2
  • Although the **incident_cells** function exactly satisfies my requirement, I am facing some troubles using it. Can you give an example code for explaining how to use this function. Further, I want to know Why it returns **outputiterator** both as return value and in argument under the name **cells**? – Pranav May 02 '14 at 06:06
  • Specifically, if I want to access all cells returned by **incident_cells** function say in a **while loop**, what _termination criteria_ should by used(as it seems I only have access to iterator but not its corresponding container, so how to get access to _begin()_ and _end()_). – Pranav May 02 '14 at 06:17
1

I had trouble using the incident_cells() function as I was not sure how to use the OutputIterators. This CGAL forum discussion exactly answers my question(with a code example).

Community
  • 1
  • 1
Pranav
  • 475
  • 4
  • 25