ArrangementDcelHalfedge

Definition

A halfedge record in a DCEL data structure. Two halfedges with opposite directions always form an edge (a halfedge pair). The halfedges form together chains, defining the boundaries of connected components, such that all halfedges along a chain have the same incident face. Note that the chain the halfedge belongs to may form the outer boundary of a bounded face (an outer CCB) or the boundary of a hole inside a face (an inner CCB).

An edge is always associated with a curve, but the halfedge records only store a pointer to the associated curve, and the actual curve objects are stored elsewhere. Two opposite halfedges are always associated with the same curve.

Types

ArrangementDcelHalfedge::Vertex
the corresponding DCEL halfedge type.

ArrangementDcelHalfedge::Face
the corresponding DCEL face type.

ArrangementDcelHalfedge::Hole
the corresponding DCEL hole type.


ArrangementDcelHalfedge::X_monotone_curve
the curve type associated with the edge.

Creation

ArrangementDcelHalfedge e;
default constructor.

void e.assign ( Self other)
assigns e with the contents of the other halfedge.

Access Functions

Comparison_result e.direction () returns SMALLER if e's source vertex is lexicographically smaller than it target, and LARGER if it is lexicographically larger than the target.

bool e.is_on_hole () determines whether the e lies on an outer CCB of a bounded face, or on an inner CCB (a hole inside a face). The function returns true if e lies on a hole.

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

Halfedge* e.opposite () returns the twin halfedge.

Halfedge* e.prev () returns the previous halfedge along the chain.

Halfedge* e.next () returns the next halfedge along the chain.

Vertex* e.vertex () returns the target vertex.

Face* e.face () returns the incident face.
Precondition: e lies on the outer boundary of this face.

Hole* e.hole () returns the hole (inner CCB) e belongs to.
Precondition: e lies on a hole inside its incident face.

X_monotone_curve& e.curve () returns the associated curve.

Modifiers

void e.set_opposite ( Halfedge* opp)
sets the opposite halfedge.

void e.set_direction ( Comparison_result dir)
sets the lexicographical order between e's source and target vertices to be dir. The direction of the opposite halfedge is also set to the opposite direction.
Precondition: dir is either SMALLER or LARGER (and not EQUAL).

void e.set_prev ( Halfedge* prev)
sets the previous halfedge of e along the chain, and updates the cross-pointer prev->next().

void e.set_next ( Halfedge* next)
sets the next halfedge of e along the chain, and updates the cross-pointer next->prev().

void e.set_vertex ( Vertex* v)
sets the target vertex.

void e.set_face ( Face* f)
sets the incident face, marking that e lies on the outer CCB of the face f.

void e.set_hole ( Hole* ho)
sets the incident hole, marking that e lies on an inner CCB.

void e.set_curve ( X_monotone_curve* c)
sets the associated curve of e and its opposite halfedge.

See Also

ArrangementDcel
ArrangementDcelVertex
ArrangementDcelFace
ArrangementDcelHole