Navigation: Up, Table of Contents, Bibliography, Index, Title Page

## CGAL::Cartesian_converter<K1, K2, NTConverter>

### Definition

Cartesian_converter<K1, K2, NTConverter>converts objects from the kernel traits K1 to the kernel traits K2 using Converter to do the conversion. Those traits must be of the form Cartesian<FT1> and Cartesian<FT2> (or the equivalent with Simple_cartesian). It then provides the following operators to convert objects from K1 to K2.

The third template parameter NTConverter is a function object that must provide K2::FT operator()(K1::FT n) that converts n to an K2::FT which has the same value.

The default value of this parameter is CGAL::NT_converter<K1::FT, K2::FT>.

#include <CGAL/Cartesian_converter.h>

### Creation

Cartesian_converter<K1, K2, NTConverter> conv;
| Default constructor.

### Operations

K2::Point_2 | conv.operator() ( K1::Point_2 p)
|  | returns a K2::Point_2 which coordinates are those of p, converted by NTConverter.

Similar operators are defined for the other kernel traits types Point_3, Vector_2...

### See Also

CGAL::Cartesian<FieldNumberType>
CGAL::Simple_cartesian<FieldNumberType>

Next: cartesian_to_homogeneous

Navigation: Table of Contents, Bibliography, Index, Title Page

The CGAL Project . Tue, December 21, 2004 .