[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Gzz-commits] libvob/vob/demo fisheye.py
From: |
Tuomas J. Lukka |
Subject: |
[Gzz-commits] libvob/vob/demo fisheye.py |
Date: |
Wed, 07 May 2003 07:57:32 -0400 |
CVSROOT: /cvsroot/libvob
Module name: libvob
Changes by: Tuomas J. Lukka <address@hidden> 03/05/07 07:57:31
Modified files:
vob/demo : fisheye.py
Log message:
Newer version
CVSWeb URLs:
http://savannah.gnu.org/cgi-bin/viewcvs/libvob/libvob/vob/demo/fisheye.py.diff?tr1=1.1&tr2=1.2&r1=text&r2=text
Patches:
Index: libvob/vob/demo/fisheye.py
diff -u libvob/vob/demo/fisheye.py:1.1 libvob/vob/demo/fisheye.py:1.2
--- libvob/vob/demo/fisheye.py:1.1 Thu Apr 10 10:00:19 2003
+++ libvob/vob/demo/fisheye.py Wed May 7 07:57:30 2003
@@ -1,14 +1,15 @@
# (c) Tuomas J. Lukka
-from org.nongnu.libvob.putil.misc import *
+import vob
+from vob.putil.misc import *
+from vob.putil.demokeys import *
-from org.nongnu import libvob as vob
-
-from org.nongnu.libvob.putil.demokeys import *
+vob.AbstractUpdateManager.defaultAnimationTime = 1500
+vob.AbstractUpdateManager.fractCalc =
vob.AbstractUpdateManager.LinearCalculator(0)
class Scene:
def __init__(self):
- self.fisheye = vob.view.FisheyeState(1, .01, 100, 1, 100)
+ self.fisheye = vob.view.FisheyeState(1, .1, 100, 1, 10000)
self.color = GLCache.getCallList("""
Color 0 0 0
""")
@@ -18,43 +19,59 @@
GLCache.getCallList("""
PolygonMode FRONT_AND_BACK FILL
""")]
- # self.dice = GLRen.createDiceTester(35, 1, 20)
- pap = vob.gl.PaperMill.getInstance().getPaper(42)
- self.paper = GLRen.createFixedPaperQuad(pap, 0, 0, 1, 1, 2,
- 50, 20)
+
+
+ self.pap = vob.gl.PaperMill.getInstance().getPaper(42)
self.key = KeyPresses( self,
ListIndex("curmode", "mode", 0, "Toggle polymode", "l", "L"),
Toggle("usepaper", 1, "use paper", "p"),
+ SlideLog("dicelen", 5, "Dice length", 'd', 'D'),
+ SlideLog("dicelen2", 5, "Dice length", 'f', 'F'),
+ SlideLin("x", 0, 100, "x coord", "Left", "Right"),
+ SlideLin("y", 0, 100, "y coord", "Up", "Down"),
)
+
+ self.repl = 0
def key(self, k):
pass
def scene(self, vs):
+ if self.repl:
+ self.repl = 0
+ return self.vs
self.vs = vs
- putnoc(vs, background((.3,.7,.6)))
+ putnoc(vs, background((.0,.7,.6)))
size = vs.getSize()
cs = vs.translateCS(0, "A", size.width / 2, size.height / 2)
- cs = self.fisheye.getCoordsys(vs, cs, "B")
+ cs2 = self.fisheye.getCoordsys(vs, cs, "B")
+ vs.matcher.add(cs, cs2, "X")
+ cs = cs2
+
+ vs.map.put(self.mode[self.curmode])
if self.usepaper:
- print self.paper
- s = 10
- cs = vs.orthoCS(cs, "C", 0, -s/2, -s/2, s, s)
- vs.map.put(self.paper, cs)
+ s = 1000
+ cs = vs.orthoCS(cs, "C", 0, self.x + -s/2, self.y + -s/1.5, s, s)
+ paper = GLRen.createFixedPaperQuad(self.pap, 0, 0, 10, 10, 2,
+ self.dicelen, self.dicelen2, 20)
+ vs.map.put(paper, cs)
else:
- cs = vs.orthoCS(cs,"C", 0, 2, -2, 10, 10)
+ cs = vs.orthoCS(cs,"D", 0, 2, -2, 10, 10)
vs.map.put(self.color)
- vs.map.put(self.mode[self.curmode])
- vs.map.put(self.dice, cs)
+
+ dice = GLRen.createDiceTester(self.dicelen, self.dicelen2, 1, 20)
+ vs.map.put(dice, cs)
+ vs.map.put(self.mode[1])
def mouse(self, ev):
if self.fisheye.event(ev):
self.fisheye.setCoordsysParams()
- replaceNewScene(self.vs)
+ self.repl = 1
+ vob.AbstractUpdateManager.setNoAnimation()
vob.AbstractUpdateManager.chg()
return 1
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Gzz-commits] libvob/vob/demo fisheye.py,
Tuomas J. Lukka <=