CGAL 6.1 - 2D Arrangements
Loading...
Searching...
No Matches
CGAL::Arr_segment_traits_2< Kernel > Class Template Reference

#include <CGAL/Arr_segment_traits_2.h>

Inherits from

Kernel.

Definition

template<typename Kernel>
class CGAL::Arr_segment_traits_2< Kernel >

The traits class Arr_segment_traits_2 is a model of the ArrangementTraits_2 concept, which allows the construction and maintenance of arrangements of line segments.

It is parameterized with a CGAL-kernel model that is templated in turn with a number type. To avoid numerical errors and robustness problems, the number type should support exact rational arithmetic; that is, the number type should support the arithmetic operations \( +\), \( -\), \( \times\) and \( \div\) carried out without loss of precision.

For example, instantiating the traits template with kernels that support exact predicates and exact constructions, such as Exact_predicates_exact_constructions_kernel, ensures the exact and robust operation of the application. While selecting an inexact kernel when developing a program usually leads to shorter running times, it causes robustness problems in most cases, and thus renders the program useless. The Exact_predicates_exact_constructions_kernel type is a shortcut for a kernel that uses an exact number type, that is, Gmpq (More precisely, Lazy_exact_nt<Gmpq>), when Gmpq is available. Indeed, this configuration achieves the shortest running times in many cases. If no type is provided for the kernel template parameter, then Exact_predicates_exact_constructions_kernel will be used by default.

Arr_segment_traits_2 defines Kernel::Point_2 as its point type. However, it does not define Kernel::Segment_2 as its curve type, as one may expect. The reason is that the kernel segment is represented by its two endpoints only, while the traits class needs to store extra data with its segments, in order to efficiently operate on them. Nevertheless, the nested X_monotone_curve_2 and Curve_2 types (in this case both types refer to the same class, as every line segment is (weakly) \( x\)-monotone) can however be converted to the type Kernel::Segment_2.

Arr_segment_traits_2 achieves faster running times than the Arr_non_caching_segment_traits_2<Kernel> traits-class, when arrangements with relatively many intersection points are constructed. It also allows for working with less accurate, yet computationally efficient number types, such as Quotient<MP_Float>, which represents floating-point numbers with an unbounded mantissa, but with a bounded exponent. Using this traits class is therefore highly recommended for almost all applications that rely on arrangements of line segments. On the other hand, Arr_segment_traits_2 uses more space and stores extra data with each segment, so constructing arrangements of huge sets of non-intersecting segments (or segments that intersect very sparsely) could be more efficient with the Arr_non_caching_segment_traits_2 traits-class.

While Arr_segment_traits_2 models the concept ArrangementDirectionalXMonotoneTraits_2, the implementation of the Are_mergeable_2 operation does not enforce the input curves to have the same direction as a precondition. Moreover, Arr_segment_traits_2 supports the merging of curves of opposite directions.

Is model of
ArrangementTraits_2
ArrangementLandmarkTraits_2
ArrangementDirectionalXMonotoneTraits_2
Examples
Arrangement_on_surface_2/count_and_trace.cpp, and Arrangement_on_surface_2/draw_arr.cpp.

Classes

class  Trim_2
 A functor that trims curves. More...
 
class  X_monotone_curve_2
 The X_monotone_curve_2 class nested within the traits class is used to represent segments. More...
 

Public Types

typedef X_monotone_curve_2 Curve_2
 The curve type.
 
- Public Types inherited from Kernel
typedef unspecified_type FT
 
typedef unspecified_type RT
 
typedef unspecified_type Boolean
 
typedef unspecified_type Sign
 
typedef unspecified_type Comparison_result
 
typedef unspecified_type Orientation
 
typedef unspecified_type Oriented_side
 
typedef unspecified_type Bounded_side
 
typedef unspecified_type Angle
 
typedef unspecified_type Cartesian_const_iterator_2
 
typedef unspecified_type Point_2
 
typedef unspecified_type Weighted_point_2
 
typedef unspecified_type Vector_2
 
typedef unspecified_type Direction_2
 
typedef unspecified_type Line_2
 
typedef unspecified_type Ray_2
 
typedef unspecified_type Segment_2
 
typedef unspecified_type Triangle_2
 
typedef unspecified_type Iso_rectangle_2
 
typedef unspecified_type Circle_2
 
typedef unspecified_type Object_2
 
typedef unspecified_type Construct_point_2
 
typedef unspecified_type Construct_weighted_point_2
 
typedef unspecified_type Construct_vector_2
 
typedef unspecified_type Construct_direction_2
 
typedef unspecified_type Construct_segment_2
 
typedef unspecified_type Construct_line_2
 
typedef unspecified_type Construct_ray_2
 
typedef unspecified_type Construct_circle_2
 
typedef unspecified_type Construct_triangle_2
 
typedef unspecified_type Construct_iso_rectangle_2
 
typedef unspecified_type Construct_object_2
 
typedef unspecified_type Construct_scaled_vector_2
 
typedef unspecified_type Construct_difference_of_vectors_2
 
typedef unspecified_type Construct_sum_of_vectors_2
 
typedef unspecified_type Construct_divided_vector_2
 
typedef unspecified_type Construct_translated_point_2
 
typedef unspecified_type Construct_point_on_2
 
typedef unspecified_type Construct_projected_point_2
 
typedef unspecified_type Construct_projected_xy_point_2
 
typedef unspecified_type Construct_second_point_2
 
typedef unspecified_type Construct_cartesian_const_iterator_2
 
typedef unspecified_type Construct_vertex_2
 
typedef unspecified_type Construct_bbox_2
 
typedef unspecified_type Construct_perpendicular_vector_2
 
typedef unspecified_type Construct_perpendicular_direction_2
 
typedef unspecified_type Construct_perpendicular_line_2
 
typedef unspecified_type Construct_midpoint_2
 
typedef unspecified_type Construct_equidistant_line_3
 
typedef unspecified_type Construct_center_2
 
typedef unspecified_type Construct_centroid_2
 
typedef unspecified_type Construct_barycenter_2
 
typedef unspecified_type Construct_circumcenter_2
 
typedef unspecified_type Construct_weighted_circumcenter_2
 
typedef unspecified_type Construct_bisector_2
 
typedef unspecified_type Construct_radical_axis_2
 
typedef unspecified_type Construct_radical_line_2
 
typedef unspecified_type Construct_opposite_direction_2
 
typedef unspecified_type Construct_opposite_segment_2
 
typedef unspecified_type Construct_opposite_ray_2
 
typedef unspecified_type Construct_opposite_line_2
 
typedef unspecified_type Construct_opposite_triangle_2
 
typedef unspecified_type Construct_opposite_circle_2
 
typedef unspecified_type Construct_opposite_vector_2
 
typedef unspecified_type Construct_source_2
 
typedef unspecified_type Construct_target_2
 
typedef unspecified_type Construct_max_vertex_2
 
typedef unspecified_type Construct_min_vertex_2
 
typedef unspecified_type Intersect_2
 
typedef unspecified_type Assign_2
 
typedef unspecified_type Compute_weight_2
 
typedef unspecified_type Compute_x_2
 
typedef unspecified_type Compute_y_2
 
typedef unspecified_type Compute_a_2
 
typedef unspecified_type Compute_b_2
 
typedef unspecified_type ComputeC_2
 
typedef unspecified_type Compute_dx_2
 
typedef unspecified_type Compute_dy_2
 
typedef unspecified_type Compute_hx_2
 
typedef unspecified_type Compute_hy_2
 
typedef unspecified_type Compute_hw_2
 
typedef unspecified_type Compute_L_infinity_distance_2
 
typedef unspecified_type Compute_xmax_2
 
typedef unspecified_type Compute_xmin_2
 
typedef unspecified_type Compute_ymax_2
 
typedef unspecified_type Compute_ymin_2
 
typedef unspecified_type Compute_y_at_x_2
 
typedef unspecified_type Compute_squared_distance_2
 
typedef unspecified_type Compute_squared_length_2
 
typedef unspecified_type Compute_squared_radius_2
 
typedef unspecified_type Compute_squared_radius_smallest_orthogonal_circle_2
 
typedef unspecified_type Compute_power_product_2
 
typedef unspecified_type Compute_area_2
 
typedef unspecified_type Compute_determinant_2
 
typedef unspecified_type Compute_scalar_product_2
 
typedef unspecified_type Angle_2
 
typedef unspecified_type Equal_2
 
typedef unspecified_type Equal_x_2
 
typedef unspecified_type Equal_y_2
 
typedef unspecified_type Less_x_2
 
typedef unspecified_type Less_y_2
 
typedef unspecified_type Less_xy_2
 
typedef unspecified_type Less_yx_2
 
typedef unspecified_type Compare_x_2
 
typedef unspecified_type Compare_x_at_y_2
 
typedef unspecified_type Compare_y_2
 
typedef unspecified_type Compare_xy_2
 
typedef unspecified_type Compare_yx_2
 
typedef unspecified_type Compare_y_at_x_2
 
typedef unspecified_type Compare_distance_2
 
typedef unspecified_type Compare_power_distance_2
 
typedef unspecified_type Compare_square_distance_2
 
typedef unspecified_type Compare_angle_with_x_axis_2
 
typedef unspecified_type Compare_signed_distance_to_line_2
 
typedef unspecified_type Compare_slope_2
 
typedef unspecified_type Less_distance_to_point_2
 
typedef unspecified_type Less_signed_distance_to_line_2
 
typedef unspecified_type Less_rotate_ccw_2
 
typedef unspecified_type Left_turn_2
 
typedef unspecified_type Collinear_2
 
typedef unspecified_type Orientation_2
 
typedef unspecified_type Side_of_oriented_circle_2
 
typedef unspecified_type Side_of_bounded_circle_2
 
typedef unspecified_type Power_side_of_oriented_power_circle_2
 
typedef unspecified_type Power_side_of_bounded_power_circle_2
 
typedef unspecified_type Is_horizontal_2
 
typedef unspecified_type Is_vertical_2
 
typedef unspecified_type Is_degenerate_2
 
typedef unspecified_type Has_on_2
 
typedef unspecified_type Collinear_has_on_2
 
typedef unspecified_type Has_on_bounded_side_2
 
typedef unspecified_type Has_on_unbounded_side_2
 
typedef unspecified_type Has_on_boundary_2
 
typedef unspecified_type Has_on_positive_side_2
 
typedef unspecified_type Has_on_negative_side_2
 
typedef unspecified_type Oriented_side_2
 
typedef unspecified_type Bounded_side_2
 
typedef unspecified_type Are_parallel_2
 
typedef unspecified_type Are_ordered_along_line_2
 
typedef unspecified_type Are_strictly_ordered_along_line_2
 
typedef unspecified_type Collinear_are_ordered_along_line_2
 
typedef unspecified_type Collinear_are_strictly_ordered_along_line_2
 
typedef unspecified_type Counterclockwise_in_between_2
 
typedef unspecified_type Do_intersect_2
 
typedef unspecified_type Cartesian_const_iterator_3
 
typedef unspecified_type Point_3
 
typedef unspecified_type Weighted_point_3
 
typedef unspecified_type Vector_3
 
typedef unspecified_type Direction_3
 
typedef unspecified_type Iso_cuboid_3
 
typedef unspecified_type Line_3
 
typedef unspecified_type Ray_3
 
typedef unspecified_type Circle_3
 
typedef unspecified_type Sphere_3
 
typedef unspecified_type Segment_3
 
typedef unspecified_type Plane_3
 
typedef unspecified_type Triangle_3
 
typedef unspecified_type Tetrahedron_3
 
typedef unspecified_type Object_3
 
typedef unspecified_type Construct_point_3
 
typedef unspecified_type Construct_weighted_point_3
 
typedef unspecified_type Construct_vector_3
 
typedef unspecified_type Construct_direction_3
 
typedef unspecified_type Construct_plane_3
 
typedef unspecified_type Construct_iso_cuboid_3
 
typedef unspecified_type Construct_line_3
 
typedef unspecified_type Construct_ray_3
 
typedef unspecified_type Construct_sphere_3
 
typedef unspecified_type Construct_segment_3
 
typedef unspecified_type Construct_triangle_3
 
typedef unspecified_type Construct_tetrahedron_3
 
typedef unspecified_type Construct_circle_3
 
typedef unspecified_type Construct_object_3
 
typedef unspecified_type Construct_scaled_vector_3
 
typedef unspecified_type Construct_translated_point_3
 
typedef unspecified_type Construct_point_on_3
 
typedef unspecified_type Construct_projected_point_3
 
typedef unspecified_type Construct_lifted_point_3
 
typedef unspecified_type Construct_cartesian_const_iterator_3
 
typedef unspecified_type Construct_vertex_3
 
typedef unspecified_type Construct_source_3
 
typedef unspecified_type Construct_target_3
 
typedef unspecified_type Construct_max_vertex_3
 
typedef unspecified_type Construct_min_vertex_3
 
typedef unspecified_type Construct_bbox_3
 
typedef unspecified_type Construct_supporting_plane_3
 
typedef unspecified_type Construct_orthogonal_vector_3
 
typedef unspecified_type Construct_base_vector_3
 
typedef unspecified_type Construct_difference_of_vectors_3
 
typedef unspecified_type Construct_sum_of_vectors_3
 
typedef unspecified_type Construct_divided_vector_3
 
typedef unspecified_type Construct_normal_3
 
typedef unspecified_type Construct_perpendicular_plane_3
 
typedef unspecified_type Construct_radical_plane_3
 
typedef unspecified_type Construct_perpendicular_line_3
 
typedef unspecified_type Construct_midpoint_3
 
typedef unspecified_type Construct_center_3
 
typedef unspecified_type Construct_centroid_3
 
typedef unspecified_type Construct_circumcenter_3
 
typedef unspecified_type Construct_weighted_circumcenter_3
 
typedef unspecified_type Construct_bisector_3
 
typedef unspecified_type Construct_cross_product_vector_3
 
typedef unspecified_type Construct_barycenter_3
 
typedef unspecified_type Construct_second_point_3
 
typedef unspecified_type Construct_opposite_direction_3
 
typedef unspecified_type Construct_opposite_segment_3
 
typedef unspecified_type Construct_opposite_ray_3
 
typedef unspecified_type Construct_opposite_line_3
 
typedef unspecified_type Construct_opposite_plane_3
 
typedef unspecified_type Construct_opposite_sphere_3
 
typedef unspecified_type Construct_opposite_vector_3
 
typedef unspecified_type Intersect_3
 
typedef unspecified_type Assign_3
 
typedef unspecified_type Compute_weight_3
 
typedef unspecified_type Compute_x_3
 
typedef unspecified_type Compute_y_3
 
typedef unspecified_type Compute_z_3
 
typedef unspecified_type Compute_a_3
 
typedef unspecified_type Compute_b_3
 
typedef unspecified_type Compute_c_3
 
typedef unspecified_type Compute_d_3
 
typedef unspecified_type Compute_hx_3
 
typedef unspecified_type Compute_hy_3
 
typedef unspecified_type Compute_hz_3
 
typedef unspecified_type Compute_hw_3
 
typedef unspecified_type Compute_L_infinity_distance_3
 
typedef unspecified_type Compute_dx_3
 
typedef unspecified_type Compute_dy_3
 
typedef unspecified_type Compute_dz_3
 
typedef unspecified_type Compute_xmax_3
 
typedef unspecified_type Compute_xmin_3
 
typedef unspecified_type Compute_ymax_3
 
typedef unspecified_type Compute_ymin_3
 
typedef unspecified_type Compute_zmax_3
 
typedef unspecified_type Compute_zmin_3
 
typedef unspecified_type Compute_area_3
 
typedef unspecified_type Compute_squared_area_3
 
typedef unspecified_type Compute_area_divided_by_pi_3
 
typedef unspecified_type Compute_approximate_area_3
 
