[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Gzz-commits] gzz/gfx/librenderables renderables.py
From: |
Janne V. Kujala |
Subject: |
[Gzz-commits] gzz/gfx/librenderables renderables.py |
Date: |
Wed, 11 Sep 2002 07:34:03 -0400 |
CVSROOT: /cvsroot/gzz
Module name: gzz
Changes by: Janne V. Kujala <address@hidden> 02/09/11 07:34:02
Modified files:
gfx/librenderables: renderables.py
Log message:
Proper coordinate systems for fisheye: drawn paper image region
specified by corners, mapped by coords1 to get vertex coords; coords2 specifies
bulge (not implemented yet)
CVSWeb URLs:
http://savannah.gnu.org/cgi-bin/viewcvs/gzz/gzz/gfx/librenderables/renderables.py.diff?tr1=1.19&tr2=1.20&r1=text&r2=text
Patches:
Index: gzz/gfx/librenderables/renderables.py
diff -c gzz/gfx/librenderables/renderables.py:1.19
gzz/gfx/librenderables/renderables.py:1.20
*** gzz/gfx/librenderables/renderables.py:1.19 Wed Sep 11 06:41:45 2002
--- gzz/gfx/librenderables/renderables.py Wed Sep 11 07:34:02 2002
***************
*** 421,430 ****
{
"Type" : "2",
"Name": "FisheyePaperQuad",
! "Data": "Pt corners[4]; Paper::Paper* paper; float scale;",
"Params" : """
! Paper paper, float x0, float y0, float x1, float y1,
! float scale
""",
"ParamCode" : """
this->paper = paper;
--- 421,429 ----
{
"Type" : "2",
"Name": "FisheyePaperQuad",
! "Data": "Pt corners[4]; Paper::Paper* paper; ",
"Params" : """
! Paper paper, float x0, float y0, float x1, float y1
""",
"ParamCode" : """
this->paper = paper;
***************
*** 432,458 ****
corners[0].y = corners[3].y = y0;
corners[2].x = corners[3].x = x1;
corners[1].y = corners[2].y = y1;
- this->scale = scale;
""",
"RenderCode" : """
DBG(dbg) << "Paper\\n";
GLERR
! ZPt paperorigin = coords2.transform(Pt(0, 0));
! ZVec paperx = coords2.transform(Pt(1, 0)) - paperorigin;
! ZVec papery = coords2.transform(Pt(0, 1)) - paperorigin;
Paper::LightParam lightParam;
lightParam.orig = paperorigin-ZPt(0,0,0);
! lightParam.e0 = paperx * scale;
! lightParam.e1 = papery * scale;
! lightParam.e2 = ZVec(0,0,paperx.length()) * scale;
lightParam.Light = ZVec(-1,-1,1);
lightParam.Light_w = 0.0;
if(dbg) {
! cout << "Paperquad: " <<
lightParam.orig << " " <<
lightParam.e0 << " " <<
lightParam.e1 << " " <<
--- 431,456 ----
corners[0].y = corners[3].y = y0;
corners[2].x = corners[3].x = x1;
corners[1].y = corners[2].y = y1;
""",
"RenderCode" : """
DBG(dbg) << "Paper\\n";
GLERR
! ZPt paperorigin = coords1.transform(Pt(0, 0));
! ZVec paperx = coords1.transform(Pt(1, 0)) - paperorigin;
! ZVec papery = coords1.transform(Pt(0, 1)) - paperorigin;
Paper::LightParam lightParam;
lightParam.orig = paperorigin-ZPt(0,0,0);
! lightParam.e0 = paperx;
! lightParam.e1 = papery;
! lightParam.e2 = ZVec(0,0,paperx.length());
lightParam.Light = ZVec(-1,-1,1);
lightParam.Light_w = 0.0;
if(dbg) {
! cout << "FisheyePaperquad: " <<
lightParam.orig << " " <<
lightParam.e0 << " " <<
lightParam.e1 << " " <<
***************
*** 479,494 ****
GLERR
glBegin(GL_QUADS);
! glTexCoord2f(0,0);
coords1.vertex(corners[0]);
! glTexCoord2f(0,1);
coords1.vertex(corners[1]);
! glTexCoord2f(1,1);
coords1.vertex(corners[2]);
! glTexCoord2f(1,0);
coords1.vertex(corners[3]);
glEnd();
--- 477,492 ----
GLERR
glBegin(GL_QUADS);
! glTexCoord2f(corners[0].x,corners[0].y);
coords1.vertex(corners[0]);
! glTexCoord2f(corners[1].x,corners[1].y);
coords1.vertex(corners[1]);
! glTexCoord2f(corners[2].x,corners[2].y);
coords1.vertex(corners[2]);
! glTexCoord2f(corners[3].x,corners[3].y);
coords1.vertex(corners[3]);
glEnd();
- [Gzz-commits] gzz/gfx/librenderables renderables.py,
Janne V. Kujala <=
- [Gzz-commits] gzz/gfx/librenderables renderables.py, Janne V. Kujala, 2002/09/12
- [Gzz-commits] gzz/gfx/librenderables renderables.py, Janne V. Kujala, 2002/09/16
- [Gzz-commits] gzz/gfx/librenderables renderables.py, Janne V. Kujala, 2002/09/17
- [Gzz-commits] gzz/gfx/librenderables renderables.py, Janne V. Kujala, 2002/09/18
- [Gzz-commits] gzz/gfx/librenderables renderables.py, Janne V. Kujala, 2002/09/18
- [Gzz-commits] gzz/gfx/librenderables renderables.py, Tuomas J. Lukka, 2002/09/20
- [Gzz-commits] gzz/gfx/librenderables renderables.py, Janne V. Kujala, 2002/09/27
- [Gzz-commits] gzz/gfx/librenderables renderables.py, Janne V. Kujala, 2002/09/27
- [Gzz-commits] gzz/gfx/librenderables renderables.py, Janne V. Kujala, 2002/09/27
- [Gzz-commits] gzz/gfx/librenderables renderables.py, Janne V. Kujala, 2002/09/28