Gzz Frontend: Vob subsystem

gzz.client Gzz_Frontend_Vobs.gen.html gzz.view gzz.view.ViewContext gzz.view.View gzz.view.CellView pegboard/1018/PEG_1018.gen.html#viewclasses Gzz_Frontend_View.gen.html#viewclasses viewclasses_small gzz.client Gzz_Frontend_View.gen.html Gzz_Frontend_Vobs.gen.html gzz.client.gl gzz.client.awt Gzz_Frontend_GLRend.gen.html Gzz_Frontend.gen.html#frontend frontend_small

Vobs are the basis of Gzz's graphics system. As discussed elsewhere(XXX) they enable keyframe interpolation between unrelated views by associating keys from the structure with the elements of the scene.

The following diagram shows the logical structure of the Vob system; we'll go into the implementation details later.

Gzz_Frontend_Vobs.gen.html#vobs_overall vobs_overall

As seen in the diagram, the Coordinate systems form two intertwined structures: a DAG of transform parents and a tree of match parents. See the VobScene javadoc for details.

In the Java implementation, CoordinateSystems are represented by integer indices to various arrays, due to efficiency reasons. If we were using a stronger language such as C++ where making the CoordinateSystem its own class in a template wouldn't cost us, we certainly would do so.

The class diagram of VobScene and related classes is shown below. The "pseudoclass" stereotype refers to the above array implementation of the coordsys "class"es.

The diagram is slightly convoluted (feel free to improve the layout); the central class is a VobScene, which is a facade for the whole system of vobs and coordinate systems. It contains three objects which implement the VobMap, VobCoorder and VobMatcher interfaces. These manage various relationships of the CoordSys.

gzz.vob.VobScene gzz.vob.VobMap gzz.vob.VobCoorder gzz.vob.VobMatcher gzz.vob.Vob Gzz_Frontend_Vobs.gen.html#vobscene_overall vobscene_overall

The construction of a VobScene by a view goes as follows:

Gzz_Frontend_Vobs.gen.html#vobsceneseq vobsceneseq

There are two modes of calling: either through the VobScene as a shorthand for the most common cases, or directly through to the VobCoorder and VobMap members.

Rendering a VobScene can happen in two ways, depending on whether OpenGL or AWT is being used. OpenGL is described in GLRenderables.


An important reason for the Vob construction is interpolation: it is possible to smoothly animate between Vobscenes generated by independent views. The interpolation is based on the keys of the coordinate systems. The two steps are:

Sometimes it is desirable to change the interpolation behaviour for some coordinate systems. An example is a "main" coordinate system surrounded by buoys, and interpolation between a buoy and the main coordinate system. It is not desirable to adjust the keys but to rather have the main coordinate system have a static key and change the interpolation behaviour of the buoys.