CGAL 5.6.3 - 2D and 3D Linear Geometry Kernel

Loading...
Searching...
No Matches
List of all members
Kernel::ConstructPoint_2 Concept Reference
2D and 3D Linear Geometry Kernel Reference » Concepts » Kernel Function Object Concepts

## Definition

Refines
  `AdaptableUnaryFunction`

See also
  `CGAL::Point_2<Kernel>`

## Operations
A model of this concept must provide:
Kernel::Point_2 | operator() (const CGAL::Origin &CGAL::ORIGIN)
| introduces a variable with Cartesian coordinates \( (0,0)\).
Kernel::Point_2 | operator() (const Kernel::Point_2 &p)
| returns `p`.
Kernel::Point_2 | operator() (const Kernel::Weighted_point_2 &wp)
| extracts the bare point from the weighted point.

## Member Function Documentation

## ◆ operator()()

Kernel::Point_2 Kernel::ConstructPoint_2::operator() | ( | const Kernel::Point_2 & | p | ) |

returns `p`.

Note
  It is advised to return a const reference to `p` to avoid useless copies.
  This peculiar requirement is necessary because some CGAL structures such as triangulations internally manipulate points whose type might be `Point_2` or `Weighted_point_2`.