CGAL 5.4.1 - 2D and 3D Linear Geometry Kernel

Definition

compare2.png
Refines:
AdaptableFunctor (with three arguments)

See also
CGAL::compare_y_at_x()

Operations

A model of this concept must provide:

Comparison_result operator() (const Kernel::Point_2 &p, const Kernel::Line_2 &h)
 compares the \( y\)-coordinates of p and the vertical projection of p on h. More...
 
Comparison_result operator() (const Kernel::Point_2 &p, const Kernel::Line_2 &h1, const Kernel::Line_2 &h2)
 This function compares the y-coordinates of the vertical projection of p on h1 and on h2. More...
 
Comparison_result operator() (const Kernel::Line_2 &l1, const Kernel::Line_2 &l2, const Kernel::Line_2 &h)
 Let p be the intersection of lines l1 and l2. More...
 
Comparison_result operator() (const Kernel::Line_2 &l1, const Kernel::Line_2 &l2, const Kernel::Line_2 &h1, const Kernel::Line_2 &h2)
 Let p be the intersection of lines l1 and l2. More...
 
Comparison_result operator() (const Kernel::Point_2 &p, const Kernel::Segment_2 &s)
 compares the y-coordinates of p and the vertical projection of p on s. More...
 
Comparison_result operator() (const Kernel::Point_2 &p, const Kernel::Segment_2 &s1, const Kernel::Segment_2 &s2)
 This function compares the \( y\)-coordinates of the vertical projection of p on s1 and on s2. More...
 

Member Function Documentation

◆ operator()() [1/6]

Comparison_result Kernel::CompareYAtX_2::operator() ( const Kernel::Point_2 p,
const Kernel::Line_2 h 
)

compares the \( y\)-coordinates of p and the vertical projection of p on h.

See Figure fig-compare2 (e).

Precondition
h is not vertical.

◆ operator()() [2/6]

Comparison_result Kernel::CompareYAtX_2::operator() ( const Kernel::Point_2 p,
const Kernel::Line_2 h1,
const Kernel::Line_2 h2 
)

This function compares the y-coordinates of the vertical projection of p on h1 and on h2.

See Figure fig-compare2 (e).

Precondition
h1 and h2 are not vertical.

◆ operator()() [3/6]

Comparison_result Kernel::CompareYAtX_2::operator() ( const Kernel::Line_2 l1,
const Kernel::Line_2 l2,
const Kernel::Line_2 h 
)

Let p be the intersection of lines l1 and l2.

This function compares the \( y\)-coordinates of p and the vertical projection of p on h. See (Figure fig-compare2 (f)).

Precondition
l1, l2 intersect and h is not vertical.

◆ operator()() [4/6]

Comparison_result Kernel::CompareYAtX_2::operator() ( const Kernel::Line_2 l1,
const Kernel::Line_2 l2,
const Kernel::Line_2 h1,
const Kernel::Line_2 h2 
)

Let p be the intersection of lines l1 and l2.

This function compares the y-coordinates of the vertical projection of p on h1 and on h2. See (Figure fig-compare2 (g)).

Precondition
l1 and l2 intersect; h1 and h2 are not vertical.

◆ operator()() [5/6]

Comparison_result Kernel::CompareYAtX_2::operator() ( const Kernel::Point_2 p,
const Kernel::Segment_2 s 
)

compares the y-coordinates of p and the vertical projection of p on s.

If s is vertical, then return CGAL::EQUAL when p lies on s, CGAL::SMALLER when p lies under s, and CGAL::LARGER otherwise.

Precondition
p is within the x range of s.

◆ operator()() [6/6]

Comparison_result Kernel::CompareYAtX_2::operator() ( const Kernel::Point_2 p,
const Kernel::Segment_2 s1,
const Kernel::Segment_2 s2 
)

This function compares the \( y\)-coordinates of the vertical projection of p on s1 and on s2.

If s1 or s2 is vertical, then return CGAL::EQUAL if they intersect, otherwise return CGAL::SMALLER if s1 lies below s2, and return CGAL::LARGER otherwise.

Precondition
p is within the x range of s1 and s2.