|
CGAL 6.2 - 2D Snap Rounding
|
#include <CGAL/Hot_pixel_snap_rounding_traits_2.h>
CGAL::Arr_segment_traits_2< K >.
The class Hot_pixel_snap_rounding_traits_2<Kernel> is a model of the HotPixelSnapRoundingTraits_2 concept.
This class should be instantiated with an exact geometric kernel that conforms to the CGAL kernel-concept that is model of the concept Kernel.
This geometric kernel must provide an (arbitrary-precision) rational number type (FT), Point_2, Segment_2, and Iso_rectangle_2. FT must be model of RealEmbeddableTraits.
The CGAL::to_double() function is used to implement the operation that rounds the coordinates of a point to a center of a pixel. This operation is one of the traits-concept requirements. The coordinates are converted to double, rounded down to the nearest grid point, and finally adjusted to lie on a center of a pixel. Notice that if CGAL::to_double() returns the closest value, then when it rounds up a given coordinate, the resulting ISR, may be imprecise, and the distance between some vertex and a non-incident edge can be slightly less than the guaranteed half-the width-of-a-pixel.
HotPixelSnapRoundingTraits_2 Classes | |
| class | Integer_grid_point_2 |
| Functor. More... | |
| class | Minkowski_sum_with_pixel_2 |
| Functor. More... | |
| class | Snap_2 |
| Functor. More... | |
Public Member Functions | |
| Snap_2 | snap_2_object () const |
| Integer_grid_point_2 | integer_grid_point_2_object () const |
| Minkowski_sum_with_pixel_2 | minkowski_sum_with_pixel_2_object () const |
| Construct_segment_2 | construct_segment_2_object () const |
| Construct_vertex_2 | construct_vertex_2_object () const |
| Compare_y_2 | compare_y_2_object () const |
| Construct_iso_rectangle_2 | construct_iso_rectangle_2_object () const |
Public Member Functions inherited from Kernel | |
| Kernel::Construct_vector_2 | construct_vector_2_object () const |
Additional Inherited Members | |
Static Public Attributes inherited from Kernel | |
| static const bool | Has_filtered_predicates |