CGAL 5.1 - Halfedge Data Structures
HalfedgeDSHalfedge Class Reference

#include <Concepts/HalfedgeDSHalfedge.h>

Definition

The concept HalfedgeDSHalfedge defines the requirements for the local Halfedge type in the HalfedgeDS concept. It is also required in the Halfedge_wrapper<Refs,Traits> member class template of an items class, see the HalfedgeDSItems concept.

A halfedge is an oriented edge between two vertices. It is always paired with a halfedge pointing in the opposite direction. The opposite() member function returns this halfedge of opposite orientation. The next() member function points to the successor halfedge along the face - or if the halfedge is a border halfedge - along the open region. A halfedge optionally stores a reference to the previous halfedge along the face, a reference to an incident vertex, and a reference to an incident face. Type tags indicate whether the related member functions are supported. Figure figureHalfedgeDSOptionalMethods depicts the relationship between a halfedge and its incident halfedges, vertices, and faces.

The three classes Vertex, Halfedge, and Face of the halfedge data structure. Member functions with shaded background are mandatory. The others are optionally supported.

For the protection of the integrity of the data structure classes such as CGAL::Polyhedron_3 are allowed to redefine the modifying member functions to be private. In order to make them accessible for the halfedge data structure they must be derived from a base class Base where the modifying member functions are still public. Even more protection is provided for the set_opposite() member function. The base class Base_base provides access to it. (The protection could be bypassed also by an user, but not by accident.)

Has Models:

CGAL::HalfedgeDS_halfedge_base

CGAL::HalfedgeDS_halfedge_min_base

See also
HalfedgeDS<Traits,Items,Alloc>
HalfedgeDSItems
HalfedgeDSVertex
HalfedgeDSFace

Types

typedef unspecified_type HalfedgeDS
 instantiated HalfedgeDS ( \( \equiv\) Refs). More...
 
typedef unspecified_type Base
 base class that allows modifications. More...
 
typedef unspecified_type Base_base
 base class to access set_opposite(). More...
 
typedef unspecified_type Vertex
 model of HalfedgeDSVertex. More...
 
typedef unspecified_type Face
 model of HalfedgeDSFace. More...
 
typedef unspecified_type Vertex_handle
 handle to vertex. More...
 
typedef unspecified_type Halfedge_handle
 handle to halfedge. More...
 
typedef unspecified_type Face_handle
 handle to face. More...
 
typedef unspecified_type Vertex_const_handle
 
typedef unspecified_type Halfedge_const_handle
 
typedef unspecified_type Face_const_handle
 
typedef unspecified_type Supports_halfedge_prev
 CGAL::Tag_true or CGAL::Tag_false. More...
 
typedef unspecified_type Supports_halfedge_vertex
 CGAL::Tag_true or CGAL::Tag_false. More...
 
typedef unspecified_type Supports_halfedge_face
 CGAL::Tag_true or CGAL::Tag_false. More...
 

Creation

 Halfedge ()
 default constructor. More...
 

Operations

Halfedge_handle opposite ()
 
Halfedge_const_handle opposite () const
 the opposite halfedge. More...
 
void set_opposite (Halfedge_handle h)
 sets opposite halfedge to h. More...
 
Halfedge_handle next ()
 
Halfedge_const_handle next () const
 the next halfedge around the face. More...
 
void set_next (Halfedge_handle h)
 sets next halfedge to h. More...
 
bool is_border () const
 is true if the halfedge is a border halfedge. More...
 

Operations available if Supports_halfedge_prev == CGAL::Tag_true

Halfedge_handle prev ()
 
Halfedge_const_handle prev () const
 the previous halfedge around the face. More...
 
void set_prev (Halfedge_handle h)
 sets prev halfedge to h. More...
 

Operations available if Supports_halfedge_vertex == CGAL::Tag_true

Vertex_handle vertex ()
 
Vertex_const_handle vertex () const
 the incident vertex of h. More...
 
