[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Gzz-commits] gzz gfx/librenderables/renderables.py gzz/view/...
From: |
Matti Katila |
Subject: |
[Gzz-commits] gzz gfx/librenderables/renderables.py gzz/view/... |
Date: |
Fri, 14 Feb 2003 06:09:32 -0500 |
CVSROOT: /cvsroot/gzz
Module name: gzz
Changes by: Matti Katila <address@hidden> 03/02/14 06:09:32
Modified files:
gfx/librenderables: renderables.py
gzz/view/buoy : buoymanager.py
Log message:
step back
CVSWeb URLs:
http://savannah.gnu.org/cgi-bin/viewcvs/gzz/gzz/gfx/librenderables/renderables.py.diff?tr1=1.178&tr2=1.179&r1=text&r2=text
http://savannah.gnu.org/cgi-bin/viewcvs/gzz/gzz/gzz/view/buoy/buoymanager.py.diff?tr1=1.38&tr2=1.39&r1=text&r2=text
Patches:
Index: gzz/gfx/librenderables/renderables.py
diff -u gzz/gfx/librenderables/renderables.py:1.178
gzz/gfx/librenderables/renderables.py:1.179
--- gzz/gfx/librenderables/renderables.py:1.178 Thu Feb 13 12:18:24 2003
+++ gzz/gfx/librenderables/renderables.py Fri Feb 14 06:09:32 2003
@@ -591,73 +591,6 @@
{
"Type": "2",
- "Name": "SqAndLineConnector",
- "Data": "float px1, py1, px2, py2, dz1, dz2, red, green, blue, alpha,
sqAlpha, lineWidth, sqLineWidth;",
- "Params": """float px1, float py1, float px2, float py2, float dz1, float
dz2,
- float red, float green, float blue, float alpha, float
sqAlpha, float lineWidth, float sqLineWidth""",
- "ParamCode": """ this->px1 = px1; this->py1 = py1;
- this->px2 = px2; this->py2 = py2;
- this->dz1 = dz1; this->dz2 = dz2;
- this->red = red; this->green = green;
- this->blue = blue; this->alpha = alpha;
- this->sqAlpha = sqAlpha;
- this->lineWidth = lineWidth; this->sqLineWidth =
sqLineWidth;""",
- "RenderCode": """
- bool colored = true;
- if (red < 0 || green < 0 || blue < 0 || alpha < 0) colored = false;
- Pt box1 = coords1.getSqSize();
- Pt box2 = coords2.getSqSize();
- ZPt p1 = coords1.transform(ZPt(box1.x*px1,box1.y*py1,0));
- ZPt p2 = coords2.transform(ZPt(box2.x*px2,box2.y*py2,0));
- p1.z += dz1;
- p2.z += dz2;
- if (colored) glPushAttrib(GL_CURRENT_BIT);
- glPushAttrib(GL_ENABLE_BIT);
- glDisable(GL_TEXTURE_2D);
- if (colored) glColor4f(red, green, blue, alpha);
-
- glLineWidth(lineWidth);
-
- glBegin(GL_LINE_STRIP);
- glVertex3f(p1.x, p1.y, p1.z);
- glVertex3f(p2.x, p2.y, p2.z);
- glEnd();
-
- glLineWidth(sqLineWidth);
-
- // square box 1
- glBegin(GL_LINE_LOOP);
- p1 = coords1.transform(ZPt(0,0,0));
- glVertex3f(p1.x, p1.y, p1.z);
- p1 = coords1.transform(ZPt(box1.x, 0, 0));
- glVertex3f(p1.x, p1.y, p1.z);
- p1 = coords1.transform(ZPt(box1.x, box1.y,0));
- glVertex3f(p1.x, p1.y, p1.z);
- p1 = coords1.transform(ZPt(0, box1.y, 0));
- glVertex3f(p1.x, p1.y, p1.z);
- glEnd();
-
- /* don't draw at all.
- // square box 2
- glBegin(GL_LINE_LOOP);
- p2 = coords2.transform(ZPt(0,0,0));
- glVertex3f(p2.x, p2.y, p2.z);
- p2 = coords2.transform(ZPt(box2.x, 0,0));
- glVertex3f(p2.x, p2.y, p2.z);
- p2 = coords2.transform(ZPt(box2.x, box2.y, 0));
- glVertex3f(p2.x, p2.y, p2.z);
- p2 = coords2.transform(ZPt(0, box2.y, 0));
- glVertex3f(p2.x, p2.y, p2.z);
- glEnd();
- */
-
- if (colored) glPopAttrib();
- glPopAttrib();
- """
-},
-
-{
- "Type": "2",
"Name": "SqFilletConnection",
"Data": "float width;int flags; float blendw; int power;",
"Params": "float width, int flags, float blendw, int power",
Index: gzz/gzz/view/buoy/buoymanager.py
diff -u gzz/gzz/view/buoy/buoymanager.py:1.38
gzz/gzz/view/buoy/buoymanager.py:1.39
--- gzz/gzz/view/buoy/buoymanager.py:1.38 Thu Feb 13 11:29:05 2003
+++ gzz/gzz/view/buoy/buoymanager.py Fri Feb 14 06:09:32 2003
@@ -17,7 +17,7 @@
print "LOADING BUOYMANAGER"
-lineconn = GLRen.createSqAndLineConnector(.5, .5, .5, .5, 0, 0, 0, 0, 0, 1,
.3, 2,1)
+lineconn = GLRen.createLineConnector(.5, .5, .5, .5, 0, 0, 0, 0, 0, .3)
#lineconn = GLRen.createSqFilletConnection(30, 1, .125, 6)
size = jarray.zeros(2, 'f')
@@ -53,7 +53,7 @@
self.nadirCS = vs.translateCS(0, "NADIRORIGIN", self.ctrx,
1.5 * vs.size.height)
- vs.put(background((.5,.8,.5)))
+ vs.put(background((.36, .74, 1.0)))
center = vs.translateCS(0, "Center", self.ctrx, self.ctry)
@@ -81,7 +81,7 @@
anchorUnit = self.vs.unitSqCS(anchorCS, "UN")
anchorCenter = self.vs.translateCS(anchorUnit, "TR55", .5, .5)
x = self.ctrx
- r = self.ctry * 1.125
+ r = self.ctry * 1.05
print "Linkreally: ",direction, otherNode
if direction > 0:
buoy = self.vs.coords.buoyOnCircle(0, anchorCenter,