gzz-commits
[Top][All Lists]
Advanced

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

[Gzz-commits] gzz gfx/libcoords/Coords.cxx gzz/view/buoy/buoy...


From: Tuomas J. Lukka
Subject: [Gzz-commits] gzz gfx/libcoords/Coords.cxx gzz/view/buoy/buoy...
Date: Tue, 11 Feb 2003 05:58:53 -0500

CVSROOT:        /cvsroot/gzz
Module name:    gzz
Changes by:     Tuomas J. Lukka <address@hidden>        03/02/11 05:58:52

Modified files:
        gfx/libcoords  : Coords.cxx 
        gzz/view/buoy  : buoymanager.py 

Log message:
        Fix a MAJOR bug in center-rotated coordinate systems - no wonder buoys 
were looking strange

CVSWeb URLs:
http://savannah.gnu.org/cgi-bin/viewcvs/gzz/gzz/gfx/libcoords/Coords.cxx.diff?tr1=1.67&tr2=1.68&r1=text&r2=text
http://savannah.gnu.org/cgi-bin/viewcvs/gzz/gzz/gzz/view/buoy/buoymanager.py.diff?tr1=1.18&tr2=1.19&r1=text&r2=text

Patches:
Index: gzz/gfx/libcoords/Coords.cxx
diff -u gzz/gfx/libcoords/Coords.cxx:1.67 gzz/gfx/libcoords/Coords.cxx:1.68
--- gzz/gfx/libcoords/Coords.cxx:1.67   Wed Feb  5 13:31:01 2003
+++ gzz/gfx/libcoords/Coords.cxx        Tue Feb 11 05:58:52 2003
@@ -649,9 +649,9 @@
        }
        bool canPerformGL() { return true; }
         bool performGL() {
-           glTranslatef(-ox, -oy, 0);
-           glRotatef(a, 0, 0, 1);
            glTranslatef(ox, oy, 0);
+           glRotatef(a, 0, 0, 1);
+           glTranslatef(-ox, -oy, 0);
            return true;
        }
        typedef RotateXYCenteredCoords InverseType;
Index: gzz/gzz/view/buoy/buoymanager.py
diff -u gzz/gzz/view/buoy/buoymanager.py:1.18 
gzz/gzz/view/buoy/buoymanager.py:1.19
--- gzz/gzz/view/buoy/buoymanager.py:1.18       Tue Feb 11 05:36:13 2003
+++ gzz/gzz/view/buoy/buoymanager.py    Tue Feb 11 05:58:52 2003
@@ -3,12 +3,16 @@
 from gfx.util.misc import *
 import gfx
 
+import gzz
 from gzz.view.buoy import zzNodes
 from gzz.view.buoy import pagespanNodes
 from gzz.view.buoy import BuoyLinkListener, ScrollblockCellLinker
 from gzz.view.buoy import BuoyAdaptor
 
-import gzz
+# Slow animation for the demo.
+gzz.client.AbstractUpdateManager.defaultAnimationTime = 2000
+gzz.client.AbstractUpdateManager.fractCalc = 
gzz.client.AbstractUpdateManager.LinearCalculator()
+
 
 print "LOADING BUOYMANAGER"
 
@@ -66,20 +70,29 @@
 
     def link(self, direction, anchorCS, otherNode, linkId, otherAnchor):
         print 'anchorCS: ',anchorCS
+       anchorUnit = self.vs.unitSqCS(anchorCS, "UN")
+       anchorCenter = self.vs.translateCS(anchorUnit, "TR55", .5, .5)
        x = self.ctrx
-       r = self.ctrx * .75
+       r = self.ctrx * .5
        if dir > 0:
-           buoy = self.vs.coords.buoyOnCircle(0, anchorCS,
+           buoy = self.vs.coords.buoyOnCircle(0, anchorCenter,
                                x, self.ctry, r, 
                                x-r, self.ctry, 
                                .1)
        else:
-           buoy = self.vs.coords.buoyOnCircle(0, anchorCS,
+           buoy = self.vs.coords.buoyOnCircle(0, anchorCenter,
                                x, self.ctry, r, 
                                x+r, self.ctry,
                                .1)
        self.vs.matcher.add(buoy, linkId)
-       into = self.vs.orthoBoxCS(buoy, "V", -100, 0, 0, .5, .5, 150, 150)
+       w = 150
+       h = 150
+       sca = .5
+       into = self.vs.orthoBoxCS(buoy, "V", -100, -w*sca/2, -h*sca/20, 
+                                                   .5, .5, w, h)
+       if 1:
+           dbg1 = self.vs.unitSqCS(into, "U")
+           self.vs.put(coloredQuad((0,1,0)), dbg1)
        into = self.nadir(into)
        self.vs.activate(into)
        self.cs[into] = (otherNode, linkId, otherAnchor)




reply via email to

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