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

Cartesian Representation (Cartesian)

#include <CGAL/Cartesian.h>

With Cartesian<FT> you can choose Cartesian representation of coordinates. When you choose Cartesian representation you have to declare at the same time the type of the coordinates. A number type used with the Cartesian representation class should be a field type as described above. As mentioned above, the built-in type int is not a field type. However, for some computations with Cartesian representation, no division operation is needed, i.e., a ring type is sufficient in this case.)

The declaration for a point with FT = double and with coordinates (1/3, 5/3) looks as follows:

  Point_2< Cartesian<double> > p(1.0/3.0, 5.0/3.0);

The keyword double makes that the program allocates memory for storing the x and y coordinate in double precision format.

With Cartesian<NT>, both Cartesian<NT>::FT and Cartesian<NT>::RT are mapped to number type NT.


Next: Class declaration of Homogeneous<RT>
Navigation: Up, Table of Contents, Bibliography, Index, Title Page
The GALIA project. Jan 18, 2000.