/[gzz]/gzz/gfx/demo/sqfillet.py
ViewVC logotype

Diff of /gzz/gfx/demo/sqfillet.py

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

revision 1.2 by tjl, Tue Oct 22 17:03:45 2002 UTC revision 1.3 by tjl, Wed Oct 23 06:13:04 2002 UTC
# Line 4  from java.lang import Math Line 4  from java.lang import Math
4  class SqfScene:  class SqfScene:
5      def __init__(self):      def __init__(self):
6          self.x = [105, 850, 900]          self.x = [105, 850, 900]
7            self.flags = [1, 0]
8      def key(self, key):      def key(self, key):
9          if key == "c":          if key == "c":
10              rotatelist(self.x)              rotatelist(self.x)
11            if key == "f":
12                rotatelist(self.flags)
13                print "Flags: ",self.flags[0]
14          pass          pass
15      def scene(self, vs):      def scene(self, vs):
16          vs.map.put(background((.2, .4, .5)))          vs.map.put(background((.2, .4, .5)))
# Line 35  class SqfScene: Line 39  class SqfScene:
39              LineWidth 1              LineWidth 1
40          """))          """))
41    
42          vs.map.put(GLRen.createSqFilletConnection(40), cs1,          fil = GLRen.createSqFilletConnection(20, self.flags[0])
43              cs2)  
44            vs.map.put(fil, cs1, cs2)
45    
46          vs.map.put(getDListNocoords("""          vs.map.put(getDListNocoords("""
47              Color 1 0 0              Color 1 0 0
48          """))          """))
49    
50          vs.map.put(GLRen.createSqFilletConnection(40), cs1,          vs.map.put(fil, cs1, cs3)
             cs3)  
51    
52          vs.map.put(getDListNocoords("""          vs.map.put(getDListNocoords("""
53              Color 0 1 0              Color 0 1 0
54          """))          """))
55    
56          vs.map.put(GLRen.createSqFilletConnection(40), cs2,          vs.map.put(fil, cs2, cs3)
             cs3)  
57    
58    
59  currentScene = SqfScene()  currentScene = SqfScene()

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