Many algorithms in computational geometry assume to have as input a complex data structure to represent a geometric object. The most common I know is the Doubly connected edge list, but there're also the halfdge data structure, winged edge etc... I was wondering if such data structure is also used to represent simple object. I know for example there's no need to represent a vertex or a line segment using a DCEL, however in practical implementations this would probably make the interface reusable, and therefore the whole algorithm implemented (unless we want to use some wrapper but I'm assuming I'm not).
So my question is, how can both points and segments be represented using a DCEL?
I would initialize the
half_edge_incident field to be
NIL and I would keep the
list_< HalfEdge* > empty, same as the
list< Face* >?
For the segment case I would just have two vertices entries not empty, two half edges entries not empty, the faces list would be empty.
Does this representation work?