typedef unspecified_type Compute_approximate_angle_3
 
typedef unspecified_type Compute_approximate_dihedral_angle_3
 
typedef unspecified_type Compute_determinant_3
 
typedef unspecified_type Compute_scalar_product_3
 
typedef unspecified_type Compute_squared_distance_3
 
typedef unspecified_type Compute_squared_length_3
 
typedef unspecified_type Compute_squared_length_divided_by_pi_square_3
 
typedef unspecified_type Compute_approximate_squared_length_3
 
typedef unspecified_type Compute_squared_radius_3
 
typedef unspecified_type Compute_volume_3
 
typedef unspecified_type Compute_power_product_3
 
typedef unspecified_type Compute_power_distance_to_power_sphere_3
 
typedef unspecified_type Compute_squared_radius_smallest_orthogonal_sphere_3
 
typedef unspecified_type Angle_3
 
typedef unspecified_type Equal_3
 
typedef unspecified_type Equal_x_3
 
typedef unspecified_type Equal_y_3
 
typedef unspecified_type Equal_z_3
 
typedef unspecified_type Equal_xy_3
 
typedef unspecified_type Less_x_3
 
typedef unspecified_type Less_y_3
 
typedef unspecified_type Less_z_3
 
typedef unspecified_type Less_xy_3
 
typedef unspecified_type Less_xyz_3
 
typedef unspecified_type Compare_weighted_squared_radius_3
 
typedef unspecified_type Compare_x_3
 
typedef unspecified_type Compare_y_3
 
typedef unspecified_type Compare_z_3
 
typedef unspecified_type Compare_xy_3
 
typedef unspecified_type Compare_xyz_3
 
typedef unspecified_type Compare_slope_3
 
typedef unspecified_type Compare_squared_distance_3
 
typedef unspecified_type Less_signed_distance_to_plane_3
 
typedef unspecified_type Less_distance_to_point_3
 
typedef unspecified_type Compare_angle_3
 
typedef unspecified_type Compare_dihedral_angle_3
 
typedef unspecified_type Compare_distance_3
 
typedef unspecified_type Compare_power_distance_3
 
typedef unspecified_type Collinear_3
 
typedef unspecified_type Coplanar_3
 
typedef unspecified_type Orientation_3
 
typedef unspecified_type Coplanar_orientation_3
 
typedef unspecified_type Coplanar_side_of_bounded_circle_3
 
typedef unspecified_type Side_of_oriented_sphere_3
 
typedef unspecified_type Side_of_bounded_sphere_3
 
typedef unspecified_type Power_side_of_oriented_power_sphere_3
 
typedef unspecified_type Power_side_of_bounded_power_sphere_3
 
typedef unspecified_type Is_degenerate_3
 
typedef unspecified_type Has_on_3
 
typedef unspecified_type Has_on_bounded_side_3
 
typedef unspecified_type Has_on_unbounded_side_3
 
typedef unspecified_type Has_on_boundary_3
 
typedef unspecified_type Has_on_positive_side_3
 
typedef unspecified_type Has_on_negative_side_3
 
typedef unspecified_type Non_zero_coordinate_index_3
 
typedef unspecified_type Oriented_side_3
 
typedef unspecified_type Bounded_side_3
 
typedef unspecified_type Are_parallel_3
 
typedef unspecified_type Are_ordered_along_line_3
 
typedef unspecified_type Are_strictly_ordered_along_line_3
 
typedef unspecified_type Collinear_are_ordered_along_line_3
 
typedef unspecified_type Collinear_are_strictly_ordered_along_line_3
 
typedef unspecified_type Do_intersect_3
 

Types

typedef Kernel::Segment_2 Segment_2
 the segment type.
 
typedef Kernel::Line_2 Line_2
 the line type.
 
typedef Kernel::Point_2 Point_2
 the point type.
 

Additional Inherited Members

- Public Member Functions inherited from Kernel
Kernel::Construct_vector_2 construct_vector_2_object () const
 
- Static Public Attributes inherited from Kernel
static const bool Has_filtered_predicates