\chapter{Introduction} \cgal, the {\em Computational Geometry Algorithms Library}, is written in \CC\ and consists of three parts. The first part is the kernel, which consists of constant size non-modifiable geometric primitive objects and operations on these objects. The objects are parameterized by a representation class, which specifies the coordinate representation and the underlying number types used for calculations. The second part is a collection of basic geometric data structures and algorithms. These algorithms and data structures are parameterized by traits classes defining the interface and encapsulating the interaction between data structure or algorithm and the types and primitive operations it uses. %These algorithms and data structures are parameterized by traits classes that define the %interface between the data structure or algorithm, and the primitives they use. The third part consists of non-geometric support facilities, such as `circulators', random sources, I/O support for debugging and for interfacing \cgal\ to various visualization tools. \section{Organization} This part of the Reference Manual gives information that is relevant to all three parts of the library. Part~1 of this Reference Manual covers the kernel, part~2 the basic library, and part~3 the support library. Additional documents accompanying the {\cgal} distribution are the `Installation Guide', `The Use of STL and STL Extensions in {\cgal}', and `Getting Started with {\cgal}'. The second document gives a manual style introduction to STL constructs such as iterators and containers, as well an extension, called circulator, used in many places in {\cgal}. The third document gives an introduction in {\cgal} programming for the novice user. \begin{ccAdvanced} Some functionality is considered more advanced. Such functionality is described in sections like this one, bounded by horizontal brackets. \end{ccAdvanced} \section{Namespace CGAL} All names introduced by \cgal, especially those documented in these manuals, are in a namespace called \ccc{CGAL}, which is in global scope.\footnote{Removing prefix \ccc{CGAL_} and introducing namespace \ccc{CGAL} is the major difference between releases 1.2 and 2.0} A user can either qualify names from \cgal\ by adding \ccc{CGAL::}, e.g.\ \ccc{CGAL::Point_2< CGAL::Homogeneous< int> >}, make a single name from \cgal\ visible in a scope via a \ccc{using} statement, e.g.\ \ccc{using CGAL::Cartesian;}, and then use this name unqualified in this scope, or even make all names from namespace \ccc{CGAL} visible in a scope with \ccc{using namespace CGAL;}. The latter, however, is likely to give raise to name conflicts and is therefore not recommended. \section{Inclusion Order of Header files} Not all compilers fully support standard header names. \cgal\ provides workarounds for these problems in \ccc{CGAL/basic.h}. Consequently, as a golden rule, you should always inlcude \ccc{CGAL/basic.h} first in your programs (or \ccc{CGAL/Cartesian.h}, or \ccc{CGAL/Homogeneous.h}, since they include \ccc{CGAL/basic.h} first). %%\section{Naming conventions} %% %%The use of representation classes not only avoids problems, it %%also makes all \cgal\ classes very uniform. They {\bf always} consist of: %%\begin{enumerate} %%\begin{ccTexOnly} %%\itemsep0pt\topsep0pt\partopsep0pt\parskip0pt\parsep0pt %%\end{ccTexOnly} %% %%%\item The {\em name space prefix} \ccStyle{}. This avoids name %%% clashes. It will be dropped as soon as \CC\ compilers support the %%% concept of name spaces as a feature of the programming language. %% %%\item The {\em capitalized base name} of the geometric object, such as %% \ccStyle{Point}, \ccStyle{Segment}, \ccStyle{Triangle}. %% %%\item An {\em underscore} followed by the {\em dimension} of the object, %% for example $\_2$, $\_3$ or $\_d$. %% %%\item A {\em representation class} as parameter, which itself is %% parameterized with a number type, such as \ccStyle{Cartesian} %% or \ccStyle{Homogeneous}. %%\end{enumerate}