View Single Post
  #1  
Old 05-16-2006, 12:34 AM
Vbents Vbents is offline
Member
 
Join Date: Sep 2005
Posts: 25
bounding box error

Hi,

We have a likert program that displays a 2D menu for the user perfectly in Viz 2.17a. However, in 2.53g, it no longer scales the items correctly.

I was able to trace the problem to the fact that the bounding box is being reported differently between 2.17 and 2.53, even though the code is identical. Here is the relevant portion:

Code:
width = 10
viz.startlayer(viz.LINES)
viz.linewidth(3)
viz.vertexcolor(viz.RED)
viz.vertex(0,0,-1)
viz.vertex(width,0,-1)
self.scaleLine = viz.endlayer(self.scaleLineGrp.id)
print "bbox:", self.scaleLineGrp.get(viz.BOUNDING_BOX)
2.53 prints: "bbox: [20, 0, 0, 10.0, 0, -1.0]" (which is what I expect)
2.17 prints: "bbox: [1.5625, 0, 0, .78125, 0, -1.0]"

When I copy this code into a new file and remove all the "self." parts, then 2.17 prints the same thing as 2.53. So, I have to conclude that somehow 2.17 is treating groups and/or classes differently.

Does anyone have any idea what could be causing this problem?

[As an aside, in our version of Vizard, the included viz.py file is missing the line "import random", causing it to crash when avatar.idle() is used].
Reply With Quote