CGAL way for storing are retrieving geometric information a for full cell in the triangulation

146 views Asked by At

I'm planning on using CGAL Triangulation and Delaunay Triangulation classes as a backbone geometric structure for robot motion planning algorithms. The main difficulty that I have encountered so far is in assigning extra geometric data to full cells in an abstract complex. For example, in order to find the shortest path through a full cell I need to compute a set of normal vectors to all facets. For this purpose, I use expensive pseudo inverse procedure. Since, these computations have to be done several times in each full cell, I prefer to store this data once it is computed, and retrieve it during successive computations. In addition, I would like to store collision data for each full cell instead of recomputing it all over again after refining given triangulation.

Browsing some answers here and trying to understand the structure of CGAL, I reached some understanding on this subject:

  1. It is a really bad idea to rewrite geometric kernel just for this...
  2. I've seen examples of using a vertex base class with info in which points are augmented with indices here. Although using Triangulation_cell_base_with_info seems as an easy workaround, I consider it as an inelegant hack because it requires me to implement a wrapper class for keeping additional data and pass this class to the planning algorithm.
  3. I can derive a cell class from Triangulation_ds_cell_base. This looks like the most acceptable way to do things, but I cannot find a good example of code that will help me to get started. I need not only class derivation, but also example code on how to access cell data in various scenarios: through iterator, vertex adjacency, and so on.

So, here are my two questions:

  1. What is CGAL way to store and retrieve additional geometric data per cell?
  2. Is there a good example of code doing exactly that?

EDIT: I forgot to mention that I need to use dD triangulation introduced in CGAL 4.6

0

There are 0 answers