[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Gzz-commits] gzz/gfx demo/papertest.py libcolor/spaces.cxx
From: |
Janne V. Kujala |
Subject: |
[Gzz-commits] gzz/gfx demo/papertest.py libcolor/spaces.cxx |
Date: |
Fri, 20 Sep 2002 12:12:21 -0400 |
CVSROOT: /cvsroot/gzz
Module name: gzz
Changes by: Janne V. Kujala <address@hidden> 02/09/20 12:12:21
Modified files:
gfx/demo : papertest.py
gfx/libcolor : spaces.cxx
Log message:
More texture color visualization
CVSWeb URLs:
http://savannah.gnu.org/cgi-bin/viewcvs/gzz/gzz/gfx/demo/papertest.py.diff?tr1=1.24&tr2=1.25&r1=text&r2=text
http://savannah.gnu.org/cgi-bin/viewcvs/gzz/gzz/gfx/libcolor/spaces.cxx.diff?tr1=1.5&tr2=1.6&r1=text&r2=text
Patches:
Index: gzz/gfx/demo/papertest.py
diff -c gzz/gfx/demo/papertest.py:1.24 gzz/gfx/demo/papertest.py:1.25
*** gzz/gfx/demo/papertest.py:1.24 Fri Sep 20 11:52:33 2002
--- gzz/gfx/demo/papertest.py Fri Sep 20 12:12:21 2002
***************
*** 280,292 ****
def scene(self, vs):
putnoc(vs, background(self.bgcolor))
! cs1 = vs.coords.affineCoordsys(0, "1", 0, -70*8, 0, 8, 0, 0, 8)
putnoc(vs, getDListNocoords("""
PointSize 1
Disable TEXTURE_2D
PushMatrix
! Translate 600 500 100
"""))
rotate(vs, "rot", self.angle, -1, 1, 1)
vs.map.put(cmap, cs1)
--- 280,293 ----
def scene(self, vs):
putnoc(vs, background(self.bgcolor))
! cs1 = vs.coords.affineCoordsys(0, "1", 0, -70, 0, 1, 0, 0, 1)
putnoc(vs, getDListNocoords("""
PointSize 1
Disable TEXTURE_2D
PushMatrix
! Translate 600 450 100
! Scale 8 8 16
"""))
rotate(vs, "rot", self.angle, -1, 1, 1)
vs.map.put(cmap, cs1)
Index: gzz/gfx/libcolor/spaces.cxx
diff -c gzz/gfx/libcolor/spaces.cxx:1.5 gzz/gfx/libcolor/spaces.cxx:1.6
*** gzz/gfx/libcolor/spaces.cxx:1.5 Fri Sep 20 11:52:33 2002
--- gzz/gfx/libcolor/spaces.cxx Fri Sep 20 12:12:21 2002
***************
*** 335,367 ****
}
glEnd();
! float edge[12][2][3] = {
! {{ 0, 0, 0 }, { 0, 0, 1 }},
! {{ 0, 1, 0 }, { 0, 1, 1 }},
! {{ 1, 0, 0 }, { 1, 0, 1 }},
! {{ 1, 1, 0 }, { 1, 1, 1 }},
! {{ 0, 0, 0 }, { 0, 1, 0 }},
! {{ 0, 0, 1 }, { 0, 1, 1 }},
! {{ 1, 0, 0 }, { 1, 1, 0 }},
! {{ 1, 0, 1 }, { 1, 1, 1 }},
!
! {{ 0, 0, 0 }, { 1, 0, 0 }},
! {{ 0, 0, 1 }, { 1, 0, 1 }},
! {{ 0, 1, 0 }, { 1, 1, 0 }},
! {{ 0, 1, 1 }, { 1, 1, 1 }}
! };
!
! for (int i = 0; i < 12; i++) {
! float rgb[3], v[3];
! glBegin(GL_LINE_STRIP);
! for (float t = 0; t <= 1; t += 1.0 / 8) {
! for (int c = 0; c < 3; c++)
! rgb[c] = edge[i][0][c] * (1 - t) + edge[i][1][c] * t;
! fromRGB(rgb, v);
! glColor3fv(rgb);
! glVertex3fv(v);
! }
glEnd();
}
--- 335,369 ----
}
glEnd();
! const int N = 3;
! for (int axis = 0; axis < 3; axis++)
! for (float x = 0; x <= 1.0001; x += 1. / N)
! for (float y = 0; y <= 1.0001; y += 1. / N) {
! glBegin(GL_LINE_STRIP);
! for (float t = 0; t <= 1; t += 1.0 / 16) {
! float rgb[3], v[3];
! switch (axis) {
! case 0: rgb[0] = x; rgb[1] = y; rgb[2] = t; break;
! case 1: rgb[0] = x; rgb[1] = t; rgb[2] = y; break;
! case 2: rgb[0] = t; rgb[1] = x; rgb[2] = y; break;
! }
!
! fromRGB(rgb, v);
! glColor3fv(rgb);
! glVertex3fv(v);
! }
! glEnd();
! }
! if (fromRGB == RGBtoLAB) {
! glColor3f(1,1,1);
! glBegin(GL_LINES);
! glVertex3f(0, 0, 0);
! glVertex3f(100, 0, 0);
! glVertex3f(0, -100, 0);
! glVertex3f(0, +100, 0);
! glVertex3f(0, 0, -1000);
! glVertex3f(0, 0, +1000);
glEnd();
}
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Gzz-commits] gzz/gfx demo/papertest.py libcolor/spaces.cxx,
Janne V. Kujala <=