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

2D Transformations

CGAL provides affine transformations. The 2D primitive objects in CGAL are closed under affine transformations except for iso-oriented objects, bounding boxes, and circles.

The general form of an affine transformation is based on homogeneous representation of points. Thereby all transformations can be realized by matrix multiplication.

Since the general form is based on the homogeneous representation, a transformation matrix multiplication by a scalar does not change the represented transformation. Therefore, any transformation represented by a matrix with rational entries can be represented by a transformation matrix with integer entries as well by multiplying the matrix with the common denominator of the rational entries. Hence it is sufficient to have number type R::RT for the entries of an affine transformation.

CGAL offers several specialized affine transformations. Different constructors are provided to create them. They are parameterized with a symbolic name to denote the transformation type, followed by additional parameters. The symbolic name tags solve ambiguities in the function overloading and they make the code more readable, i.e. what type of transformation is created. These name tags are constants of an appropriate type.

const CGAL_Translation
CGAL_TRANSLATION;

const CGAL_Rotation
CGAL_ROTATION;

const CGAL_Scaling CGAL_SCALING;


Next chapter: 2D Intersections
Navigation: Up, Table of Contents, Bibliography, Index, Title Page
The CGAL Project. Wed, January 20, 1999.