/[gzz]/gzz/doc/Gzz_Frontend_Vobs.rst
ViewVC logotype

Diff of /gzz/doc/Gzz_Frontend_Vobs.rst

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 1.2 by tjl, Thu Dec 19 23:05:17 2002 UTC revision 1.3 by tjl, Fri Jan 3 15:25:23 2003 UTC
# Line 12  the CoordinateSystem its own class in a Line 12  the CoordinateSystem its own class in a
12  However, in the Java implementation, CoordinateSystems are represented by  However, in the Java implementation, CoordinateSystems are represented by
13  arrays inside the VobScene.  arrays inside the VobScene.
14    
15    .. UML:: vobs_overall
16    
17        class Vob "interface"
18            methods
19                draw
20    
21        class CoordSys "interface"
22            methods
23    
24        transassoc = assoc CoordSys role(transformparent) multi(*) - multi(*) role(transchild) CoordSys
25        matchassoc = assoc CoordSys role(matchparent) multi(1) - multi(*) role(matchchild) CoordSys
26    
27        class AnyObject
28            assoc multi(1) role(coordsyskey) - multi(*) CoordSys
29    
30        ---
31    
32        
33    
34  .. UML:: vobscene_overall  .. UML:: vobscene_overall
35    
36      jlinkpackage gzz.vob      jlinkpackage gzz.vob
# Line 94  arrays inside the VobScene. Line 113  arrays inside the VobScene.
113    
114  The construction of a VobScene goes as follows:  The construction of a VobScene goes as follows:
115    
116  .. UML-refer:: vobsceneseq  .. UML:: vobsceneseq
117    
118        seqobject VobScene
119        seqobject VobMap
120        seqobject VobMatcher
121        seqobject VobCoorder
122        seqobject View
123    
124        sequence simplecall
125            call View
126                call VobScene "put(vob, key, d, x, y, w, h)"
127                    call VobCoorder "cs = coordsys(0, d, x, y, w, h)"
128                        return
129                    call VobMatcher "add(cs, key)"
130                        return
131                    call VobMap "put(vob, cs)"
132                        return
133                    return
134                return
135            return
136            call View
137                call VobScene "cs1 = orthoCS(cs0, key..)"
138                    call VobCoorder "cs = ortho(cs0, ...)"
139                        return
140                    call VobMatcher "add(cs0, cs, key)"
141                        return
142                    return "cs"
143                call VobCoorder "cs2 = coordsys(...)"
144                call VobMap "put(vob1, cs1, cs2)"
145                call VobMap "put(vob2, cs1, cs2)"
146                call VobMap "put(vob3, cs1)"
147        ---
148        View.c = (0,0);
149        horizontally(60, aaa, View, VobScene, VobMap, VobMatcher, VobCoorder);
150    
151  There are two modes of calling: either through the VobScene for the most  There are two modes of calling: either through the VobScene as a shorthand
152  common case, or directly through to the ``VobCoorder`` and ``VobMap``.  for the most
153    common cases, or directly through to the ``VobCoorder`` and ``VobMap`` members.
154    
155  Rendering a ``VobScene`` can happen in two ways, depending on whether OpenGL  Rendering a ``VobScene`` can happen in two ways, depending on whether OpenGL
156  or AWT is being used. OpenGL is described in `GLRenderables`__.  or AWT is being used. OpenGL is described in `GLRenderables`__.
# Line 105  or AWT is being used. OpenGL is describe Line 158  or AWT is being used. OpenGL is describe
158  .. _GLRenderables: Gzz_Frontend_GLRend.gen.html  .. _GLRenderables: Gzz_Frontend_GLRend.gen.html
159    
160  __ GLRenderables_  __ GLRenderables_
161    
162    Interpolation
163    =============
164    
165    An important reason for the Vob construction is interpolation: it is possible
166    to smoothly animate between Vobscenes generated by independent views.
167    The interpolation is based on the keys of the coordinate systems.  
168    The two steps are:
169    
170    - Match, starting from the root coordinate system (0), coordinate systems
171      whose parents have been matched and which share the same key.
172    
173    - For all coordinate systems for which a match was found, form an interpolating
174      coordinate system and use that for rendering. It is optional whether non-interpolating
175      coordinate systems will be rendered or not (experience shows that it's good to start rendering
176      them at some small time before the animation ends).
177    
178    Sometimes it is desirable to change the interpolation behaviour for some coordinate
179    systems. An example is a "main" coordinate system surrounded by buoys, and interpolation
180    between a buoy and the main coordinate system. It is not desirable to adjust the keys
181    but to rather have the main coordinate system have a static key and change the
182    interpolation behaviour of the buoys.
183    
184    
185    
186    
187    

Legend:
Removed from v.1.2  
changed lines
  Added in v.1.3

savannah-hackers-public@gnu.org
ViewVC Help
Powered by ViewVC 1.1.26