[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Gzz-commits] gzz/gfx demo/calendarvobtest.py liblines/Lines.cxx
From: |
Matti Katila |
Subject: |
[Gzz-commits] gzz/gfx demo/calendarvobtest.py liblines/Lines.cxx |
Date: |
Sat, 02 Nov 2002 15:54:49 -0500 |
CVSROOT: /cvsroot/gzz
Module name: gzz
Changes by: Matti Katila <address@hidden> 02/11/02 15:54:48
Modified files:
gfx/demo : calendarvobtest.py
gfx/liblines : Lines.cxx
Log message:
Rotating.
CVSWeb URLs:
http://savannah.gnu.org/cgi-bin/viewcvs/gzz/gzz/gfx/demo/calendarvobtest.py.diff?tr1=1.12&tr2=1.13&r1=text&r2=text
http://savannah.gnu.org/cgi-bin/viewcvs/gzz/gzz/gfx/liblines/Lines.cxx.diff?tr1=1.10&tr2=1.11&r1=text&r2=text
Patches:
Index: gzz/gfx/demo/calendarvobtest.py
diff -u gzz/gfx/demo/calendarvobtest.py:1.12
gzz/gfx/demo/calendarvobtest.py:1.13
--- gzz/gfx/demo/calendarvobtest.py:1.12 Sat Nov 2 15:08:08 2002
+++ gzz/gfx/demo/calendarvobtest.py Sat Nov 2 15:54:48 2002
@@ -10,6 +10,7 @@
self.scale = 0.10;
self.ty = -3000;
self.tx = 50;
+ self.rotate = 0;
def scene(self, vs):
size = vs.getSize()
@@ -18,13 +19,22 @@
self.bgcolor = (0.6, 0.7, 0.8)
putnoc(vs, background(self.bgcolor))
+ angle = 0
+ if self.rotate:
+ angle = 1 * self.rotate
+
+ print "ROTATE: ", angle
+
cs_home = vs.coords.affineCoordsys(0,0,
w/2 + self.tx*self.scale,
h/2 + self.ty*self.scale,
- w*self.scale, 0,0, h*self.scale);
- vs.matcher.add(cs_home, "cs_koti")
+ w*self.scale, 0,0, h*self.scale)
+
+ home = vs.matcher.add(cs_home, "cs_home")
+
+ cs_rot = vs.coords.rotateXYZ(home, angle, -1, 1, 1)
-
+ rot = vs.matcher.add(cs_rot, "cs_koti_rot")
# these don't efect
gzz.vob.vobs.CalendarVob.setStatics(style_date, style_n, 0.05)
@@ -41,7 +51,7 @@
# annual calendar
for i in range(1, 13):
- cs_cal = vs.coords.affineCoordsys(cs_home , 0, 0 , i*9, 1.5, 0,
0, 1.15)
+ cs_cal = vs.coords.affineCoordsys(cs_rot , 0, 0 , i*9, 1.5, 0, 0,
1.15)
vs.matcher.add(cs_cal, "cs_cal"+str(i))
cs_text = vs.coords.affineCoordsys(0, 0, 0, 0,w*self.scale, 0,0,
h*self.scale)
@@ -81,6 +91,8 @@
if k == "Down": self.ty -= 50 / self.scale
if k == "Next": self.ty -= 500 / self.scale
if k == "Prior": self.ty += 500 / self.scale
+ if k == "z": self.rotate += 15;
+ if k == "Z": self.rotate -= 15;
Index: gzz/gfx/liblines/Lines.cxx
diff -u gzz/gfx/liblines/Lines.cxx:1.10 gzz/gfx/liblines/Lines.cxx:1.11
--- gzz/gfx/liblines/Lines.cxx:1.10 Sat Nov 2 15:27:22 2002
+++ gzz/gfx/liblines/Lines.cxx Sat Nov 2 15:54:48 2002
@@ -102,7 +102,7 @@
glTexEnvf(GL_TEXTURE_ENV, GL_TEXTURE_ENV_MODE, GL_MODULATE);
float l = linewidth/2;
- float texcoord =1;
+ float texcoord = 0.5;
texcoord *= (l+1)/l;
glBegin(GL_QUADS);