CGAL 5.1.3  Geomview

This chapter presents the CGAL interface to Geomview http://www.geomview.org/, which is a viewer for threedimensional objects, originally developed at the Geometry Center in Minneapolis http://www.geom.uiuc.edu/.
Note: The functionality described in this chapter is not available on Windows.
An object of the class Geomview_stream
is a stream in which geometric objects can be inserted and where geometric objects can be extracted from. The constructor starts Geomview either on the local either on a remote machine.
Not all but most classes of the CGAL kernel have output operators for the Geomview_stream
. 2D objects are embedded in the xy
plane. Input is only provided for points. Polyhedron and 2D and 3D triangulations have output operators for the Geomview_stream
.
The constructor forks a process and establishes two pipes between the processes. The forked process is then overlaid with Geomview. The file descriptors stdin
and stdout
of Geomview are hooked on the two pipes.
All insert operators construct expressions in gcl
, the Geomview command language, which is a subset of Lisp. These expressions are sent to Geomview via the pipe. The extract operators notify interest
for a certain kind of events. When such an event happens Geomview sends a description of the event in gcl
and the extract operator has to parse this expression.
In order to implement further insert and extract operators you should take a look at the implementation and at the Geomview manual.
The following program ouputs successively a 2D Delaunay triangulation (projected), a 3D Delaunay, and a terrain from the set of points.
File Geomview/gv_terrain.cpp