// Description: header for structs used in composition of the D_CEL structure and its associated operations. // Revision history: 26/7/99/LY - declarations transferred from dcel.h to structs.h #ifndef STRUCTS #define STRUCTS #include #include "sweep.h" using std::vector; using std::map; using std::multimap; using std::pair; using std::string; struct VertexAux { VertexAux(): left_half_edge(0), subdivision(0), s1_face("A0"), s2_face("B0") {} int subdivision; string s1_face, s2_face; HalfEdge* left_half_edge; SweepStatus upper1, lower1, upper2, lower2; // local sweep structures for handling the case of vertex-vertex intersection }; struct Vertex { Vertex(long vertex_arg=0): vertex(vertex_arg),incident_edge(0) {} long vertex; Coordinates coordinates; HalfEdge* incident_edge; VertexAux auxiliary_data; }; struct HalfEdge { HalfEdge(): origin(0), twin(0), incident_face(0), next(0), prev(0), BCG_nodePtr(0) {} Vertex* origin; HalfEdge* twin; Face* incident_face; HalfEdge* next; HalfEdge* prev; BCGraphNode* BCG_nodePtr; }; struct Face { Face(string face_arg = "UAUB"): face(face_arg), outer_component(0) {} string face; HalfEdge* outer_component; vector inner_components; }; struct BCGraphNode { BCGraphNode(): leftmost_edge(0) {} HalfEdge* leftmost_edge; vector neighbours; // use vector since more than one hole may be adjacent to a half-edge }; #endif