ArrangementDcelVertex

Definition

A vertex record in a DCEL data structure. A vertex is always associated with a point. However, the vertex record only stores a pointer to the associated point, and the actual Point object is stored elsewhere.

A vertex usually has several halfedges incident to it, such that it is possible to access one of these halfedges directly and to traverse all incident halfedges around the vertex. However, the DCEL may also contain isolated vertices that have no incident halfedges. In this case, the vertex stores an isolated vertex-information record, indicating the face that contains this vertex in its interior.

Types

ArrangementDcelVertex::Halfedge
the corresponding DCEL halfedge type.

ArrangementDcelVertex::Isolated_vertex
the corresponding DCEL isolated vertex-information type.


ArrangementDcelVertex::Point
the point type associated with the vertex.

Creation

ArrangementDcelVertex v;
default constructor.

void v.assign ( Self other) assigns v with the contents of the other vertex.

Access Functions

All functions below also have const counterparts, returning non-mutable pointers or references:

bool v.is_isolated () returns whether the vertex is isolated (has no incident halfedges).

Halfedge* v.halfedge () returns an incident halfedge that has v as its target.
Precondition: v is not an isolated vertex.

Isolated_vertex* v.isolated_vertex () returns the isolated vertex-information record.
Precondition: v is an isolated vertex.

bool v.has_null_point () returns whether the vertex is not associated with a valid point (i.e. it lies at infinity).

Point& v.point () returns the associated point.
Precondition: v() is associated with a valid point.

Boundary_type v.boundary_in_x () return whether the vertex has an infinite x-coordinate.

Boundary_type v.boundary_in_y () return whether the vertex has an infinite y-coordinate.

Modifiers

void v.set_halfedge ( Halfedge* e) sets the incident halfedge, marking v as a regular vertex.

void v.set_isolated_vertex ( Isolated_vertex* iv)
sets the isolated vertex-information record, marking v as an isolated vertex.

void v.set_point ( Point* p) sets the associated point.

void v.set_boundary ( Boundary_type inf_x, Boundary_type inf_y)
sets v as a vertex at infinity.
Precondition: Either inf_x or inf_y is not NO_BOUNDARY.

See Also

ArrangementDcel
ArrangementDcelHalfedge
ArrangementDcelIsolatedVertex