#include <CGAL/IO/Geomview_stream.h>
| |||
Introduces a Geomview stream gs with a camera that sees the
bounding box. The command geomview must be in the user's PATH.
If machine and login are not NULL,
Geomview is started on the remote machine using rsh.
|
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 gs. | ||||
| ||||
|
| |||
Inserts the point p into the stream gs. | ||||
| ||||
|
| |||
Inserts the segment s into the stream gs. | ||||
| ||||
|
| |||
Inserts the segment s into the stream gs. | ||||
| ||||
|
| |||
Inserts the ray r into the stream gs. | ||||
| ||||
|
| |||
Inserts the ray r into the stream gs. | ||||
| ||||
|
| |||
Inserts the line l into the stream gs. | ||||
| ||||
|
| |||
Inserts the line l into the stream gs. | ||||
| ||||
|
| |||
Inserts the triangle t into the stream gs. | ||||
| ||||
|
| |||
Inserts the triangle t into the stream gs. | ||||
| ||||
|
| |||
Inserts the tetrahedron t into the stream gs. | ||||
| ||||
|
| |||
Inserts the sphere s into the stream gs. | ||||
|
| |||
Inserts the bounding box b into the stream gs. | ||||
|
| |||
Inserts the bounding box b into the stream gs. | ||||
| ||||
|
| |||
[begin;end) is an iterator range with value type Triangle_3<R>. This method uses the OFF format to draw several triangles at once, which is much faster than drawing them one by one. |
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 gs. The point is echoed by default, and it depends on the stream echo mode status. |
#include <CGAL/IO/Polyhedron_geomview_ostream.h>
| ||
|
| |
Inserts the polyhedron P into the stream gs. |
#include <CGAL/IO/Triangulation_geomview_ostream_2.h>
| ||
|
| |
Inserts the 2D triangulation T into the stream gs. The actual output depends on whether the stream is in wired mode or not. Also note that in the case of terrains (when GT::Point_2 is Point_3<R>), then the 3D terrain is displayed. |
#include <CGAL/IO/Triangulation_geomview_ostream_3.h>
| ||
|
| |
Inserts the 3D triangulation T into the stream gs. The actual output depends on whether the stream is in wired mode or not. |
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. |
advanced |
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 i into the stream. Puts whitespace around if the stream is in ascii mode. |
|
| |
Inserts i into the stream. Puts whitespace around if the stream is in ascii mode. | ||
|
| Inserts i into the stream. Puts whitespace around if the stream is in ascii mode. Currently implemented by converting to int, so it can be truncated on 64 bit platforms. |
|
| |
Inserts i into the stream. Puts whitespace around if the stream is in ascii mode. Currently implemented by converting to unsigned int, so it can be truncated on 64 bit platforms. | ||
|
| Inserts double d into the stream. Puts whitespace around if the stream is in ascii mode. |
|
| |
Sets tracing on. The data that are sent to Geomview are also sent to cerr. Returns the previous value. By default tracing is off. | ||
|
| Returns true iff tracing is on. |
|
| |
Sets raw mode. In raw mode, kernel points are output without headers and footers, just the coordinates (in binary or ascii mode). This allows the implementation of the stream functions for other objects to re-use the code for points internally, by temporary saving the raw mode to true, and restoring it after. Returns the previous value. By default, raw mode is off. | ||
|
| Returns true iff raw mode is on. |
|
| |
Sets echo mode. In echo mode, when you select a point in Geomview, the point is actually sent back to Geomview. Returns the previous value. By default, echo mode is on. | ||
|
| Returns true iff echo mode is on. |
|
| |
Sets whether we are in binary mode. | ||
|
| |
Sets whether we are in ascii mode. | ||
|
| |
Returns true iff gs is in binary mode. | ||
|
| |
Returns true iff gs is in ascii mode. |
advanced |
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.