31.01.2014 Views

Version 5.0 The LEDA User Manual

Version 5.0 The LEDA User Manual

Version 5.0 The LEDA User Manual

SHOW MORE
SHOW LESS

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

changes. <strong>The</strong> contents of the result scene is stored in a container of type R. <strong>The</strong><br />

input scene must be a Basic Scene with a container of type I. <strong>The</strong> update function<br />

void (∗f update)(const I& input, R& result) gets the contents of this input scene<br />

and computes the contents result of the result scene. We say that the result scene<br />

depends on its input scene.<br />

3. Basic Scenes (type GeoBaseScene)<br />

Edit Scenes and Result Scenes are derived from Basic Scenes. <strong>The</strong> basic scene type<br />

works on container types providing an interface as the list of the STL library. More<br />

precisely, CONTAINER has to support the following type definitions and STL-like<br />

operations:<br />

• value type - the type T of the values the container holds<br />

• iterator<br />

• operations begin( ) and end( ) returning an iterator that can be used for<br />

begining (ending) the traversal of the container<br />

• void push back(const T &) for inserting an element at the end of the container<br />

• iterator insert(iterator it, const T &) for inserting an element (before it)<br />

• void erase(iterator it) for erasing an element at position it<br />

• operation bool empty( ) returning true if the container is empty, false otherwise<br />

That means, that <strong>LEDA</strong> lists can be used as well as containers.<br />

<strong>The</strong> programming interface of GeoWin provides various operations to create Edit Scenes<br />

and Result Scenes. Basic Scenes are not created directly by the operations of the programming<br />

interface, but they are used for derivation of the other scene types, and we will<br />

find them in the programming interface, when both Edit and Result Scenes are supported<br />

by an operation.<br />

GeoWin - class<br />

We explain some important terms of the GeoWin data type. Every instance GW of<br />

GeoWin can maintain a number of geo scenes.<br />

Visible scenes will be displayed by GW , non-visible scenes will not be displayed. Displayed<br />

means, that the contents of the scene will be displayed. A special case is the active scene<br />

of GW . Every GeoWin can have at most one active scene. <strong>The</strong> active scene is an Edit<br />

Scene with input focus. That means that this scene is currently edited by the user through<br />

the interactive interface. Note that the currently active scene will be displayed.<br />

Another important topic is the display order of scenes. Every scene has an associated<br />

non-negative z-coordinate. When a scene is created, it gets z-coordinate 0. When GW<br />

redraws a scene, the contents of this scene and the contents of its visible dependent scenes<br />

is drawn. In the redraw-operation of GeoWin the scenes with higher z-coordinates will be<br />

drawn in the background of scenes with lower z-coordinate.<strong>The</strong> scenes with z-coordinate

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!