The traits class Arr_linear_traits_2<Kernel> is a model of the ArrangementTraits_2 concept that allows for the construction and maintenance of arrangements of linear objects which may be bounded (line segments) or unbounded (rays and lines). The traits class is parameterized with a Cgalkernel model; see the reference page of Arr_segment_traits_2<Kernel> () for further explanations and recommendations on choosing a kernel.
Arr_linear_traits_2<Kernel> defines Kernel::Point_2 as its point type. The nested X_monotone_curve_2 and Curve_2 types defined by the traits class (as is the case with the various segmenttraits classes, both types refer to the same class, as every linear object is (weakly) xmonotone), are constructible from a point, a line segment, a ray and from a line (objects of types Kernel::Point_2, Kernel::Segment_2, Kernel::Ray_2 and Kernel::Line_2, respectively). On the other hand, when we are given a curve we can find out its actual type and convert it to the respective kernel object (say, to a Kernel::Ray_2).
#include <CGAL/Arr_linear_traits_2.h>
The Curve_2 (and the X_monotone_curve_2) class nested within the lineartraits can represent all types of linear objects. The class supports the copy and default constructor and the assignment operator. In addition, the operator<< and operator>> for linear objects are defined for standard output and input streams.



 







 
constructs an degenerate curve equivalent to the point p.
 
 
constructs an line segment.
 
 
constructs a ray.
 
 
constructs a line.


 returns whether c is a point (a degenerate curve).  


returns a point object equivalent to c.
 

 returns whether c is a segment (has two bounded endpoints).  


returns a segment object equivalent to c.
 

 returns whether c is a ray (has a bounded source point and its other end is unbounded).  


returns a ray object equivalent to c.
 

 returns whether c is a line (has only unbounded ends).  


returns a line object equivalent to c.
 


returns the supporting line of c.
 


returns c's source point.
 


returns c's target point.
