Boost logo

Boost Users :

Subject: [Boost-users] BGL: half-edge-diagram or doubly-connected-edge-list
From: Anders Wallin (anders.e.e.wallin_at_[hidden])
Date: 2011-02-19 05:28:46


Hi group,
I want to work with meshes that contain vertices, edges, and faces(1)(2).
I've subclassed adjacency_list and added a std::vector to contain the face-data:
http://pastebin.com/h4jxpDkt

Is there a better solution? (somewhere in the BGL docs it says
sublcassing BGL-graphs can be dangerous?)
How do I provide a graph_traits::face_descriptor for my sublcass? (now
I am using "unsigned int" for face descriptors)
How do I allow choice between a vector and a list for storing the vertices?

I have also made my first ever attempt (3) to write some
template-based code which manipulates this graph class.
That file has lots and lots of "typedef" "typename" and "graph_traits"
in it. Are there some macros or tools to simplify this style of
programming I should be aware of?

thanks,
Anders

(1) http://en.wikipedia.org/wiki/Doubly-connected_edge_list
(2) http://www.youtube.com/watch?v=5Rd-u5n0pQs
(3) http://code.google.com/p/opencamlib/source/browse/trunk/src/algo/halfedgediagram2.h


Boost-users list run by williamkempf at hotmail.com, kalb at libertysoft.com, bjorn.karlsson at readsoft.com, gregod at cs.rpi.edu, wekempf at cox.net