[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Gzz-commits] libvob include/vob/Texture.hxx include/vob/geom...
From: |
Tuomas J. Lukka |
Subject: |
[Gzz-commits] libvob include/vob/Texture.hxx include/vob/geom... |
Date: |
Fri, 06 Jun 2003 16:04:23 -0400 |
CVSROOT: /cvsroot/libvob
Module name: libvob
Branch:
Changes by: Tuomas J. Lukka <address@hidden> 03/06/06 16:04:23
Modified files:
include/vob : Texture.hxx
include/vob/geom: Fillets2.hxx
include/vob/vobs: Fillet.hxx
lava/paper : fpexp.py
src/texture : Makefile Texture.cxx Texture_pipetexture.cxx
irregu.texture
vob : __init__.py
vob/buoy : buoymanager.py
vob/demo : fisheye.py fpfil.py fpfont.py irregu.py
lines.py vpmultifil.py
vob/demo/gl : bgfilegen.py glinfo.py
vob/demo/multifil: long.py multifil.py randgraph.py short.py
vob/demo/paper : basis.py combinerflow.py combiners.py
multipaper.py util.py
vob/gl : __init__.py
vob/paper : papermill.py texcache.py
vob/putil : demo.py misc.py
Log message:
Various cleanups
CVSWeb URLs:
http://savannah.gnu.org/cgi-bin/viewcvs/libvob/libvob/include/vob/Texture.hxx.diff?tr1=1.3&tr2=1.4&r1=text&r2=text
http://savannah.gnu.org/cgi-bin/viewcvs/libvob/libvob/include/vob/geom/Fillets2.hxx.diff?tr1=1.8&tr2=1.9&r1=text&r2=text
http://savannah.gnu.org/cgi-bin/viewcvs/libvob/libvob/include/vob/vobs/Fillet.hxx.diff?tr1=1.11&tr2=1.12&r1=text&r2=text
http://savannah.gnu.org/cgi-bin/viewcvs/libvob/libvob/lava/paper/fpexp.py.diff?tr1=1.1&tr2=1.2&r1=text&r2=text
http://savannah.gnu.org/cgi-bin/viewcvs/libvob/libvob/src/texture/Makefile.diff?tr1=1.3&tr2=1.4&r1=text&r2=text
http://savannah.gnu.org/cgi-bin/viewcvs/libvob/libvob/src/texture/Texture.cxx.diff?tr1=1.2&tr2=1.3&r1=text&r2=text
http://savannah.gnu.org/cgi-bin/viewcvs/libvob/libvob/src/texture/Texture_pipetexture.cxx.diff?tr1=1.5&tr2=1.6&r1=text&r2=text
http://savannah.gnu.org/cgi-bin/viewcvs/libvob/libvob/src/texture/irregu.texture.diff?tr1=1.3&tr2=1.4&r1=text&r2=text
http://savannah.gnu.org/cgi-bin/viewcvs/libvob/libvob/vob/__init__.py.diff?tr1=1.7&tr2=1.8&r1=text&r2=text
http://savannah.gnu.org/cgi-bin/viewcvs/libvob/libvob/vob/buoy/buoymanager.py.diff?tr1=1.25&tr2=1.26&r1=text&r2=text
http://savannah.gnu.org/cgi-bin/viewcvs/libvob/libvob/vob/demo/fisheye.py.diff?tr1=1.2&tr2=1.3&r1=text&r2=text
http://savannah.gnu.org/cgi-bin/viewcvs/libvob/libvob/vob/demo/fpfil.py.diff?tr1=1.5&tr2=1.6&r1=text&r2=text
http://savannah.gnu.org/cgi-bin/viewcvs/libvob/libvob/vob/demo/fpfont.py.diff?tr1=1.8&tr2=1.9&r1=text&r2=text
http://savannah.gnu.org/cgi-bin/viewcvs/libvob/libvob/vob/demo/irregu.py.diff?tr1=1.2&tr2=1.3&r1=text&r2=text
http://savannah.gnu.org/cgi-bin/viewcvs/libvob/libvob/vob/demo/lines.py.diff?tr1=1.1&tr2=1.2&r1=text&r2=text
http://savannah.gnu.org/cgi-bin/viewcvs/libvob/libvob/vob/demo/vpmultifil.py.diff?tr1=1.3&tr2=1.4&r1=text&r2=text
http://savannah.gnu.org/cgi-bin/viewcvs/libvob/libvob/vob/demo/gl/bgfilegen.py.diff?tr1=1.1&tr2=1.2&r1=text&r2=text
http://savannah.gnu.org/cgi-bin/viewcvs/libvob/libvob/vob/demo/gl/glinfo.py.diff?tr1=1.2&tr2=1.3&r1=text&r2=text
http://savannah.gnu.org/cgi-bin/viewcvs/libvob/libvob/vob/demo/multifil/long.py.diff?tr1=1.1&tr2=1.2&r1=text&r2=text
http://savannah.gnu.org/cgi-bin/viewcvs/libvob/libvob/vob/demo/multifil/multifil.py.diff?tr1=1.10&tr2=1.11&r1=text&r2=text
http://savannah.gnu.org/cgi-bin/viewcvs/libvob/libvob/vob/demo/multifil/randgraph.py.diff?tr1=1.8&tr2=1.9&r1=text&r2=text
http://savannah.gnu.org/cgi-bin/viewcvs/libvob/libvob/vob/demo/multifil/short.py.diff?tr1=1.1&tr2=1.2&r1=text&r2=text
http://savannah.gnu.org/cgi-bin/viewcvs/libvob/libvob/vob/demo/paper/basis.py.diff?tr1=1.2&tr2=1.3&r1=text&r2=text
http://savannah.gnu.org/cgi-bin/viewcvs/libvob/libvob/vob/demo/paper/combinerflow.py.diff?tr1=1.1&tr2=1.2&r1=text&r2=text
http://savannah.gnu.org/cgi-bin/viewcvs/libvob/libvob/vob/demo/paper/combiners.py.diff?tr1=1.2&tr2=1.3&r1=text&r2=text
http://savannah.gnu.org/cgi-bin/viewcvs/libvob/libvob/vob/demo/paper/multipaper.py.diff?tr1=1.2&tr2=1.3&r1=text&r2=text
http://savannah.gnu.org/cgi-bin/viewcvs/libvob/libvob/vob/demo/paper/util.py.diff?tr1=1.2&tr2=1.3&r1=text&r2=text
http://savannah.gnu.org/cgi-bin/viewcvs/libvob/libvob/vob/gl/__init__.py.diff?tr1=1.2&tr2=1.3&r1=text&r2=text
http://savannah.gnu.org/cgi-bin/viewcvs/libvob/libvob/vob/paper/papermill.py.diff?tr1=1.5&tr2=1.6&r1=text&r2=text
http://savannah.gnu.org/cgi-bin/viewcvs/libvob/libvob/vob/paper/texcache.py.diff?tr1=1.1&tr2=1.2&r1=text&r2=text
http://savannah.gnu.org/cgi-bin/viewcvs/libvob/libvob/vob/putil/demo.py.diff?tr1=1.7&tr2=1.8&r1=text&r2=text
http://savannah.gnu.org/cgi-bin/viewcvs/libvob/libvob/vob/putil/misc.py.diff?tr1=1.3&tr2=1.4&r1=text&r2=text
Patches:
Index: libvob/include/vob/Texture.hxx
diff -u libvob/include/vob/Texture.hxx:1.3 libvob/include/vob/Texture.hxx:1.4
--- libvob/include/vob/Texture.hxx:1.3 Sun Mar 23 15:15:58 2003
+++ libvob/include/vob/Texture.hxx Fri Jun 6 16:04:20 2003
@@ -30,12 +30,15 @@
#define __TEXTURE_HXX
#include <string>
+#include <vob/Debug.hxx>
namespace Vob {
/** Pre-rendered procedural textures.
*/
namespace Texture {
+
+PREDBGVAR(dbg);
class TextureParamImpl;
Index: libvob/include/vob/geom/Fillets2.hxx
diff -u libvob/include/vob/geom/Fillets2.hxx:1.8
libvob/include/vob/geom/Fillets2.hxx:1.9
--- libvob/include/vob/geom/Fillets2.hxx:1.8 Fri Jun 6 04:30:59 2003
+++ libvob/include/vob/geom/Fillets2.hxx Fri Jun 6 16:04:20 2003
@@ -127,6 +127,66 @@
};
+ /** A nonlinearly stretched circle fillet (test).
+ * Not blendable yet.
+ */
+ struct StretchedCircleFillet {
+ const CircularNode &node;
+ const LinearConnectionHalf &conn;
+ float tangentAngle;
+
+ Vec dirTang;
+
+ float r1;
+
+ float C;
+
+ float x0;
+ float x1;
+
+ StretchedCircleFillet(
+ const CircularNode &node,
+ const LinearConnectionHalf &conn,
+ float ta
+ ) : node(node), conn(conn), tangentAngle(ta) {
+ r1 = (.5*conn.t - sin(ta) * node.r) / (sin(ta) - 1);
+
+ x0 = cos(ta) * node.r;
+
+ float d0 = cos(ta) * r1;
+
+ C = (conn.d - x0 - d0) / (d0 * d0 * d0);
+
+ x1 = (node.r+r1) * cos(ta);
+
+ dirTang = dirVec(conn.a + conn.sign * tangentAngle);
+
+ }
+ ZVec point(float fract, ZVec *intern = 0) const {
+ float angle = lerp(0, M_PI/2 - tangentAngle, fract);
+
+ float y = (1-cos(angle)) * r1 + conn.t / 2;
+
+ float x = x1 - sin(angle) * r1 - x0;
+
+ float xn = x + C*x*x*x + x0;
+
+ ZVec pt = node.ctr + xn * conn.dir + y * conn.norm;
+
+ ZVec proj = conn.projectToConnLine(pt);
+ pt.z = proj.z;
+ if(intern) {
+ if(fract > .94)
+ *intern = node.ctr;
+ else
+ *intern = proj;
+ }
+ return pt;
+
+ }
+
+ };
+
/** An elliptical fillet meeting a circle.
* All the parameters that specify the shape come from outside.
*/
Index: libvob/include/vob/vobs/Fillet.hxx
diff -u libvob/include/vob/vobs/Fillet.hxx:1.11
libvob/include/vob/vobs/Fillet.hxx:1.12
--- libvob/include/vob/vobs/Fillet.hxx:1.11 Fri Jun 6 10:13:37 2003
+++ libvob/include/vob/vobs/Fillet.hxx Fri Jun 6 16:04:20 2003
@@ -300,8 +300,19 @@
LinearConnectionHalf c1(node, a1, d1, th1, 1, lerp(p0.z, p1.z, .5));
LinearConnectionHalf c2(node, a2, d2, th2, -1, lerp(p0.z, p2.z, .5));
- // Ellipses
- if(flags & 16) {
+ if(flags & 64) { // Stretched circle
+
+ StretchedCircleFillet f1(node, c1, conn1.a);
+ StretchedCircleFillet f2(node, c2, conn2.a);
+
+ renderSpan(f1, 1);
+ float ta1 = f1.dirTang.atan();
+ float ta2 = f2.dirTang.atan();
+ if(ta2 < ta1) ta2 += 2*M_PI;
+ renderSpan(CircularNodeSpan(node, ta1, ta2), 1);
+ renderSpan(f2, -1);
+
+ } else if(flags & 16) { // Ellipses
// For now, fix angle of attachment to the given angle
EllipseCircleFillet f1(node, c1, conn1.a);
EllipseCircleFillet f2(node, c2, conn2.a);
Index: libvob/lava/paper/fpexp.py
diff -u libvob/lava/paper/fpexp.py:1.1 libvob/lava/paper/fpexp.py:1.2
--- libvob/lava/paper/fpexp.py:1.1 Tue May 6 23:43:57 2003
+++ libvob/lava/paper/fpexp.py Fri Jun 6 16:04:20 2003
@@ -201,4 +201,4 @@
vs.put(GLRen.createQuad(2,2,1),
vs.orthoCS(0, "C", 0, 50, 50, 700, 700))
- putnoc(vs, getDListNocoords("PopAttrib"))
+ vs.put( getDListNocoords("PopAttrib"))
Index: libvob/src/texture/Makefile
diff -u libvob/src/texture/Makefile:1.3 libvob/src/texture/Makefile:1.4
--- libvob/src/texture/Makefile:1.3 Sun Mar 23 15:15:58 2003
+++ libvob/src/texture/Makefile Fri Jun 6 16:04:20 2003
@@ -2,6 +2,8 @@
include ../../rules.mk
+EXTRAOBJS := ../util/Debug.o
+
TEXTURE_OBJS := $(shell for file in *.texture; do echo $${file%.texture}.o;
done)
TEXTURE_EXES := $(shell for file in *.texture; do echo $${file%.texture}.bin;
done)
LIBS = -lglut
@@ -19,7 +21,7 @@
cat $<; echo "}}"; } > $${name}_tmp.generated.cxx; \
$(CXX) $(CXXFLAGS) -x c++ -c $${name}_tmp.generated.cxx -o $@
-%.bin : %.texture binmain.o Texture.o Makefile
+%.bin : %.texture binmain.o Texture.o $(EXTRAOBJS) Makefile
file=$<; \
name=$${file%.texture}; \
{ echo "#include \"vob/Texture.hxx\""; \
@@ -29,7 +31,7 @@
echo "};"; echo ""; \
echo "Texture *bin_texture = new $$name();"; echo "#line 1 \"$<\""; \
cat $<; echo "}}"; } > $${name}_tmp2.generated.cxx; \
- $(CXX) $(CXXFLAGS) $${name}_tmp2.generated.cxx Texture.o binmain.o -o
$@ ../util/Perlin.o
+ $(CXX) $(CXXFLAGS) $${name}_tmp2.generated.cxx Texture.o binmain.o
$(EXTRAOBJS) -o $@ ../util/Perlin.o
Texture_decl.generated.hxx: *.texture
for file in *.texture; do \
Index: libvob/src/texture/Texture.cxx
diff -u libvob/src/texture/Texture.cxx:1.2 libvob/src/texture/Texture.cxx:1.3
--- libvob/src/texture/Texture.cxx:1.2 Sun Mar 23 15:15:58 2003
+++ libvob/src/texture/Texture.cxx Fri Jun 6 16:04:20 2003
@@ -38,6 +38,7 @@
#include "vob/Texture.hxx"
namespace Vob { namespace Texture {
+DBGVAR(dbg, "Texture");
using std::string;
Index: libvob/src/texture/Texture_pipetexture.cxx
diff -u libvob/src/texture/Texture_pipetexture.cxx:1.5
libvob/src/texture/Texture_pipetexture.cxx:1.6
--- libvob/src/texture/Texture_pipetexture.cxx:1.5 Thu Mar 27 05:39:42 2003
+++ libvob/src/texture/Texture_pipetexture.cxx Fri Jun 6 16:04:20 2003
@@ -60,13 +60,13 @@
s += wbuf;
s += params->getParamString();
- cerr << "popen: "<<s<<"\n";
+ DBG(dbg) << "popen: "<<s<<"\n";
// XXX SECURITY
FILE *f = popen(s.c_str(), "r");
if(f == 0) {
- cerr << "POPEN FAILED!!! "<<strerror(errno)<<"\n";
+ cerr << "POPEN FAILED!!! "<<s<<"\n"<<strerror(errno)<<"\n";
return;
}
Index: libvob/src/texture/irregu.texture
diff -u libvob/src/texture/irregu.texture:1.3
libvob/src/texture/irregu.texture:1.4
--- libvob/src/texture/irregu.texture:1.3 Thu Mar 27 05:39:42 2003
+++ libvob/src/texture/irregu.texture Fri Jun 6 16:04:20 2003
@@ -101,7 +101,8 @@
texture,
width, height, depth, 4,
texparams);
- fprintf(stderr, "popen: %s", s);
+ if(0)
+ fprintf(stderr, "popen: %s", s);
// XXX SECURITY
FILE *f = popen(s, "r");
Index: libvob/vob/__init__.py
diff -u libvob/vob/__init__.py:1.7 libvob/vob/__init__.py:1.8
--- libvob/vob/__init__.py:1.7 Thu May 8 09:21:35 2003
+++ libvob/vob/__init__.py Fri Jun 6 16:04:20 2003
@@ -1,12 +1,12 @@
#foo
-print "VOB INIT"
+# print "VOB INIT"
import vob.gl
import vob.util
import vob.putil
-print "Vob init: Imported vob.putil: ",vob.putil
+# print "Vob init: Imported vob.putil: ",vob.putil
import org.nongnu.libvob as _libvob
import java as _java
Index: libvob/vob/buoy/buoymanager.py
diff -u libvob/vob/buoy/buoymanager.py:1.25 libvob/vob/buoy/buoymanager.py:1.26
--- libvob/vob/buoy/buoymanager.py:1.25 Mon May 26 15:05:41 2003
+++ libvob/vob/buoy/buoymanager.py Fri Jun 6 16:04:21 2003
@@ -141,7 +141,7 @@
into = self.vs.orthoBoxCS(buoy, "V"+str(linkId), -100, -w*sca/2.0,
-h*sca/2.0,
1, 1, w*sca, h*sca)
- if 0:
+ if 1:
dbg1 = self.vs.unitSqCS(into, "U")
self.vs.put(coloredQuad((0,1,0)), dbg1)
Index: libvob/vob/demo/fisheye.py
diff -u libvob/vob/demo/fisheye.py:1.2 libvob/vob/demo/fisheye.py:1.3
--- libvob/vob/demo/fisheye.py:1.2 Wed May 7 07:57:30 2003
+++ libvob/vob/demo/fisheye.py Fri Jun 6 16:04:21 2003
@@ -41,7 +41,7 @@
self.repl = 0
return self.vs
self.vs = vs
- putnoc(vs, background((.0,.7,.6)))
+ vs.put( background((.0,.7,.6)))
size = vs.getSize()
Index: libvob/vob/demo/fpfil.py
diff -u libvob/vob/demo/fpfil.py:1.5 libvob/vob/demo/fpfil.py:1.6
--- libvob/vob/demo/fpfil.py:1.5 Tue May 6 23:43:57 2003
+++ libvob/vob/demo/fpfil.py Fri Jun 6 16:04:21 2003
@@ -220,5 +220,5 @@
vs.put(GLRen.createQuad(40,40,1),
vs.orthoCS(0, "C", 0, 100, 500, 20, 20))
- putnoc(vs, getDListNocoords("PopAttrib"))
+ vs.put( getDListNocoords("PopAttrib"))
Index: libvob/vob/demo/fpfont.py
diff -u libvob/vob/demo/fpfont.py:1.8 libvob/vob/demo/fpfont.py:1.9
--- libvob/vob/demo/fpfont.py:1.8 Tue Apr 29 07:22:41 2003
+++ libvob/vob/demo/fpfont.py Fri Jun 6 16:04:21 2003
@@ -573,13 +573,13 @@
AbstractUpdateManager.chg()
return self.vs
- putnoc(vs, background((1,1,1)))
+ vs.put( background((1,1,1)))
fpid = fp[self.prognum].getProgId()
print fpid
- putnoc(vs, getDListNocoords("""
+ vs.put( getDListNocoords("""
PushAttrib ENABLE_BIT CURRENT_BIT COLOR_BUFFER_BIT TEXTURE_BIT
BindProgram FRAGMENT_PROGRAM_ARB %s
@@ -629,7 +629,7 @@
csi = vs.orthoCS(cs, str(i), 0, 0, y, 2*i, 2*i)
vs.put(tx, csi)
- putnoc(vs, getDListNocoords("PopAttrib"))
+ vs.put( getDListNocoords("PopAttrib"))
self.vs = vs
self.parcs = parcs
Index: libvob/vob/demo/gl/bgfilegen.py
diff -u libvob/vob/demo/gl/bgfilegen.py:1.1 libvob/vob/demo/gl/bgfilegen.py:1.2
--- libvob/vob/demo/gl/bgfilegen.py:1.1 Wed Apr 30 06:06:13 2003
+++ libvob/vob/demo/gl/bgfilegen.py Fri Jun 6 16:04:22 2003
@@ -53,7 +53,7 @@
def scene(self, vs):
size = vs.getSize()
- putnoc(vs, background(self.bgcolor))
+ vs.put( background(self.bgcolor))
self.pq = self.getPaper(self.seed)
Index: libvob/vob/demo/gl/glinfo.py
diff -u libvob/vob/demo/gl/glinfo.py:1.2 libvob/vob/demo/gl/glinfo.py:1.3
--- libvob/vob/demo/gl/glinfo.py:1.2 Mon Apr 28 03:06:24 2003
+++ libvob/vob/demo/gl/glinfo.py Fri Jun 6 16:04:22 2003
@@ -34,7 +34,7 @@
def key(self, k):
pass
def scene(self, vs):
- putnoc(vs, background(self.bgcolor))
+ vs.put( background(self.bgcolor))
size = vs.getSize()
Index: libvob/vob/demo/irregu.py
diff -u libvob/vob/demo/irregu.py:1.2 libvob/vob/demo/irregu.py:1.3
--- libvob/vob/demo/irregu.py:1.2 Mon Apr 14 09:44:02 2003
+++ libvob/vob/demo/irregu.py Fri Jun 6 16:04:21 2003
@@ -118,11 +118,7 @@
pass
def scene(self, vs):
- putnoc(vs, background((0.1,0.4,0.5)))
-
- #putnoc(vs, getDListNocoords("Translate -1000 -1000 0\nScale 4 4 4\n"))
-
- #cs2 = vs.coords.affine(0, 10, self.x1, self.y1, self.xs, 0, 0,
self.ys)
+ vs.put( background((0.1,0.4,0.5)))
cs2 = vs.coords.affine(
0, 0, self.x1, self.y1,
@@ -131,7 +127,6 @@
vs.matcher.add(cs2, "2")
- #if self.type == "square":
cs2 = vs.coords.affine(cs2, 0, -1, -1, 2, 0, 0, 2 )
vs.matcher.add(cs2, "2box")
@@ -147,7 +142,6 @@
if self.distort:
cs1 = cs1_d
- #vs.map.put(self.mask, cs2)
if self.mode & 4:
vs.map.put(self.mask, cs1)
Index: libvob/vob/demo/lines.py
diff -u libvob/vob/demo/lines.py:1.1 libvob/vob/demo/lines.py:1.2
--- libvob/vob/demo/lines.py:1.1 Tue Apr 29 20:33:56 2003
+++ libvob/vob/demo/lines.py Fri Jun 6 16:04:21 2003
@@ -19,7 +19,7 @@
self.y = m.getY()
def scene(self, vs):
- putnoc(vs, background((0.1,0.4,0.5)))
+ vs.put( background((0.1,0.4,0.5)))
vs.put( vob.vobs.ContinuousLineVob( 12.0, [0,0, self.x, self.y]), -1)
Index: libvob/vob/demo/multifil/long.py
diff -u libvob/vob/demo/multifil/long.py:1.1
libvob/vob/demo/multifil/long.py:1.2
--- libvob/vob/demo/multifil/long.py:1.1 Fri May 30 04:52:38 2003
+++ libvob/vob/demo/multifil/long.py Fri Jun 6 16:04:23 2003
@@ -23,7 +23,7 @@
Toggle("lines", 0, "Toggle showing lines", "l"),
)
def scene(self, vs):
- putnoc(vs, background((.5,1,.2)))
+ vs.put( background((.5,1,.2)))
vs.put(getDListNocoords("""
PushAttrib POLYGON_BIT
Enable DEPTH_TEST
Index: libvob/vob/demo/multifil/multifil.py
diff -u libvob/vob/demo/multifil/multifil.py:1.10
libvob/vob/demo/multifil/multifil.py:1.11
--- libvob/vob/demo/multifil/multifil.py:1.10 Fri Jun 6 10:13:37 2003
+++ libvob/vob/demo/multifil/multifil.py Fri Jun 6 16:04:23 2003
@@ -24,12 +24,13 @@
Toggle("depthColor", 0, "Color from depth", "d"),
Toggle("lines", 0, "Toggle showing lines", "l"),
Toggle("ellipses", 1, "Toggle ellipses", "s"),
+ Toggle("stretched", 1, "Toggle stretched", "v"),
Toggle("curvature", 1, "Show curvature", "c"),
SlideLin("size", 50, 5, "Node size", "K", "k"),
SlideLin("dice", 20, 1, "Dice factor", "P", "p"),
)
def scene(self, vs):
- putnoc(vs, background((.5,1,.2)))
+ vs.put( background((.5,1,.2)))
vs.put(getDListNocoords("""
PushAttrib POLYGON_BIT
Enable DEPTH_TEST
@@ -49,15 +50,15 @@
border = 2
conns = GLRen.createSortedConnections(
GLRen.createFilletSpan2(border, self.dice,
- 1 + 4*self.depthColor + 16 * self.ellipses),
+ 1 + 4*self.depthColor + 16 * self.ellipses + 64 *
self.stretched),
2)
conns_l = GLRen.createSortedConnections(
GLRen.createFilletSpan2(border, self.dice,
- 2 + 4*self.depthColor + 16 * self.ellipses),
+ 2 + 4*self.depthColor + 16 * self.ellipses + 64 *
self.stretched),
2)
conns_c = GLRen.createSortedConnections(
GLRen.createFilletSpan2(1000, self.dice,
- 2 + 4*self.depthColor + 16 * self.ellipses + 32),
+ 2 + 4*self.depthColor + 16 * self.ellipses + 64 *
self.stretched + 32),
2)
a = vs.orthoBoxCS(0, "A", 0, 100, 100, 1, 1, self.size, self.size);
@@ -75,11 +76,11 @@
vs.put(conns, [thick, angle, b, e]);
# vs.put(GLRen.createDebugSwitch("Fillets", 1));
- vs.put(GLRen.createDebugSwitch("VFillets", 1));
+# vs.put(GLRen.createDebugSwitch("VFillets", 1));
#vs.put(GLRen.createDebugSwitch("Quadrics", 1));
vs.put(conns, [thick, angle, e, b]);
# vs.put(GLRen.createDebugSwitch("Fillets", 0));
- vs.put(GLRen.createDebugSwitch("VFillets", 0));
+# vs.put(GLRen.createDebugSwitch("VFillets", 0));
#vs.put(GLRen.createDebugSwitch("Quadrics", 0));
Index: libvob/vob/demo/multifil/randgraph.py
diff -u libvob/vob/demo/multifil/randgraph.py:1.8
libvob/vob/demo/multifil/randgraph.py:1.9
--- libvob/vob/demo/multifil/randgraph.py:1.8 Wed Jun 4 05:44:13 2003
+++ libvob/vob/demo/multifil/randgraph.py Fri Jun 6 16:04:23 2003
@@ -27,7 +27,7 @@
SlideLin("seed", 42, 1, "seed number", "S", "s"),
)
def scene(self, vs):
- putnoc(vs, background((.5,1,.2)))
+ vs.put( background((.5,1,.2)))
vs.put(getDListNocoords("""
PushAttrib POLYGON_BIT
Enable DEPTH_TEST
Index: libvob/vob/demo/multifil/short.py
diff -u libvob/vob/demo/multifil/short.py:1.1
libvob/vob/demo/multifil/short.py:1.2
--- libvob/vob/demo/multifil/short.py:1.1 Fri May 30 04:52:38 2003
+++ libvob/vob/demo/multifil/short.py Fri Jun 6 16:04:23 2003
@@ -23,7 +23,7 @@
Toggle("lines", 0, "Toggle showing lines", "l"),
)
def scene(self, vs):
- putnoc(vs, background((.5,1,.2)))
+ vs.put( background((.5,1,.2)))
vs.put(getDListNocoords("""
PushAttrib POLYGON_BIT
Enable DEPTH_TEST
Index: libvob/vob/demo/paper/basis.py
diff -u libvob/vob/demo/paper/basis.py:1.2 libvob/vob/demo/paper/basis.py:1.3
--- libvob/vob/demo/paper/basis.py:1.2 Mon Apr 28 03:06:24 2003
+++ libvob/vob/demo/paper/basis.py Fri Jun 6 16:04:23 2003
@@ -32,7 +32,7 @@
def key(self, k):
pass
def scene(self, vs):
- vs.map.put(background((.7,.8,.7)))
+ vs.put(background((.7,.8,.7)))
print self.tex
(x,y) = (0,0)
sp = 10
@@ -40,7 +40,7 @@
(w,h) = (size,size)
total = 0
for t in self.tex:
- putnoc(vs, getDListNocoords("Color 1 1 1"))
+ vs.put( getDListNocoords("Color 1 1 1"))
vs.put(quad((t.getTexId())), 0, sp + x*(w+sp), sp + y*(h+sp), w, h)
x += 1
if x>3:
Index: libvob/vob/demo/paper/combinerflow.py
diff -u libvob/vob/demo/paper/combinerflow.py:1.1
libvob/vob/demo/paper/combinerflow.py:1.2
--- libvob/vob/demo/paper/combinerflow.py:1.1 Thu Apr 10 10:00:19 2003
+++ libvob/vob/demo/paper/combinerflow.py Fri Jun 6 16:04:23 2003
@@ -36,7 +36,7 @@
self.pt.key(k)
def scene(self, vs):
- putnoc(vs, background(self.bgcolor))
+ vs.put( background(self.bgcolor))
self.pt.place(vs,
vs.orthoCS(0, "S1", 0, 10, 10, 100, 100),
Index: libvob/vob/demo/paper/combiners.py
diff -u libvob/vob/demo/paper/combiners.py:1.2
libvob/vob/demo/paper/combiners.py:1.3
--- libvob/vob/demo/paper/combiners.py:1.2 Mon Apr 28 03:06:24 2003
+++ libvob/vob/demo/paper/combiners.py Fri Jun 6 16:04:23 2003
@@ -50,7 +50,7 @@
# self.pt.key(k)
def scene(self, vs):
- putnoc(vs, background(self.bgcolor))
+ vs.put( background(self.bgcolor))
cs = vs.orthoCS(0, "S1", 0, 50, 50, 400, 400)
self.pt.place(vs, cs, "RGB0", self.combinercodes[self.ccind], "RGB1")
Index: libvob/vob/demo/paper/multipaper.py
diff -u libvob/vob/demo/paper/multipaper.py:1.2
libvob/vob/demo/paper/multipaper.py:1.3
--- libvob/vob/demo/paper/multipaper.py:1.2 Mon Apr 28 03:06:24 2003
+++ libvob/vob/demo/paper/multipaper.py Fri Jun 6 16:04:23 2003
@@ -110,7 +110,7 @@
def scene(self, vs):
size = vs.getSize()
- putnoc(vs, background(self.bgcolor))
+ vs.put( background(self.bgcolor))
cs1w = .47*size.width/self.w
Index: libvob/vob/demo/paper/util.py
diff -u libvob/vob/demo/paper/util.py:1.2 libvob/vob/demo/paper/util.py:1.3
--- libvob/vob/demo/paper/util.py:1.2 Mon Apr 28 03:06:24 2003
+++ libvob/vob/demo/paper/util.py Fri Jun 6 16:04:23 2003
@@ -70,11 +70,11 @@
AbstractUpdateManager.chg()
def scene(self, vs):
- putnoc(vs, background(self.bgcolor))
+ vs.put( background(self.bgcolor))
cs1 = vs.coords.affine(0, "1", 0, -90, 0, 1, 0, 0, 1)
- putnoc(vs, getDListNocoords("""
+ vs.put( getDListNocoords("""
PointSize 1
Disable TEXTURE_2D
PushMatrix
@@ -84,7 +84,7 @@
rotate(vs, "rot", self.angle, -1, 1, 1)
vs.map.put(cmap, cs1)
poptrans(vs, "rot")
- putnoc(vs, getDListNocoords("""
+ vs.put( getDListNocoords("""
PopMatrix
"""))
Index: libvob/vob/demo/vpmultifil.py
diff -u libvob/vob/demo/vpmultifil.py:1.3 libvob/vob/demo/vpmultifil.py:1.4
--- libvob/vob/demo/vpmultifil.py:1.3 Fri May 23 04:52:34 2003
+++ libvob/vob/demo/vpmultifil.py Fri Jun 6 16:04:21 2003
@@ -164,7 +164,7 @@
SlideLin("ang", 0, .1, "Rotation", "Prior", "Next"),
)
def scene(self, vs):
- putnoc(vs, background((.2,1,1)))
+ vs.put( background((.2,1,1)))
vs.put(getDListNocoords("""
PushAttrib ENABLE_BIT CURRENT_BIT COLOR_BUFFER_BIT TEXTURE_BIT
@@ -208,6 +208,6 @@
vs.put(q, 0)
- putnoc(vs, getDListNocoords("PopAttrib"))
+ vs.put( getDListNocoords("PopAttrib"))
Index: libvob/vob/gl/__init__.py
diff -u libvob/vob/gl/__init__.py:1.2 libvob/vob/gl/__init__.py:1.3
--- libvob/vob/gl/__init__.py:1.2 Thu Apr 10 14:01:15 2003
+++ libvob/vob/gl/__init__.py Fri Jun 6 16:04:23 2003
@@ -4,7 +4,7 @@
import org.nongnu.libvob.gl as _gl
import vob.gl as _this
-print "Importing GL: ",dir(_gl)
+# print "Importing GL: ",dir(_gl)
for i in dir(_gl):
if _java.lang.Character.isUpperCase(i[0]):
Index: libvob/vob/paper/papermill.py
diff -u libvob/vob/paper/papermill.py:1.5 libvob/vob/paper/papermill.py:1.6
--- libvob/vob/paper/papermill.py:1.5 Wed Apr 30 06:08:56 2003
+++ libvob/vob/paper/papermill.py Fri Jun 6 16:04:23 2003
@@ -41,7 +41,7 @@
from org.nongnu.libvob.gl import PaperOptions
paperopt = PaperOptions.instance();
-dbg=1
+dbg=0
# Discriminate between different renderers.
# These are for debug output only.
if dbg:
@@ -200,13 +200,17 @@
TexParameter TEXTURE_2D TEXTURE_MAG_FILTER LINEAR
BindTexture TEXTURE_2D 0
""" % locals())
- print "READ: ", 0, vs.getSize().height-1-s, s, s
+
+ if dbg:
+ print "READ: ", 0, vs.getSize().height-1-s, s, s
+
tex.copyTexImage2D(w.getRenderingSurface(),
"FRONT", "TEXTURE_2D", 0,
"RGB", 0, vs.getSize().height-1-s,
s, s, 0)
- vob.putil.texture.printTex(tex.getTexId())
+ if dbg:
+ vob.putil.texture.printTex(tex.getTexId())
npap = PaperHanger()
npap.setNPasses(1)
@@ -233,7 +237,8 @@
ppass.setNTexGens(1)
# t = pap.repeat.vecs
t = v
- print "T ",t
+ if dbg:
+ print "T ",t
ppass.putNormalTexGen(0,
[ t[0][0], t[0][1], 0, 0,
-t[1][0], -t[1][1], 0, 0,
@@ -270,7 +275,7 @@
#from org.nongnu.libvob.paper.texcomb_NV2X import
TransparentCombinerPass,DebugCombinerPass
else:
# Must use OpenGL 1.1 specified calls.
- print "Using OpenGL 1.1 texenv and blending"
+ if dbg: print "Using OpenGL 1.1 texenv and blending"
texcomb = vob.paper.texcomb_GL1_1
self.paperopts.use_opengl_1_1 = 1
Index: libvob/vob/paper/texcache.py
diff -u libvob/vob/paper/texcache.py:1.1 libvob/vob/paper/texcache.py:1.2
--- libvob/vob/paper/texcache.py:1.1 Thu Apr 10 10:00:19 2003
+++ libvob/vob/paper/texcache.py Fri Jun 6 16:04:23 2003
@@ -33,6 +33,8 @@
from java.io import File
import os
+dbg = 0
+
if not globals().has_key("texcache"):
texcache = {}
@@ -63,6 +65,7 @@
texcache[key] = tex
texcache[(key,"ctime")] = srctime
- print "SHADER: ", res, tex.getTexId()
+ if dbg:
+ print "SHADER: ", res, tex.getTexId()
return tex
Index: libvob/vob/putil/demo.py
diff -u libvob/vob/putil/demo.py:1.7 libvob/vob/putil/demo.py:1.8
--- libvob/vob/putil/demo.py:1.7 Thu Jun 5 03:15:31 2003
+++ libvob/vob/putil/demo.py Fri Jun 6 16:04:23 2003
@@ -205,7 +205,12 @@
elif not globalkey(s):
currentScene.key(s)
else:
- currentScene.key(s)
+ if s == "Ctrl-Q":
+ System.exit(43)
+ elif s == "Ctrl-R":
+ loadScenes()
+ else:
+ currentScene.key(s)
vob.AbstractUpdateManager.chg()
def mouse(self, e):
# print "MOUSE: '%s'"%e
Index: libvob/vob/putil/misc.py
diff -u libvob/vob/putil/misc.py:1.3 libvob/vob/putil/misc.py:1.4
--- libvob/vob/putil/misc.py:1.3 Thu May 1 20:06:30 2003
+++ libvob/vob/putil/misc.py Fri Jun 6 16:04:23 2003
@@ -101,8 +101,8 @@
def putText(vs, cs1, text, color = None, x = 0, y = 0, z = 0, h = 1, key =
None):
if color != None:
- putnoc(vs, getDListNocoords("Color " + js(color)))
- putnoc(vs, getDListNocoords("""
+ vs.put( getDListNocoords("Color " + js(color)))
+ vs.put( getDListNocoords("""
PushAttrib ENABLE_BIT
Disable ALPHA_TEST
Disable DEPTH_TEST
@@ -118,7 +118,7 @@
vs.map.put(t, cs)
- putnoc(vs, getDListNocoords("""
+ vs.put( getDListNocoords("""
PopAttrib
"""))
@@ -132,9 +132,6 @@
def js(list):
return " ".join([str(el) for el in list])
-def rotatelist(list):
- list.append(list.pop(0))
-
def getDList(s):
return GLCache.getCallListCoorded(s)
@@ -174,13 +171,3 @@
def floats(start, end, n):
return [float(x) * (end-start) / n + start
for x in range(0,n+1)]
-def putAffine(vs, vob, key, d, x, y, xx, xy, yx, yy):
- cs = vs.coords.affineCoordsys(key,
- 0, x, y, xx, xy, yx, yy)
- vs.map.put(vob, cs)
-
-
-
-def putnoc(vs, noc):
- vs.map.put(noc)
-
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Gzz-commits] libvob include/vob/Texture.hxx include/vob/geom...,
Tuomas J. Lukka <=