gzz-commits
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Gzz-commits] gzz ./TODO doc/Gzz_Frontend_Vobs.rst


From: Tuomas J. Lukka
Subject: [Gzz-commits] gzz ./TODO doc/Gzz_Frontend_Vobs.rst
Date: Fri, 03 Jan 2003 14:47:58 -0500

CVSROOT:        /cvsroot/gzz
Module name:    gzz
Changes by:     Tuomas J. Lukka <address@hidden>        03/01/03 14:47:58

Modified files:
        .              : TODO 
        doc            : Gzz_Frontend_Vobs.rst 

Log message:
        diagfixes

CVSWeb URLs:
http://savannah.gnu.org/cgi-bin/viewcvs/gzz/gzz/TODO.diff?tr1=1.483&tr2=1.484&r1=text&r2=text
http://savannah.gnu.org/cgi-bin/viewcvs/gzz/gzz/doc/Gzz_Frontend_Vobs.rst.diff?tr1=1.3&tr2=1.4&r1=text&r2=text

Patches:
Index: gzz/TODO
diff -u gzz/TODO:1.483 gzz/TODO:1.484
--- gzz/TODO:1.483      Fri Jan  3 10:25:23 2003
+++ gzz/TODO    Fri Jan  3 14:47:58 2003
@@ -156,6 +156,10 @@
           prototype of mindmap applitude (fall 2003?), check alternatives
        - umltool paper dl 15.2., but should actually be done in the late Jan
        - enhancing umltool
+           - make umltool rst loop not stop when an error
+             in parsing the uml code is encountered -- for example,
+             replace a "-" with a "--" in an association to get such
+             an error.
            - metapost directive: like .uml, but simply a metapost diagram.
            - jlinks should also work in reverse: the UML diagram
              should generate, for each jlink, a version of the diagram
Index: gzz/doc/Gzz_Frontend_Vobs.rst
diff -u gzz/doc/Gzz_Frontend_Vobs.rst:1.3 gzz/doc/Gzz_Frontend_Vobs.rst:1.4
--- gzz/doc/Gzz_Frontend_Vobs.rst:1.3   Fri Jan  3 10:25:23 2003
+++ gzz/doc/Gzz_Frontend_Vobs.rst       Fri Jan  3 14:47:58 2003
@@ -5,31 +5,60 @@
 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 fundamental object diagram is shown below. The "pseudoclass" stereotype
-means that 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 would.
-However, in the Java implementation, CoordinateSystems are represented by
-arrays inside the VobScene.
+
+The following diagram shows the logical structure of the Vob system; we'll
+go into the implementation details later.
 
 .. UML:: vobs_overall
 
     class Vob "interface"
        methods
            draw
+       assoc multi(*) - multi(*) role(coordinates) CoordSys
 
     class CoordSys "interface"
        methods
 
     transassoc = assoc CoordSys role(transformparent) multi(*) - multi(*) 
role(transchild) CoordSys
-    matchassoc = assoc CoordSys role(matchparent) multi(1) - multi(*) 
role(matchchild) CoordSys
+    matchassoc = assoc CoordSys aggreg role(matchparent) multi(1) - multi(*) 
role(matchchild) CoordSys
 
     class AnyObject
        assoc multi(1) role(coordsyskey) - multi(*) CoordSys
 
     ---
 
-    
+    Vob.c = (0,0);
+
+    CoordSys.c = (150,0);
+    AnyObject.c = (150,-100);
+
+    pair p,pu,pl;
+    p := CoordSys.e;
+    pu := CoordSys.ne;
+    pl := CoordSys.se;
+
+    transassoc.p = .85[pu,pl]{right} .. p+(40,0){up} .. .15[pu,pl]{left};
+
+    pair m, mu, ml;
+    m := CoordSys.n;
+    mu := CoordSys.nw;
+    ml := CoordSys.ne;
+    matchassoc.p = .1[mu,ml]{up} .. m+(0,40){right} .. .9[mu,ml]{down};
+
+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.
 
 .. UML:: vobscene_overall
 
@@ -46,7 +75,7 @@
 
     class VobMap "interface"
        jlink
-       assoc aggreg multi(1) - multi(*) Vob
+       assoc aggreg multi(*) - multi(*) Vob
        methods
            Vob getVobByCS(int coordsys)
            void put(Vob)
@@ -56,7 +85,7 @@
 
     class VobCoorder "interface"
        jlink
-       assoc compos - multi(*) CoordinateSystem
+       assoc compos - multi(*) CoordSys
        methods
            int ortho(int parent, float depth, x, y, w, h)
            int scale(int parent, float sx, sy)
@@ -81,35 +110,47 @@
            int addToListGL(...) 
            boolean intersect(int x, int y, RenderInfo info1, info2) 
 
-    class CoordinateSystem "pseudoclass"
+    class CoordSys "pseudoclass"
        assoc multi(*) - multi(1) role(key) java.lang.Object
-       assoc multi(0..2{ordered}) - multi(*) Vob
+       assoc multi(*) - multi(*) Vob
 
     class java.lang.Object
        methods
            int hashCode()
            boolean equals(Object o)
 
-    hierarch = assoc CoordinateSystem aggreg multi(0..1) role(parent) - 
multi(*) role(child) CoordinateSystem
+    transassoc = assoc CoordSys role(transformparent) multi(*) - multi(*) 
role(transchild) CoordSys
+    matchassoc = assoc CoordSys aggreg role(matchparent) multi(1) - multi(*) 
role(matchchild) CoordSys
+
           
     ---
     VobScene.c = (0,0);
 
     horizontally(20, ooo, VobMap, VobCoorder, VobMatcher);
-    Vob.c = (xpart VobMap.c, ypart CoordinateSystem.c);
+    Vob.c = (xpart VobMap.c, ypart CoordSys.c);
 
-    vertically(60, xxx, VobCoorder, CoordinateSystem, java.lang.Object); 
+    vertically(60, xxx, VobCoorder, CoordSys, java.lang.Object); 
 
     VobCoorder.n = VobScene.s + (0,-50);
 
-    pair mn,ms;
-    mn := CoordinateSystem.ne;
-    ms := CoordinateSystem.se;
-
-    hierarch.p = (0.2[mn,ms] {1,1} .. 0.5[mn,ms]+(60,0) .. 0.8[mn,ms]{-1,1});
-
-    draw VobMap.c -- 0.7[Vob.c, CoordinateSystem.c] dashed evenly;
-    draw VobMatcher.c -- 0.6[Vob.c, java.lang.Object.c] dashed evenly;
+    pair p,pu,pl;
+    p := CoordSys.e;
+    pu := CoordSys.ne;
+    pl := CoordSys.se;
+
+    transassoc.p = .85[pu,pl]{right} .. p+(40,0){up} .. .15[pu,pl]{left};
+
+    pair m, mu, ml;
+    m := CoordSys.n;
+    mu := CoordSys.nw;
+    ml := CoordSys.ne;
+    matchassoc.p = .1[mu,ml]{up} .. m+(0,40){right} .. .9[mu,ml]{down};
+
+    % association minders
+    draw VobMap.c -- 0.7[Vob.c, CoordSys.c] dashed evenly;
+    draw VobCoorder.c -- point .5 of transassoc.p dashed evenly;
+    draw VobMatcher.c -- 0.6[CoordSys.c, java.lang.Object.c] dashed evenly;
+    draw VobMatcher.c -- point .5 of matchassoc.p dashed evenly;
 
 The construction of a VobScene goes as follows:
 




reply via email to

[Prev in Thread] Current Thread [Next in Thread]