|
CGAL 6.2 - 2D Snap Rounding
|
#include <CGAL/Hot_pixel_snap_rounding_traits_2.h>
CGAL::Arr_segment_traits_2< Base_kernel >.
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, such as the Exact_predicates_exact_constructions_kernel, or Cartesian<Gmpq>.
This geometric kernel must provide an (arbitrary-precision) rational number type (FT), Point_2, Segment_2 and Iso_rectangle_2. It should be possible to cast numbers of the number type FT to double-precision representation. That is, the function CGAL::to_double(FT) must be supported.
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 requirement. 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 closet 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 Types | |
| typedef Base_kernel::FT | NT |
| typedef Base_kernel::FT | FT |
| typedef Base_kernel::Point_2 | Point_2 |
| typedef Base_kernel::Segment_2 | Segment_2 |
| typedef Base_kernel::Iso_rectangle_2 | Iso_rectangle_2 |
| typedef Base_kernel::Vector_2 | Vector_2 |
| typedef Base_kernel::Line_2 | Line_2 |
| typedef Base_kernel::Aff_transformation_2 | Aff_transformation_2 |
| typedef Base_kernel::Direction_2 | Direction_2 |
| typedef Base_kernel::Construct_vertex_2 | Construct_vertex_2 |
| typedef Base_kernel::Construct_segment_2 | Construct_segment_2 |
| typedef Base_kernel::Construct_iso_rectangle_2 | Construct_iso_rectangle_2 |
| typedef Base_kernel::Compare_y_2 | Compare_y_2 |
| typedef Base_kernel::Construct_min_vertex_2 | Construct_min_vertex_2 |
| typedef Base_kernel::Construct_max_vertex_2 | Construct_max_vertex_2 |
| typedef Base_kernel::Cartesian_const_iterator_2 | Cartesian_const_iterator_2 |
| typedef Base_kernel::Construct_cartesian_const_iterator_2 | Construct_cartesian_const_iterator_2 |
| typedef CGAL::Arr_segment_traits_2< Base_kernel > | Base_traits |
| typedef Base_traits::Compare_x_2 | Compare_x_2 |
| typedef CGAL::To_double< NT > | To_double |
Public Types inherited from CGAL::Arr_segment_traits_2< Base_kernel > | |
| typedef X_monotone_curve_2 | Curve_2 |
| typedef Kernel::Segment_2 | Segment_2 |
| typedef Kernel::Line_2 | Line_2 |
| typedef Kernel::Point_2 | Point_2 |
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 |