/[gzz]/gzz/gfx/demo/fillet/zbuffer.py
ViewVC logotype

Diff of /gzz/gfx/demo/fillet/zbuffer.py

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

revision 1.2 by tjl, Thu Dec 12 10:04:40 2002 UTC revision 1.3 by tjl, Thu Dec 12 18:39:54 2002 UTC
# Line 23  class Scene: Line 23  class Scene:
23    
24          p: Rotate view to show Z-buffer use          p: Rotate view to show Z-buffer use
25          t: Change fillet type          t: Change fillet type
26          k: Use a connection          k: Toggle drawing of the connection
27          v: Change the color of the connecting segment          v: Toggle coloring of the connecting segment
28          s: Toggle shifting of one cell          s: Toggle shifting of one cell
29          m: Toggle polygon mode to show the polygons drawn.          m: Toggle polygon mode to show the polygons drawn.
30          """          """
# Line 44  class Scene: Line 44  class Scene:
44              self.polymode = 1 - self.polymode              self.polymode = 1 - self.polymode
45      def scene(self, vs):      def scene(self, vs):
46          d = vs.getSize()          d = vs.getSize()
47                
48            putnoc(vs, background((0.3, 0.2, 0.6)))
49    
50          putnoc(vs, getDList("""          putnoc(vs, getDList("""
51              Enable ALPHA_TEST              Enable ALPHA_TEST
# Line 60  class Scene: Line 62  class Scene:
62                  Disable TEXTURE_2D                  Disable TEXTURE_2D
63                  LineWidth 2                  LineWidth 2
64              """))              """))
               
         putnoc(vs, background((0.3, 0.2, 0.6)))  
65    
66          s = 400          s = 400
67          sca = 0.4          sca = 0.4
# Line 110  class Scene: Line 110  class Scene:
110      def putCells(self, vs, into):      def putCells(self, vs, into):
111          wid, h = (600, 600)          wid, h = (600, 600)
112          l = 300          l = 300
113          cc=[(vs.matcher.addSub(into,          cc=[(vs.matcher.add(into,
114                      vs.coords.ortho(into, d, 0, -2*l, wid/2, h/2),"foo"+str(d)),                      vs.coords.ortho(into, d, 0, -2*l, wid/2, h/2),"foo"+str(d)),
115               vs.matcher.addSub(into,               vs.matcher.add(into,
116                      vs.coords.ortho(into, d, -0.75*wid*self.movel, 2*l, wid/2, h/2), "bar"+str(d)))                      vs.coords.ortho(into, d, -0.75*wid*self.movel, 2*l, wid/2, h/2), "bar"+str(d)))
117                  for d in (600, 800)]                  for d in (600, 800)]
118    

Legend:
Removed from v.1.2  
changed lines
  Added in v.1.3

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