CGAL 6.1 - 2D and 3D Linear Geometry Kernel

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

## Definition

Refines
  `AdaptableBinaryFunction`

See also
  `CGAL::Line_2<Kernel>`
  `CGAL::Ray_2<Kernel>`
  `CGAL::Segment_2<Kernel>`

## Operations
A model of this concept must provide:
Kernel::Point_2 | operator() (const Kernel::Line_2 &l, const Kernel::FT i)
| returns an arbitrary point on `l`.
Kernel::Point_2 | operator() (const Kernel::Ray_2 &r, const Kernel::FT i)
| returns a point on `r`.
Kernel::Point_2 | operator() (const Kernel::Segment_2 &s, int i)
| returns source or target of `s`: `point(0)` returns the source of `s`, `point(1)` returns the target of `s`.

## Member Function Documentation

## ◆ operator()() [1/3]

Kernel::Point_2 Kernel::ConstructPointOn_2::operator() | ( | const Kernel::Line_2 & | l,
|  | const Kernel::FT | i
| ) |  |

returns an arbitrary point on `l`.

It holds `point(i) == point(j)`, iff `i==j`. Furthermore, is directed from `point(i)` to `point(j)`, for all `i < j`.

## ◆ operator()() [2/3]

Kernel::Point_2 Kernel::ConstructPointOn_2::operator() | ( | const Kernel::Ray_2 & | r,
|  | const Kernel::FT | i
| ) |  |

returns a point on `r`.

`point(0)` is the source, `point(i)`, with `i>0`, is different from the source.

Precondition
  `i>= 0`.

## ◆ operator()() [3/3]

Kernel::Point_2 Kernel::ConstructPointOn_2::operator() | ( | const Kernel::Segment_2 & | s,
|  | int | i
| ) |  |

returns source or target of `s`: `point(0)` returns the source of `s`, `point(1)` returns the target of `s`.

The parameter `i` is taken modulo 2, which gives easy access to the other end point.