CGAL 5.1.1 - 2D Periodic Triangulations
|
#include <CGAL/Periodic_2_triangulation_face_base_2.h>
The class Periodic_2_triangulation_face_base_2
is a model of the concept Periodic_2TriangulationFaceBase_2
to be used by Triangulation_data_structure_2
to represent faces of a periodic triangulation.
The first one Traits
is the geometric traits, it is to be instantiated by a model of the concept Periodic_2TriangulationTraits_2
. The second argument is the base class to which the additional information for the periodic vertex is added and should be a model of TriangulationDSFaceBase_2
As faces cannot span more than one domain per direction of space in a periodic Delaunay triangulation, it is enough to store offsets in the range \( \{0,1\}^2\). For optimization purposes we encode all three offsets in one integer. Each offset needs two bits (for the offset in the \( x\)- and \( y\)-direction). If we number the bits from least significant to most significant then bits \( 2*i\) and \( 2*i+1\) contain the offset corresponding to vertex \( i\).
The implementation of has_zero_offsets()
results in checking whether all offsets are zero.