[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Gzz-commits] libvob/vob/buoy buoymanager.py
From: |
Matti Katila |
Subject: |
[Gzz-commits] libvob/vob/buoy buoymanager.py |
Date: |
Fri, 02 May 2003 20:59:08 -0400 |
CVSROOT: /cvsroot/libvob
Module name: libvob
Changes by: Matti Katila <address@hidden> 03/05/02 20:59:07
Modified files:
vob/buoy : buoymanager.py
Log message:
dbg msg fixes
CVSWeb URLs:
http://savannah.gnu.org/cgi-bin/viewcvs/libvob/libvob/vob/buoy/buoymanager.py.diff?tr1=1.10&tr2=1.11&r1=text&r2=text
Patches:
Index: libvob/vob/buoy/buoymanager.py
diff -u libvob/vob/buoy/buoymanager.py:1.10 libvob/vob/buoy/buoymanager.py:1.11
--- libvob/vob/buoy/buoymanager.py:1.10 Fri Apr 25 13:16:45 2003
+++ libvob/vob/buoy/buoymanager.py Fri May 2 20:59:07 2003
@@ -20,7 +20,6 @@
#
#
-
from __future__ import nested_scopes
import jarray
@@ -33,14 +32,17 @@
vob.AbstractUpdateManager.defaultAnimationTime = 1500
vob.AbstractUpdateManager.fractCalc =
vob.AbstractUpdateManager.LinearCalculator(0)
-
-print "LOADING BUOYMANAGER"
-
lineconn = GLRen.createLineConnector(.5, .5, .5, .5)
#lineconn = GLRen.createSqFilletConnection(30, 1, .125, 6)
size = jarray.zeros(2, 'f')
+dbg = 0
+def pa(*s):
+ print 'vob.buoy.buoymanager::',s
+
+
+pa("LOADING BUOYMANAGER")
class RealBuoyManager(BuoyLinkListener):
"""Manage buoys through the new APIs
@@ -108,11 +110,13 @@
def link(self, *args):
self.links.append(args)
def linkReally(self, direction, anchorCS, otherNode, linkId, otherAnchor):
+ if dbg: pa('link really')
+
anchorUnit = self.vs.unitSqCS(anchorCS, "UN")
anchorCenter = self.vs.translateCS(anchorUnit, "TR55", .5, .5)
x = self.ctrx
r = self.ctry * 1.05
- print "Buoy: ",self.ctrx, self.ctry, x, r
+ if dbg: pa("Buoy: ",self.ctrx, self.ctry, x, r)
if direction > 0:
buoy = self.vs.coords.buoyOnCircle1(0, anchorCenter,
x, self.ctry, r,
@@ -124,7 +128,7 @@
x+r, self.ctry,
.1)
self.vs.matcher.add(buoy, linkId)
- print otherNode
+ if dbg: pa(otherNode)
obj = otherNode.getSize(linkId, otherAnchor, size)
w = size[0]
h = size[1]
@@ -138,7 +142,7 @@
sca = 1.5
- print "BuoyScaling: ",w, h, sca
+ if dbg: pa("BuoyScaling: ",w, h, sca)
into = self.vs.orthoBoxCS(buoy, "V"+str(linkId), -100, -w*sca/2.0,
-h*sca/2.0,
1, 1, w*sca, h*sca)
@@ -150,6 +154,7 @@
self.vs.activate(into)
otherAnchorCS = otherNode.renderBuoy(self.vs, into, linkId,
otherAnchor, None)
self.cs[into] = (otherNode, linkId, otherAnchor, into)
+
self.vs.map.put(GLCache.getCallList("""
PushAttrib ENABLE_BIT LINE_BIT
Disable TEXTURE_2D
@@ -159,9 +164,7 @@
"""))
self.vs.map.put(lineconn, anchorUnit,
- self.vs.unitSqCS(otherAnchorCS, "UN"))
-
- # vs.map.put(filletconn, main_whole_cs, link_whole_cs)
+ self.vs.unitSqCS(otherAnchorCS, "UN"))
self.vs.map.put(GLCache.getCallList("""
PopAttrib
@@ -173,6 +176,7 @@
linkId == self.animationCS_main[1][1]:
self.vs.matcher.keymapSingleCoordsys(into,self.animationCS_main[0])
self.animationCS_main = None
+ if dbg: pa('link really..DONE')
def key(self, key):
if key == "Print":
@@ -208,21 +212,21 @@
self.animationCS_main = [self.mainCS, link, self.vs]
- print "Following link", link
+ pa( "Following link", link)
self.mainNode = link[0].createMainNode(link[1], link[2])
def followLinkByAnchor(self, anchor):
- print "Searching for anchor", anchor
+ pa("Searching for anchor", anchor)
for key in self.cs.keys():
- print "Comparing to", self.cs[key]
+ pa("Comparing to", self.cs[key])
if self.cs[key] != None:
a = self.cs[key][2]
if a == anchor:
self.followLink(self.cs[key])
return
- print "Anchor not found!!!"
+ pa("Anchor not found!!!")
def getVs(self):
return self.vs;
- [Gzz-commits] libvob/vob/buoy buoymanager.py,
Matti Katila <=
- [Gzz-commits] libvob/vob/buoy buoymanager.py, Matti Katila, 2003/05/16
- [Gzz-commits] libvob/vob/buoy buoymanager.py, Tuomas J. Lukka, 2003/05/16
- [Gzz-commits] libvob/vob/buoy buoymanager.py, Matti Katila, 2003/05/19
- [Gzz-commits] libvob/vob/buoy buoymanager.py, Matti Katila, 2003/05/21
- [Gzz-commits] libvob/vob/buoy buoymanager.py, Matti Katila, 2003/05/21
- [Gzz-commits] libvob/vob/buoy buoymanager.py, Matti Katila, 2003/05/23
- [Gzz-commits] libvob/vob/buoy buoymanager.py, Matti Katila, 2003/05/23
- [Gzz-commits] libvob/vob/buoy buoymanager.py, Matti Katila, 2003/05/26