/[gzz]/gzz/gzz/view/buoy/buoymanager.py
ViewVC logotype

Diff of /gzz/gzz/view/buoy/buoymanager.py

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

revision 1.23 by tjl, Tue Feb 11 18:05:43 2003 UTC revision 1.24 by mudyc, Tue Feb 11 19:15:38 2003 UTC
# Line 10  from gzz.view.buoy import BuoyLinkListen Line 10  from gzz.view.buoy import BuoyLinkListen
10  from gzz.view.buoy import BuoyAdaptor  from gzz.view.buoy import BuoyAdaptor
11    
12  # Slow animation for the demo.  # Slow animation for the demo.
13  gzz.client.AbstractUpdateManager.defaultAnimationTime = 2000  gzz.client.AbstractUpdateManager.defaultAnimationTime = 3500
14  gzz.client.AbstractUpdateManager.fractCalc = gzz.client.AbstractUpdateManager.LinearCalculator()  gzz.client.AbstractUpdateManager.fractCalc = gzz.client.AbstractUpdateManager.LinearCalculator()
15    
16    
# Line 66  class RealBuoyManager(BuoyLinkListener): Line 66  class RealBuoyManager(BuoyLinkListener):
66          # Interpolation : old buoy -> to new main vp          # Interpolation : old buoy -> to new main vp
67          if hasattr(self, "animationCS_buoy") and \          if hasattr(self, "animationCS_buoy") and \
68                 self.animationCS_buoy != None:                 self.animationCS_buoy != None:
             print 'Do MAIN Animation'  
69              self.vs.matcher.keymapSingleCoordsys(main, self.animationCS_buoy[0][3])              self.vs.matcher.keymapSingleCoordsys(main, self.animationCS_buoy[0][3])
70                #self.vs.matcher.keymapSingleCoordsys(main, self.animBuoy)
71              old_vs = self.animationCS_buoy[1]              old_vs = self.animationCS_buoy[1]
72              old_vs.matcher.dumpByParent(self.animationCS_buoy[0][3])              old_vs.matcher.dumpByParent(self.animationCS_buoy[0][3])
73    
# Line 98  class RealBuoyManager(BuoyLinkListener): Line 98  class RealBuoyManager(BuoyLinkListener):
98          w = 150          w = 150
99          h = 150          h = 150
100          sca = .5          sca = .5
101          into = self.vs.orthoBoxCS(buoy, "V", -100, -w*sca/2, -h*sca/20,          into = self.vs.orthoBoxCS(buoy, "V"+str(linkId), -100, -w*sca/2, -h*sca/20,
102                                                      .5, .5, w, h)                                                      .5, .5, w, h)
103          if 1:          if 1:
104              dbg1 = self.vs.unitSqCS(into, "U")              dbg1 = self.vs.unitSqCS(into, "U")
# Line 128  class RealBuoyManager(BuoyLinkListener): Line 128  class RealBuoyManager(BuoyLinkListener):
128          if hasattr(self, "animationCS_main") and \          if hasattr(self, "animationCS_main") and \
129                 self.animationCS_main != None and \                 self.animationCS_main != None and \
130                 linkId == self.animationCS_main[1][1]:                 linkId == self.animationCS_main[1][1]:
             print 'Main to Buoy interpolation..'  
131              self.vs.matcher.keymapSingleCoordsys(otherAnchorCS,self.animationCS_main[0])              self.vs.matcher.keymapSingleCoordsys(otherAnchorCS,self.animationCS_main[0])
132                #self.vs.matcher.keymapSingleCoordsys(into,self.animMain)
133    
134              old_vs = self.animationCS_main[2]              old_vs = self.animationCS_main[2]
135              old_vs.matcher.dumpByParent(self.animationCS_main[0])              old_vs.matcher.dumpByParent(self.animationCS_main[0])
# Line 155  class RealBuoyManager(BuoyLinkListener): Line 155  class RealBuoyManager(BuoyLinkListener):
155              if ev.getID() != ev.MOUSE_CLICKED:              if ev.getID() != ev.MOUSE_CLICKED:
156                  return                  return
157    
             self.mainNode = link[0].createMainNode(link[1], link[2], self)  
   
158              self.animationCS_buoy = [link, self.vs]              self.animationCS_buoy = [link, self.vs]
159              self.animationCS_main = [self.mainCS, link, self.vs]              self.animationCS_main = [self.mainCS, link, self.vs]
160    
161                self.animMain = self.vs.orthoBoxCS(0, "fooooo", 10,20,20, 10,10, 50,30)
162                self.animBuoy = self.vs.orthoBoxCS(0, "baaaar", 10,50,500, 10,10, 50,30)
163    
164                self.mainNode = link[0].createMainNode(link[1], link[2], self)
165              gzz.client.AbstractUpdateManager.chg()              gzz.client.AbstractUpdateManager.chg()
166                            

Legend:
Removed from v.1.23  
changed lines
  Added in v.1.24

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