CGAL 6.0 - 2D Hyperbolic Surface Triangulations
|
#include <CGAL/Hyperbolic_fundamental_domain_2.h>
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.
Traits | is the traits class and must be a model of HyperbolicSurfaceTraits_2 (default model: Hyperbolic_surface_traits_2 ). |
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 Point & | vertex (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. | |
CGAL::Hyperbolic_fundamental_domain_2< Traits >::Hyperbolic_fundamental_domain_2 | ( | PointRange & | vertices, |
PairingRange & | pairings | ||
) |
Constructor from vertices and pairings ranges.
PointRange | a model of the concepts RandomAccessContainer whose value_type is Point . |
PairingRange | a model of the concepts RandomAccessContainer whose value_type is int . |
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.
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.
is_valid()
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<<()'.
int CGAL::Hyperbolic_fundamental_domain_2< Traits >::paired_side | ( | int | i | ) | const |
returns the index of the side paired to the i-th side.
is_valid()
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 \).
is_valid()
int CGAL::Hyperbolic_fundamental_domain_2< Traits >::size | ( | ) | const |
returns the number of vertices (equivalently, the number of sides) of the domain.
is_valid()
const Point & CGAL::Hyperbolic_fundamental_domain_2< Traits >::vertex | ( | int | i | ) | const |
returns the i-th vertex.
is_valid()