void set_vertex (Vertex_handle v)
 sets incident vertex to v. More...
 

Operations available if Supports_halfedge_face == CGAL::Tag_true

Face_handle face ()
 
Face_const_handle face () const
 the incident face of the halfedge. More...
 
void set_face (Face_handle f)
 sets incident face to f. More...
 

Member Typedef Documentation

◆ Base

typedef unspecified_type HalfedgeDSHalfedge::Base

base class that allows modifications.

◆ Base_base

typedef unspecified_type HalfedgeDSHalfedge::Base_base

base class to access set_opposite().

◆ Face

typedef unspecified_type HalfedgeDSHalfedge::Face

model of HalfedgeDSFace.

◆ Face_const_handle

typedef unspecified_type HalfedgeDSHalfedge::Face_const_handle

◆ Face_handle

typedef unspecified_type HalfedgeDSHalfedge::Face_handle

handle to face.

◆ Halfedge_const_handle

◆ Halfedge_handle

typedef unspecified_type HalfedgeDSHalfedge::Halfedge_handle

handle to halfedge.

◆ HalfedgeDS

typedef unspecified_type HalfedgeDSHalfedge::HalfedgeDS

instantiated HalfedgeDS ( \( \equiv\) Refs).

◆ Supports_halfedge_face

◆ Supports_halfedge_prev

◆ Supports_halfedge_vertex

◆ Vertex

typedef unspecified_type HalfedgeDSHalfedge::Vertex

model of HalfedgeDSVertex.

◆ Vertex_const_handle

typedef unspecified_type HalfedgeDSHalfedge::Vertex_const_handle

◆ Vertex_handle

typedef unspecified_type HalfedgeDSHalfedge::Vertex_handle

handle to vertex.

Member Function Documentation

◆ face() [1/2]

Face_handle HalfedgeDSHalfedge::face ( )

◆ face() [2/2]

Face_const_handle HalfedgeDSHalfedge::face ( ) const

the incident face of the halfedge.

If the halfedge is a border halfedge the result is default construction of the handle.

◆ Halfedge()

HalfedgeDSHalfedge::Halfedge ( )

default constructor.

◆ is_border()

bool HalfedgeDSHalfedge::is_border ( ) const

is true if the halfedge is a border halfedge.

◆ next() [1/2]

Halfedge_handle HalfedgeDSHalfedge::next ( )

◆ next() [2/2]

Halfedge_const_handle HalfedgeDSHalfedge::next ( ) const

the next halfedge around the face.

◆ opposite() [1/2]

Halfedge_handle HalfedgeDSHalfedge::opposite ( )

◆ opposite() [2/2]

Halfedge_const_handle HalfedgeDSHalfedge::opposite ( ) const

the opposite halfedge.

◆ prev() [1/2]

Halfedge_handle HalfedgeDSHalfedge::prev ( )

◆ prev() [2/2]

Halfedge_const_handle HalfedgeDSHalfedge::prev ( ) const

the previous halfedge around the face.

◆ set_face()

void HalfedgeDSHalfedge::set_face ( Face_handle  f)

sets incident face to f.

◆ set_next()

void HalfedgeDSHalfedge::set_next ( Halfedge_handle  h)

sets next halfedge to h.

◆ set_opposite()

void HalfedgeDSHalfedge::set_opposite ( Halfedge_handle  h)

sets opposite halfedge to h.

◆ set_prev()

void HalfedgeDSHalfedge::set_prev ( Halfedge_handle  h)

sets prev halfedge to h.

◆ set_vertex()

void HalfedgeDSHalfedge::set_vertex ( Vertex_handle  v)

sets incident vertex to v.

◆ vertex() [1/2]

Vertex_handle HalfedgeDSHalfedge::vertex ( )

◆ vertex() [2/2]

Vertex_const_handle HalfedgeDSHalfedge::vertex ( ) const

the incident vertex of h.