To handle a number of these problems, the algorithms in the library contain many pre and postcondition checks. By setting a compiler flag, these checks will be performed, which can be a great help when debugging an application. Visualization Functionality for visualization is not part of the geometric objects themselves. Naturally, it is not an intrinsic property of, say, a sphere, that it can be converted to OpenGL format. In providing functionality for visualization, we aim for uniformity and openness.
Uniformity means that all kinds of visualization is approached in the same way.
Openness means that any user can supply other streams for other visualization tools than provided by the CGAL support library. In order to meet those different goals, CGAL is set up in a very generic way. Algorithms in CGAL are generic, they work with a variety of implementations of predicates and representations of geometric objects. This allows to easily interchange components as long as they have the same syntax. Genericity could have been achieved through inheritance and virtual functions.