CGAL 5.1 - 2D Arrangements
ArrangementDcelHalfedge Class Reference

#include <Concepts/ArrangementDcelHalfedge.h>

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.

See also
ArrangementDcel
ArrangementDcelVertex
ArrangementDcelFace
ArrangementDcelHole

Types

typedef unspecified_type Vertex
 the corresponding Dcel vertex type. More...
 
typedef unspecified_type Face
 the corresponding Dcel face type. More...
 
typedef unspecified_type Hole
 the corresponding Dcel hole type. More...
 
typedef unspecified_type X_monotone_curve
 the curve type associated with the edge. More...
 

Creation

 Arr_dcel_halfedge ()
 default constructor. More...
 
void assign (const Self &other)
 assigns e with the contents of the other halfedge. More...
 

Access Functions

Arr_halfedge_direction direction () const
 returns ARR_LEFT_TO_RIGHT if e's source vertex is lexicographically smaller than it target, and ARR_RIGHT_TO_LEFT if it is lexicographically larger than the target. More...
 
bool is_on_hole () const
 determines whether the e lies on an outer CCB of a bounded face, or on an inner CCB (a hole inside a face). More...
 

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

Halfedge * opposite ()
 returns the twin halfedge. More...
 
Halfedge * prev ()
 returns the previous halfedge along the chain. More...
 
Halfedge * next ()
 returns the next halfedge along the chain. More...
 
Vertexvertex ()
 returns the target vertex. More...
 
Faceface ()
 returns the incident face. More...
 
Holehole ()
 returns the hole (inner CCB) e belongs to. More...
 
bool has_null_curve () const
 returns whether the vertex is not associated with a valid curve. More...
 
X_monotone_curvecurve ()
 returns the associated curve. More...
 

Modifiers

void set_opposite (Halfedge *opp)
 sets the opposite halfedge. More...
 
void set_direction (Arr_halfedge_direction dir)
 sets the lexicographical order between e's source and target vertices to be dir. More...
 
void set_prev (Halfedge *prev)
 sets the previous halfedge of e along the chain, and updates the cross-pointer prev->next(). More...
 
void set_next (Halfedge *next)
 sets the next halfedge of e along the chain, and updates the cross-pointer next->prev(). More...
 
void set_vertex (Vertex *v)
 sets the target vertex. More...
 
void set_face (Face *f)
 sets the incident face, marking that e lies on the outer CCB of the face f. More...
 
void set_hole (Hole *ho)
 sets the incident hole, marking that e lies on an inner CCB. More...
 
void set_curve (X_monotone_curve *c)
 sets the associated curve of e and its opposite halfedge. More...
 

Member Typedef Documentation

◆ Face

typedef unspecified_type ArrangementDcelHalfedge::Face

the corresponding Dcel face type.

◆ Hole

typedef unspecified_type ArrangementDcelHalfedge::Hole

the corresponding Dcel hole type.

◆ Vertex

typedef unspecified_type ArrangementDcelHalfedge::Vertex

the corresponding Dcel vertex type.

◆ X_monotone_curve

the curve type associated with the edge.

Member Function Documentation

◆ Arr_dcel_halfedge()

ArrangementDcelHalfedge::Arr_dcel_halfedge ( )

default constructor.

◆ assign()

void ArrangementDcelHalfedge::assign ( const Self &  other)

assigns e with the contents of the other halfedge.

◆ curve()

X_monotone_curve& ArrangementDcelHalfedge::curve ( )

returns the associated curve.

Precondition
e is associated with a valid curve.

◆ direction()

Arr_halfedge_direction ArrangementDcelHalfedge::direction ( ) const

returns ARR_LEFT_TO_RIGHT if e's source vertex is lexicographically smaller than it target, and ARR_RIGHT_TO_LEFT if it is lexicographically larger than the target.

◆ face()

Face* ArrangementDcelHalfedge::face ( )

returns the incident face.

Precondition
e lies on the outer boundary of this face.

◆ has_null_curve()

bool ArrangementDcelHalfedge::has_null_curve ( ) const

returns whether the vertex is not associated with a valid curve.

◆ hole()

Hole* ArrangementDcelHalfedge::hole ( )

returns the hole (inner CCB) e belongs to.

Precondition
e lies on a hole inside its incident face.

◆ is_on_hole()

bool ArrangementDcelHalfedge::is_on_hole ( ) const

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.

◆ next()

Halfedge* ArrangementDcelHalfedge::next ( )

returns the next halfedge along the chain.

◆ opposite()

Halfedge* ArrangementDcelHalfedge::opposite ( )

returns the twin halfedge.

◆ prev()

Halfedge* ArrangementDcelHalfedge::prev ( )

returns the previous halfedge along the chain.

◆ set_curve()

void ArrangementDcelHalfedge::set_curve ( X_monotone_curve c)

sets the associated curve of e and its opposite halfedge.

◆ set_direction()

void ArrangementDcelHalfedge::set_direction ( Arr_halfedge_direction  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.

◆ set_face()

void ArrangementDcelHalfedge::set_face ( Face f)

sets the incident face, marking that e lies on the outer CCB of the face f.

◆ set_hole()

void ArrangementDcelHalfedge::set_hole ( Hole ho)

sets the incident hole, marking that e lies on an inner CCB.

◆ set_next()

void ArrangementDcelHalfedge::set_next ( Halfedge *  next)

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

◆ set_opposite()

void ArrangementDcelHalfedge::set_opposite ( Halfedge *  opp)

sets the opposite halfedge.

◆ set_prev()

void ArrangementDcelHalfedge::set_prev ( Halfedge *  prev)

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

◆ set_vertex()

void ArrangementDcelHalfedge::set_vertex ( Vertex v)

sets the target vertex.

◆ vertex()

Vertex* ArrangementDcelHalfedge::vertex ( )

returns the target vertex.