/[gzz]/gzz/lava/test/gzz/loom/WheelView.test
ViewVC logotype

Diff of /gzz/lava/test/gzz/loom/WheelView.test

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

revision 1.6 by humppake, Thu Feb 27 10:45:38 2003 UTC revision 1.7 by humppake, Thu Feb 27 17:05:25 2003 UTC
# Line 69  def angle(p1, p2): Line 69  def angle(p1, p2):
69      elif x < 0 and y == 0: return math.pi      elif x < 0 and y == 0: return math.pi
70      elif x < 0 and y > 0: return math.pi/2 + math.atan(y/-x)      elif x < 0 and y > 0: return math.pi/2 + math.atan(y/-x)
71    
72    def getZ(vs, cs):
73        tmp = jarray.zeros(3, 'f')
74        vs.coords.transformPoints3(cs, [0.0, 0.0, 0.0], tmp)
75        return (tmp[2])
76    
77  def testWheel():  def testWheel():
78      r.addProperty(p, s)      r.addProperty(p, s)
79      r.addProperty(p, t)      r.addProperty(p, t)
# Line 89  def testWheel(): Line 94  def testWheel():
94          [vs.coords.transformPoint(cs, 0, 0, None)          [vs.coords.transformPoint(cs, 0, 0, None)
95           for cs in [cs_r, cs_s, cs_t, cs_u, cs_v, cs_w]]           for cs in [cs_r, cs_s, cs_t, cs_u, cs_v, cs_w]]
96    
97        prz, psz, ptz, puz, pvz, pwz = \
98            [getZ(vs, cs) for cs in [cs_r, cs_s, cs_t, cs_u, cs_v, cs_w]]  
99    
100      # Check that selected nodes are drawn on same level      # Check that selected nodes are drawn on same level
101    
102      assert pw.y == pr.y == ps.y      assert pw.y == pr.y == ps.y
103      # XXX assert pw.z == pr.z == ps.z      assert pwz == prz == psz
104    
105      # Check that the positive side of the wheel seem to turn right      # Check that the positive side of the wheel seem to turn right
   
106      assert pt.y < ps.y < pv.y      assert pt.y < ps.y < pv.y
107      assert pt.x < ps.x > pv.x      assert pt.x < ps.x > pv.x
108      # XXX assert pt.z > ps.z < pv.z < pu.z      assert ptz > psz < pvz < puz
109                    
110    
111      # Check that all nodes have approximately the same distance      # Check that all nodes have approximately the same distance

Legend:
Removed from v.1.6  
changed lines
  Added in v.1.7

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