CGAL 6.0 - 2D Polygon Partitioning
Loading...
Searching...
No Matches
IsYMonotoneTraits_2 Concept Reference

Definition

Requirements of a traits class to be used with the function is_y_monotone_2() that tests whether a sequence of 2D points defines a \( y\)-monotone polygon or not.

Has models
CGAL::Partition_traits_2<R>
CGAL::Kernel_traits_2
See also
CGAL::Is_y_monotone_2<Traits>
CGAL::y_monotone_partition_2()
CGAL::y_monotone_partition_is_valid_2()

Types

The following two types are required:

typedef unspecified_type Point_2
 The point type of the polygon vertices.
 
typedef unspecified_type Less_yx_2
 Predicate object type that compares Point_2s lexicographically.
 

Creation

Only a copy constructor is required.

 IsYMonotoneTraits_2 (IsYMonotoneTraits_2 tr)
 

Operations

The following function that creates an instance of the above predicate object type must exist:

Less_yx_2 less_yx_2_object ()
 

Member Typedef Documentation

◆ Less_yx_2

Predicate object type that compares Point_2s lexicographically.

Must provide bool operator()(Point_2 p, Point_2 q) where true is returned iff \( p <_{xy} q\). We have \( p<_{xy}q\), iff \( p_x < q_x\) or \( p_x = q_x\) and \( p_y < q_y\), where \( p_x\) and \( p_y\) denote \( x\) and \( y\) coordinate of point \( p\) resp.