CGAL 6.1 - 2D Arrangements
|
#include <Concepts/AosDcelHalfedge.h>
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 | |
typedef unspecified_type | Vertex |
the corresponding DCEL vertex type. | |
typedef unspecified_type | Face |
the corresponding DCEL face type. | |
typedef unspecified_type | Hole |
the corresponding DCEL hole type. | |
typedef unspecified_type | X_monotone_curve |
the curve type associated with the edge. | |
Creation | |
Arr_dcel_halfedge () | |
default constructor. | |
void | assign (const Self &other) |
assigns e with the contents of the other halfedge. | |
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. | |
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). | |
All functions below also have | |
Halfedge * | opposite () |
returns the twin halfedge. | |
Halfedge * | prev () |
returns the previous halfedge along the chain. | |
Halfedge * | next () |
returns the next halfedge along the chain. | |
Vertex * | vertex () |
returns the target vertex. | |
Face * | face () |
returns the incident face. | |
Hole * | hole () |
returns the hole (inner CCB) e belongs to. | |
bool | has_null_curve () const |
returns whether the vertex is not associated with a valid curve. | |
X_monotone_curve & | curve () |
returns the associated curve. | |
Modifiers | |
void | set_opposite (Halfedge *opp) |
sets the opposite halfedge. | |
void | set_direction (Arr_halfedge_direction dir) |
sets the lexicographical order between e 's source and target vertices to be dir . | |
void | set_prev (Halfedge *prev) |
sets the previous halfedge of e along the chain, and updates the cross-pointer prev->next() . | |
void | set_next (Halfedge *next) |
sets the next halfedge of e along the chain, and updates the cross-pointer next->prev() . | |
void | set_vertex (Vertex *v) |
sets the target vertex. | |
void | set_face (Face *f) |
sets the incident face, marking that e lies on the outer CCB of the face f . | |
void | set_hole (Hole *ho) |
sets the incident hole, marking that e lies on an inner CCB. | |
void | set_curve (X_monotone_curve *c) |
sets the associated curve of e and its opposite halfedge. | |
the corresponding DCEL face type.
the corresponding DCEL hole type.
the corresponding DCEL vertex type.
the curve type associated with the edge.
AosDcelHalfedge::Arr_dcel_halfedge | ( | ) |
default constructor.
void AosDcelHalfedge::assign | ( | const Self & | other | ) |
assigns e
with the contents of the other
halfedge.
X_monotone_curve & AosDcelHalfedge::curve | ( | ) |
returns the associated curve.
e
is associated with a valid curve. Arr_halfedge_direction AosDcelHalfedge::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 * AosDcelHalfedge::face | ( | ) |
returns the incident face.
e
lies on the outer boundary of this face. bool AosDcelHalfedge::has_null_curve | ( | ) | const |
returns whether the vertex is not associated with a valid curve.
Hole * AosDcelHalfedge::hole | ( | ) |
returns the hole (inner CCB) e
belongs to.
e
lies on a hole inside its incident face. bool AosDcelHalfedge::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.
Halfedge * AosDcelHalfedge::next | ( | ) |
returns the next halfedge along the chain.
Halfedge * AosDcelHalfedge::opposite | ( | ) |
returns the twin halfedge.
Halfedge * AosDcelHalfedge::prev | ( | ) |
returns the previous halfedge along the chain.
void AosDcelHalfedge::set_curve | ( | X_monotone_curve * | c | ) |
sets the associated curve of e
and its opposite halfedge.
void AosDcelHalfedge::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.
void AosDcelHalfedge::set_face | ( | Face * | f | ) |
sets the incident face, marking that e
lies on the outer CCB of the face f
.
void AosDcelHalfedge::set_hole | ( | Hole * | ho | ) |
sets the incident hole, marking that e
lies on an inner CCB.
void AosDcelHalfedge::set_next | ( | Halfedge * | next | ) |
sets the next halfedge of e
along the chain, and updates the cross-pointer next->prev()
.
void AosDcelHalfedge::set_opposite | ( | Halfedge * | opp | ) |
sets the opposite halfedge.
void AosDcelHalfedge::set_prev | ( | Halfedge * | prev | ) |
sets the previous halfedge of e
along the chain, and updates the cross-pointer prev->next()
.
void AosDcelHalfedge::set_vertex | ( | Vertex * | v | ) |
sets the target vertex.
Vertex * AosDcelHalfedge::vertex | ( | ) |
returns the target vertex.