CGAL 6.1 - 2D and 3D Linear Geometry Kernel

Loading...
Searching...
No Matches
CGAL::Filtered_kernel_adaptor< CK > Struct Template Reference
Reference Manual » Kernel Classes

`#include <CGAL/Filtered_kernel.h>`

## Definition

template<typename CK>
struct CGAL::Filtered_kernel_adaptor< CK >

`Filtered_kernel_adaptor` is a kernel that uses a filtering technique to obtain a kernel with exact and efficient predicate functors.

The geometric constructions are exactly those of the kernel `CK`, which means that they are not necessarily exact. More details about the filtering technique can be found in [1].

In contrast to `Filtered_kernel`, the global functions are those of `CK`.

Is model of
  `Kernel`

Example

The following example shows how to produce a kernel whose geometric objects and constructions are those of `Simple_cartesian<double>` The predicate functors of the kernel are exact, the global functions are not.

#include <CGAL/Simple_cartesian.h>
#include <CGAL/Filtered_kernel.h>
typedef CGAL::Simple_cartesian<double> CK;
typedef CGAL::Filtered_kernel_adaptor<CK> K;
typedef K::Point_2 p(0,0), q(1,1), r(1,5);
CGAL::orientation(p,q,r); // not exact
typedef K::Orientation_2 orientation;
orientation(p,q,r); // exact
CGAL::orientation
Orientation orientation(ForwardIterator first, ForwardIterator last)
CGAL::Filtered_kernel_adaptor
Filtered_kernel_adaptor is a kernel that uses a filtering technique to obtain a kernel with exact and...
Definition: Filtered_kernel.h:43
CGAL::Simple_cartesian
A model for a Kernel using Cartesian coordinates to represent the geometric objects.
Definition: Simple_cartesian.h:31

Examples
  Kernel_23/MyKernel.cpp.