/[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.35 by tjl, Thu Feb 13 14:41:05 2003 UTC revision 1.36 by tjl, Thu Feb 13 14:51:43 2003 UTC
# Line 44  class RealBuoyManager(BuoyLinkListener): Line 44  class RealBuoyManager(BuoyLinkListener):
44          self.cs = { }          self.cs = { }
45    
46          self.ctrx = vs.size.width / 2          self.ctrx = vs.size.width / 2
47          self.ctry = vs.size.height / 7 * 3          self.ctry = vs.size.height * .485 # A *little* above real ctr
48    
49          mainsize = vs.size.width * .5          mainsize = vs.size.width * .5
50    
# Line 55  class RealBuoyManager(BuoyLinkListener): Line 55  class RealBuoyManager(BuoyLinkListener):
55    
56          center = vs.translateCS(0, "Center", self.ctrx, self.ctry)          center = vs.translateCS(0, "Center", self.ctrx, self.ctry)
57    
58          main = vs.orthoBoxCS(center, "MAINVP", 0,          into = vs.orthoBoxCS(center, "MAINVP", 0,
59                               -mainsize/2, -mainsize/2, 1, 1, mainsize, mainsize)                               -mainsize/2, -mainsize/2, 1, 1, mainsize, mainsize)
         self.vs.activate(main)  
60    
61          into = self.nadir(main)          self.vs.activate(into)
62    
63          self.links = []          self.links = []
64          self.mainNode.renderMain(vs, into)          self.mainNode.renderMain(vs, into)
65          for l in self.links: self.linkReally(*l)          for l in self.links: self.linkReally(*l)
66          self.cs[main] = None          self.cs[into] = None
67                    
68          # Interpolation : old buoy -> to new main vp          # Interpolation : old buoy -> to new main vp
69          if hasattr(self, "animationCS_buoy") and \          if hasattr(self, "animationCS_buoy") and \
70                 self.animationCS_buoy != None:                 self.animationCS_buoy != None:
71              self.vs.matcher.keymapSingleCoordsys(into, self.animationCS_buoy[0][3])              self.vs.matcher.keymapSingleCoordsys(into, self.animationCS_buoy[0])
72              self.animationCS_buoy = None              self.animationCS_buoy = None
73    
74          self.mainCS = into          self.mainCS = into
# Line 104  class RealBuoyManager(BuoyLinkListener): Line 103  class RealBuoyManager(BuoyLinkListener):
103          into = self.nadir(into)          into = self.nadir(into)
104          self.vs.activate(into)          self.vs.activate(into)
105          otherAnchorCS = otherNode.renderBuoy(self.vs, into, linkId, otherAnchor, None)          otherAnchorCS = otherNode.renderBuoy(self.vs, into, linkId, otherAnchor, None)
106          self.cs[into] = (otherNode, linkId, otherAnchor, otherAnchorCS)          self.cs[into] = (otherNode, linkId, otherAnchor, into)
107          self.vs.map.put(GLCache.getCallList("""          self.vs.map.put(GLCache.getCallList("""
108              PushAttrib ENABLE_BIT LINE_BIT              PushAttrib ENABLE_BIT LINE_BIT
109              Disable TEXTURE_2D              Disable TEXTURE_2D
# Line 148  class RealBuoyManager(BuoyLinkListener): Line 147  class RealBuoyManager(BuoyLinkListener):
147              if ev.getID() != ev.MOUSE_CLICKED:              if ev.getID() != ev.MOUSE_CLICKED:
148                  return                  return
149    
150              self.animationCS_buoy = [link, self.vs]              self.animationCS_buoy = [cs, link, self.vs]
151              self.animationCS_main = [self.mainCS, link, self.vs]              self.animationCS_main = [self.mainCS, link, self.vs]
152    
153              self.mainNode = link[0].createMainNode(link[1], link[2], self)              self.mainNode = link[0].createMainNode(link[1], link[2], self)

Legend:
Removed from v.1.35  
changed lines
  Added in v.1.36

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