#include <CGAL/IO/Geomview_stream.h>
| |||
Introduces a Geomview stream G with a camera that sees the
bounding box. If machine and login are non-null, Geomview is started
on the remote machine.
|
At the moment not all classes of the CGAL kernel have output operators. 2D objects are embedded in the xy-plane.
| ||
|
| |
Inserts the point p into the stream G. | ||
| ||
|
| |
Inserts the point p into the stream G. | ||
| ||
|
| |
Inserts the segment s into the stream G. | ||
| ||
|
| |
Inserts the segment s into the stream G. | ||
| ||
|
| |
Inserts the triangle t into the stream G. | ||
| ||
|
| |
Inserts the triangle t into the stream G. | ||
| ||
|
| |
Inserts the tetrahedron t into the stream G. | ||
|
| |
Inserts the bounding box b into the stream G. | ||
|
| |
Inserts the bounding box b into the stream G. |
At the moment input is only provided for points. The user has to select a point on the pick plane with the right mouse button. The pick plane can be moved anywhere with the left mouse button, before a point is entered.
| ||
|
| |
Extracts the point p from the stream G. The point is echoed. |
| ||
|
| |
Inserts the polyhedron P into the stream G. |
Geomview distinguishes between edge and face colors. The edge color is at the same time the color of vertices.
|
| Makes c the color of vertices, edges and faces in subsequent IO operations. |
|
| |
Changes the background color. Returns the old value. | ||
|
| |
Changes the vertex color. Returns the old value. | ||
|
| |
Changes the edge color. Returns the old value. | ||
|
| |
Changes the face color. Returns the old value. |
|
| Deletes all objects. |
|
| Positions the camera in a way that all objects can be seen. |
|
| |
Returns the line width. | ||
|
| |
Sets the line width to w. Returns the previous value. | ||
|
| |
Returns the radius of vertices. | ||
|
| |
Sets the radius of vertices to d. Returns the previous value. | ||
|
| Returns true iff tracing is on. |
|
| |
Sets tracing on. The data that are sent to Geomview are also sent to cerr. Returns the previous value. By default tracing is off. |
The following functions are helpful if you develop your own insert and extract functions. The following functions allow to pass a string from Geomview and to read data sent back by Geomview.
|
| Inserts string s into the stream. |
|
|
Extracts a string s from the stream. Precondition: You have to allocate enough memory. |
|
| Inserts integer i into the stream. Puts whitespace around if the stream is in ascii mode. |
|
| Inserts double d into the stream. Puts whitespace around if the stream is in ascii mode. |
|
| |
Returns true iff G is in binary mode. | ||
|
| Returns true iff G is in binary mode. |
|
| |
|
|
For convenience we offer the manipulators ascii and binary that can be inserted in the stream.
|
| Sets the stream in ascii mode. |
|
| Sets the stream in binary mode. |
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 comand 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 [Fab97] and at the Geomview manual [Phi96].