CGAL 6.0 - 2D Hyperbolic Surface Triangulations
Loading...
Searching...
No Matches
CGAL::Hyperbolic_fundamental_domain_2< Traits > Class Template Reference

#include <CGAL/Hyperbolic_fundamental_domain_2.h>

Definition

template<class Traits>
class CGAL::Hyperbolic_fundamental_domain_2< Traits >

Represents a fundamental domain of a closed orientable hyperbolic surface.

The domain is given as a polygon \( P \) represented by the list of its vertices in the Poincaré disk model, together with a pairing of the sides of \( P \). The \( n \)-th side of \( P \) is the side between the \( n \)-th and the \( (n+1) \)-th vertex, where indices are modulo the number of vertices of \( P \). The side pairings are represented by a list of integers, such that if the \( n \)-th integer of the list is \( m \), then the \( n \)-th side is paired to the \( m \)-th side.

Template Parameters
Traitsis the traits class and must be a model of HyperbolicSurfaceTraits_2 (default model: Hyperbolic_surface_traits_2).
Examples
Hyperbolic_surface_triangulation_2/hyperbolic_surface_triangulation.cpp.

Types

typedef Traits::Hyperbolic_point_2 Point
 Point type.
 

Creation

 Hyperbolic_fundamental_domain_2 ()
 Default constructor.
 
template<class PointRange , class PairingRange >
 Hyperbolic_fundamental_domain_2 (PointRange &vertices, PairingRange &pairings)
 Constructor from vertices and pairings ranges.
 

Access Functions

int size () const
 returns the number of vertices (equivalently, the number of sides) of the domain.
 
const Pointvertex (int i) const
 returns the i-th vertex.
 
int paired_side (int i) const
 returns the index of the side paired to the i-th side.
 
Hyperbolic_isometry_2< Traits > side_pairing (int i) const
 returns the isometry that maps side \( \overline A \) to side \( A \), where \( A \) is the i-th side, and \( \overline A \) is the side paired to \( A \).
 

Input/Output

std::ostream & operator<< (std::ostream &s, const Hyperbolic_fundamental_domain_2< Traits > &domain)
 writes the domain in a stream.
 
std::istream & operator>> (std::istream &s, Hyperbolic_fundamental_domain_2< Traits > &domain)
 Reads the domain from a stream.
 

Validity

bool is_valid () const
 Validity test.
 

Constructor & Destructor Documentation

◆ Hyperbolic_fundamental_domain_2()

template<class Traits >
template<class PointRange , class PairingRange >
CGAL::Hyperbolic_fundamental_domain_2< Traits >::Hyperbolic_fundamental_domain_2 ( PointRange &  vertices,
PairingRange &  pairings 
)

Constructor from vertices and pairings ranges.

Template Parameters
PointRangea model of the concepts RandomAccessContainer whose value_type is Point.
PairingRangea model of the concepts RandomAccessContainer whose value_type is int.

Member Function Documentation

◆ is_valid()

template<class Traits >
bool CGAL::Hyperbolic_fundamental_domain_2< Traits >::is_valid ( ) const

Validity test.

Checks that the number of vertices is even, that there are as many side pairings as vertices, and that the vertices all lie within the open unit disk.

◆ operator<<()

template<class Traits >
std::ostream & CGAL::Hyperbolic_fundamental_domain_2< Traits >::operator<< ( std::ostream &  s,
const Hyperbolic_fundamental_domain_2< Traits > &  domain 
)

writes the domain in a stream.

The format of the output is the following. The first line prints the number \(n\) of vertices of the domain. For \( i=0 \) to \( n-1 \) the index of the side paired to side \( i \) is printed on a separate line. For \( i=0 \) to \( n-1 \) the i-th vertex is printed on a separate line.

Precondition
is_valid()

◆ operator>>()

template<class Traits >
std::istream & CGAL::Hyperbolic_fundamental_domain_2< Traits >::operator>> ( std::istream &  s,
Hyperbolic_fundamental_domain_2< Traits > &  domain 
)

Reads the domain from a stream.

The format of the input must be the same as the format of the output of 'operator<<()'.

◆ paired_side()

template<class Traits >
int CGAL::Hyperbolic_fundamental_domain_2< Traits >::paired_side ( int  i) const

returns the index of the side paired to the i-th side.

Precondition
is_valid()

◆ side_pairing()

template<class Traits >
Hyperbolic_isometry_2< Traits > CGAL::Hyperbolic_fundamental_domain_2< Traits >::side_pairing ( int  i) const

returns the isometry that maps side \( \overline A \) to side \( A \), where \( A \) is the i-th side, and \( \overline A \) is the side paired to \( A \).

Precondition
is_valid()

◆ size()

template<class Traits >
int CGAL::Hyperbolic_fundamental_domain_2< Traits >::size ( ) const

returns the number of vertices (equivalently, the number of sides) of the domain.

Precondition
is_valid()

◆ vertex()

template<class Traits >
const Point & CGAL::Hyperbolic_fundamental_domain_2< Traits >::vertex ( int  i) const

returns the i-th vertex.

Precondition
is_valid()