Boost logo

Boost :

Subject: Re: [boost] [Review Request] Inclusion of the Boost.Polygon Voronoi Library
From: Andrii Sydorchuk (sydorchuk.andriy_at_[hidden])
Date: 2012-04-13 15:01:37


>
> I think that just eliminating this void* data feature and providing an
> example of copying the diagram into a different graph data structure and
> looking up input sites in a map to populate some field would be the best
> way to handle this. I don't know that we currently have code that uses
> this feature of the cell/edge, do we Andrii?

 Well, I have examples in the basic tutorial on how this data member could
be used. Personally I used it to do DFS on the Voronoi graph, by setting
visited edges data pointer to themselves. I found this functionality to be
very handy:

void dfs(const VD::edge_type* edge) {
    if (edge->data()) return;
    // do some edge processing here.
    edge->data(&edge);
    edge->twin()->data(&edge);
    const voronoi_diagram<double>::edge_type* e = v->incident_edge();
    do {
      dfs(e);
      e = e->rot_next();
    } while (e != v->incident_edge());
  }

I think building the Delaunay triangulation of a set of points from the
> voronoi diagram data structure should be provided as example code in the
> documentation in addition to being a documented API that populates a
> collection of polygon_concept with triangles. That way people can adapt
> the example code to populate their own mesh data structure if a container
> of polygon_concept doesn't map well to what they need. We can make the
> example code use concrete types for ease of reading and implement the API
> as a generic algorithm with concept overloading on polygon_concept that
> would be confusing if shown in example code.

True. I am also going to implement dedicated Delaunay triangulation data
structure as soon as I have some time.

Regards,
Andrii


Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk