CGAL 6.2 - 2D and 3D Linear Geometry Kernel

Loading...
Searching...
No Matches
List of all members
Kernel::CompareYAtX_2 Concept Reference
Reference Manual » Concepts » Kernel Function Object Concepts

## Definition

Refines
  `AdaptableTernaryFunction`

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`.
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`.
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`.
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`.
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`.
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`.

## Member Function Documentation

## ◆ operator()() [1/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()() [2/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()() [3/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()() [4/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()() [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`.