PEG vobuml--tjl: UML stereotypes for describing Vob structs

Author: Tuomas J. Lukka
Revision: 1.11
Status: Incomplete

With PP and hierarchical coordinate systems, the structure of vob scenes' contents (what coordinate systems there are, what vobs there are, how are they connected) is now complicated enough that we need to be able to diagram it easily. This PEG describes some extensions to UML for this purpose.

The idea is that diagrams are kind of a template for actual vobs and coordinate systems. For example, in LinebrokenCellContentView, we have a box cs everything is put into, a translated cs for scrolling when the cursor's not on the first line, one cs for every word (each piece of text is an own vob), and a TextVob for every word. We'd model this by showing four classes, one for every cs and one for the vobs-- so we don't show actual vobs and and coordinate systems, but the kinds of vobs and cs there are in our structure and how they are related.


The objects to be described

There are two kinds of "objects" (in the following, the quotes will be dropped) in the Vob system: coordinate systems and vobs. OpenGL adds another distinction: GL state -changing vobs and rendering vobs.

The main relationships for coordinate systems are:

And for Vobs,

and the main attributes of coordinate systems are

and for Vobs,


Both coordinate systems and Vobs are represented as stereotyped UML classes. For coordinate systems, stereotypes ending in CS are used, and for Vobs, Vob or one of Vob0, Vob1 and Vob2 is used (for vobs with zero, one or two vobs, respectively).

Relationships between coordinate systems

Both types of relationships between coordinate systems in the same VobScene are represented as arrows; the arrow for transform parenthood (A vobtransform B == A is child of B) is thin and possibly contains (at the arrow end) the name of the parent's role. The interpolation parenthood (A vobsubmatch B == A is interp child of B) is represented by a thick arrow.

peg.gen.html#vobuml1 vobuml1

In the above diagram, there are three coordinate systems, and the corresponding code would be approximately (A given as parameter):

B = vs.coords.scale(0, ...)
C = vs.coords.cull(A, B)
vs.matcher.addSub(A, C, ...)

Since the same two coordinate systems often have both vobsubmatch and vobtransform relationships, a visual shorthand of dashing the line types can be used:

peg.gen.html#vobuml1_short vobuml1_short

Relationships of Vobs

The containment of a Vob in coordinate system(s) (A vobin B == Vob A is in CS B) is represented by a thin, dashed line. The coordinate system end is optionally adorned by the index.

peg.gen.html#vobuml2 vobuml2

In the above diagram, there are two Vobs and two coordinate systems. The TextVob is placed in A, and the IrreguVob, which uses two coordinate systems, is in A and B.


One relatively complex example is the stenciling of irregular coordinate systems. There, the sequence is: