gzz-commits
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Gzz-commits] gzz gfx/libutil/effects.py gzz/modules/pp/demot...


From: Tuomas J. Lukka
Subject: [Gzz-commits] gzz gfx/libutil/effects.py gzz/modules/pp/demot...
Date: Tue, 08 Oct 2002 06:25:40 -0400

CVSROOT:        /cvsroot/gzz
Module name:    gzz
Changes by:     Tuomas J. Lukka <address@hidden>        02/10/08 06:25:40

Modified files:
        gfx/libutil    : effects.py 
        gzz/modules/pp : demotest.py 
        gzz/vob/buoy   : Buoy4Floater.java 

Log message:
        Having fun with buoys

CVSWeb URLs:
http://savannah.gnu.org/cgi-bin/viewcvs/gzz/gzz/gfx/libutil/effects.py.diff?tr1=1.14&tr2=1.15&r1=text&r2=text
http://savannah.gnu.org/cgi-bin/viewcvs/gzz/gzz/gzz/modules/pp/demotest.py.diff?tr1=1.4&tr2=1.5&r1=text&r2=text
http://savannah.gnu.org/cgi-bin/viewcvs/gzz/gzz/gzz/vob/buoy/Buoy4Floater.java.diff?tr1=1.1&tr2=1.2&r1=text&r2=text

Patches:
Index: gzz/gfx/libutil/effects.py
diff -c gzz/gfx/libutil/effects.py:1.14 gzz/gfx/libutil/effects.py:1.15
*** gzz/gfx/libutil/effects.py:1.14     Thu Oct  3 13:30:08 2002
--- gzz/gfx/libutil/effects.py  Tue Oct  8 06:25:40 2002
***************
*** 1,7 ****
  from gzz.gfx.gl import GL, GLRen, GLSpans, Paper, GLCache
  from gzz.vob.buoy import NadirAngler
! from gzz.vob.buoy import Buoy3Floater
  import math
  
  # Prototype: project to a semicircle 
  # from a point.
--- 1,22 ----
  from gzz.gfx.gl import GL, GLRen, GLSpans, Paper, GLCache
  from gzz.vob.buoy import NadirAngler
! from gzz.vob.buoy import Buoy3Floater, Buoy4Floater
  import math
+ 
+ class CircleFloater4(Buoy4Floater):
+     def __init__(self, vs, parent, center, radius, p):
+       self.__dict__.update(locals())
+     def buoyCoordsys(self, anchorCS, key):
+       cs = self.vs.coords.buoyOnCircle(
+           anchorCS,
+           self.center[0], self.center[1],
+           self.radius, 
+           self.p[0], self.p[1],
+           1)
+       self.vs.matcher.add(cs, key)
+       return cs
+     def finishFloating(self):
+       pass
  
  # Prototype: project to a semicircle 
  # from a point.
Index: gzz/gzz/modules/pp/demotest.py
diff -c gzz/gzz/modules/pp/demotest.py:1.4 gzz/gzz/modules/pp/demotest.py:1.5
*** gzz/gzz/modules/pp/demotest.py:1.4  Mon Oct  7 05:36:17 2002
--- gzz/gzz/modules/pp/demotest.py      Tue Oct  8 06:25:40 2002
***************
*** 6,11 ****
--- 6,13 ----
  from gzz.modules.pp import *
  import math
  
+ from gfx.libutil import effects
+ 
  obsTrigger = SimpleObsTrigger();
  cellTexter = SimpleVStreamTexter(FakeSpanMaker(), 
Enfilade1DImpl.Enfilade1DImplMaker())
  cellManager = PlainCellManager()
***************
*** 36,44 ****
        self.pv = PlaneView(VobKeyer())
        self.scale = 0.01
      def scene(self, vs):
        vs.map.put(background((0.4,0.5,0.8)))
-       self.clip = vs.coords.affineCoordsys(0, 0, 100, 100, 500, 0, 0, 300)
-       vs.matcher.add(self.clip, "clip")
        # Viewport
        self.cs1 = vs.coords.affineCoordsys(0, 0, 100, 100, 600, 0, 0, 600)
        # Paper to viewport
--- 38,46 ----
        self.pv = PlaneView(VobKeyer())
        self.scale = 0.01
      def scene(self, vs):
+       bf = effects.CircleFloater4(vs, 0, (500, 400), 300, (000,300))
+ 
        vs.map.put(background((0.4,0.5,0.8)))
        # Viewport
        self.cs1 = vs.coords.affineCoordsys(0, 0, 100, 100, 600, 0, 0, 600)
        # Paper to viewport
***************
*** 49,55 ****
        self.pv.renderPaper(vs, cursor, -1, self.cs1, self.cs2, None, None)
        # vs.map.put(getDListNocoords("""Disable TEXTURE_2D"""))
        # vs.map.put(coloredQuad((1,0,0)), self.cs1)
!       vs.map.put(stopclip, self.clip)
        self.currentvs = vs
      def key(self, key):
        pass
--- 51,68 ----
        self.pv.renderPaper(vs, cursor, -1, self.cs1, self.cs2, None, None)
        # vs.map.put(getDListNocoords("""Disable TEXTURE_2D"""))
        # vs.map.put(coloredQuad((1,0,0)), self.cs1)
!       vs.map.put(stopclip, self.cs1)
! 
!       into = vs.coords.concat(self.cs1, self.cs2)
! 
!       anchor = vs.coords.coordsys(into, 0, 10, 20, 10, 20)
!     
!       flo = bf.buoyCoordsys(anchor, "FOO")
!       (w,h) = (100,100)
!       mag = vs.coords.coordsys(flo, -5, -w, -h, w, h)
! 
!       vs.map.put(coloredQuad((1,0,0)), mag)
! 
        self.currentvs = vs
      def key(self, key):
        pass
Index: gzz/gzz/vob/buoy/Buoy4Floater.java
diff -c gzz/gzz/vob/buoy/Buoy4Floater.java:1.1 
gzz/gzz/vob/buoy/Buoy4Floater.java:1.2
*** gzz/gzz/vob/buoy/Buoy4Floater.java:1.1      Tue Oct  8 05:36:10 2002
--- gzz/gzz/vob/buoy/Buoy4Floater.java  Tue Oct  8 06:25:40 2002
***************
*** 34,40 ****
       * from the parent coordinate system known to this floater (i.e. will
       * not be related to anchorCS).
       */
!     int buoyCoordsys(int anchorCS);
  
      /** Finish placing buoys. 
       * This function may modify the coordinate systems returned by 
buoyCoordsys.
--- 34,41 ----
       * from the parent coordinate system known to this floater (i.e. will
       * not be related to anchorCS).
       */
!     int buoyCoordsys(int anchorCS, Object key);
! 
  
      /** Finish placing buoys. 
       * This function may modify the coordinate systems returned by 
buoyCoordsys.




reply via email to

[Prev in Thread] Current Thread [Next in Thread]