/[libvob]/libvob/vob/buoy/buoymanager.py
ViewVC logotype

Diff of /libvob/vob/buoy/buoymanager.py

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

revision 1.11 by mudyc, Sat May 3 00:59:07 2003 UTC revision 1.12 by tjl, Wed May 7 12:00:42 2003 UTC
# Line 1  Line 1 
1  #  #
2  # Copyright (c) 2003, Tuomas J. Lukka  # Copyright (c) 2003, Tuomas J. Lukka
3  #  #
4  # This file is part of Gzz.  # This file is part of Fenfire.
5  #  #
6  # Gzz is free software; you can redistribute it and/or modify it under  # Fenfire is free software; you can redistribute it and/or modify it under
7  # the terms of the GNU Lesser General Public License as published by  # the terms of the GNU Lesser General Public License as published by
8  # the Free Software Foundation; either version 2 of the License, or  # the Free Software Foundation; either version 2 of the License, or
9  # (at your option) any later version.  # (at your option) any later version.
10  #  #
11  # Gzz is distributed in the hope that it will be useful, but WITHOUT  # Fenfire is distributed in the hope that it will be useful, but WITHOUT
12  # ANY WARRANTY; without even the implied warranty of MERCHANTABILITY  # ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
13  # or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU Lesser General  # or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU Lesser General
14  # Public License for more details.  # Public License for more details.
15  #  #
16  # You should have received a copy of the GNU Lesser General  # You should have received a copy of the GNU Lesser General
17  # Public License along with Gzz; if not, write to the Free  # Public License along with Fenfire; if not, write to the Free
18  # Software Foundation, Inc., 59 Temple Place, Suite 330, Boston,  # Software Foundation, Inc., 59 Temple Place, Suite 330, Boston,
19  # MA  02111-1307  USA  # MA  02111-1307  USA
20  #  #
# Line 58  class RealBuoyManager(BuoyLinkListener): Line 58  class RealBuoyManager(BuoyLinkListener):
58          self.replaceScene = None          self.replaceScene = None
59          self.mainNode = mainNode          self.mainNode = mainNode
60          self.connectors = connectors          self.connectors = connectors
61      def nadir(self, cs):      def _nadir(self, cs):
62          n =  self.vs.coords.nadirUnitSq(cs, self.nadirCS)          n =  self.vs.coords.nadirUnitSq(cs, self.nadirCS)
63          self.vs.matcher.add(cs, n, "NADIR")          self.vs.matcher.add(cs, n, "NADIR")
64          return n          return n
# Line 96  class RealBuoyManager(BuoyLinkListener): Line 96  class RealBuoyManager(BuoyLinkListener):
96          self.links = []          self.links = []
97          for connector in self.connectors:          for connector in self.connectors:
98              connector.addBuoys(vs, into, self.mainNode, self)              connector.addBuoys(vs, into, self.mainNode, self)
99          for l in self.links: self.linkReally(*l)          for l in self.links: self._linkReally(*l)
100          self.cs[into] = None          self.cs[into] = None
101                    
102          # Interpolation : old buoy -> to new main vp          # Interpolation : old buoy -> to new main vp
# Line 109  class RealBuoyManager(BuoyLinkListener): Line 109  class RealBuoyManager(BuoyLinkListener):
109    
110      def link(self, *args):      def link(self, *args):
111          self.links.append(args)          self.links.append(args)
112      def linkReally(self, direction, anchorCS, otherNode, linkId, otherAnchor):      def _linkReally(self, direction, anchorCS, otherNode, linkId, otherAnchor):
113          if dbg: pa('link really')          if dbg: pa('link really')
114    
115          anchorUnit = self.vs.unitSqCS(anchorCS, "UN")          anchorUnit = self.vs.unitSqCS(anchorCS, "UN")
# Line 149  class RealBuoyManager(BuoyLinkListener): Line 149  class RealBuoyManager(BuoyLinkListener):
149          if 0:          if 0:
150              dbg1 = self.vs.unitSqCS(into, "U")              dbg1 = self.vs.unitSqCS(into, "U")
151              self.vs.put(coloredQuad((0,1,0)), dbg1)              self.vs.put(coloredQuad((0,1,0)), dbg1)
152          into = self.nadir(into)          into = self._nadir(into)
153          # into = self.vs.orthoBoxCS(into, "Kludge CS", 0, 0,0, 1,1, w*sca, h*sca)          # into = self.vs.orthoBoxCS(into, "Kludge CS", 0, 0,0, 1,1, w*sca, h*sca)
154          self.vs.activate(into)          self.vs.activate(into)
155          otherAnchorCS = otherNode.renderBuoy(self.vs, into, linkId, otherAnchor, None)          otherAnchorCS = otherNode.renderBuoy(self.vs, into, linkId, otherAnchor, None)

Legend:
Removed from v.1.11  
changed lines
  Added in v.1.12

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