[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Gzz-commits] libvob include/vob/irregu/Irregu.hxx src/trans/...
From: |
Tuomas J. Lukka |
Subject: |
[Gzz-commits] libvob include/vob/irregu/Irregu.hxx src/trans/... |
Date: |
Wed, 23 Apr 2003 09:09:56 -0400 |
CVSROOT: /cvsroot/libvob
Module name: libvob
Changes by: Tuomas J. Lukka <address@hidden> 03/04/23 09:09:56
Modified files:
include/vob/irregu: Irregu.hxx
src/trans : Coorder.cxx
test/vob/gl : irregu.test
Log message:
More coorder dbg
CVSWeb URLs:
http://savannah.gnu.org/cgi-bin/viewcvs/libvob/libvob/include/vob/irregu/Irregu.hxx.diff?tr1=1.7&tr2=1.8&r1=text&r2=text
http://savannah.gnu.org/cgi-bin/viewcvs/libvob/libvob/src/trans/Coorder.cxx.diff?tr1=1.4&tr2=1.5&r1=text&r2=text
http://savannah.gnu.org/cgi-bin/viewcvs/libvob/libvob/test/vob/gl/irregu.test.diff?tr1=1.4&tr2=1.5&r1=text&r2=text
Patches:
Index: libvob/include/vob/irregu/Irregu.hxx
diff -u libvob/include/vob/irregu/Irregu.hxx:1.7
libvob/include/vob/irregu/Irregu.hxx:1.8
--- libvob/include/vob/irregu/Irregu.hxx:1.7 Sun Apr 20 07:01:38 2003
+++ libvob/include/vob/irregu/Irregu.hxx Wed Apr 23 09:09:56 2003
@@ -388,6 +388,8 @@
}
vertex(vert2[i][0] + shift0);
+ DBG(dbg_irregu) << "Slice1D loop pos5 \n";
+
if ((flags & DOTVEC_COLOR) && (flags & INTERP_DOTVEC)) {
DBG(dbg_irregu) << "Slice1D loop opt4 \n";
float angle = atan2(-norm[j].x, norm[j].y);
@@ -395,6 +397,7 @@
setDotVec(angle, angles, dotvec);
glColor4fv(dotvec);
}
+ DBG(dbg_irregu) << "Slice1D loop pos6 \n";
//colorfv(c0);
//colorfv2(c1);
@@ -406,6 +409,7 @@
multiTexCoord(u++, pt[j] - d * d0, texscale);
}
vertex(vert2[j][0] + shift0);
+ DBG(dbg_irregu) << "Slice1D loop pos7 \n";
if (multi > 0) glColor4f(0,0,dy1,.5*dy1);
colorfv(c0 + 4);
@@ -419,6 +423,7 @@
}
vertex(vert2[j][1] + shift1);
}
+ DBG(dbg_irregu) << "Slice1D loop pos8 \n";
}
glEnd();
Index: libvob/src/trans/Coorder.cxx
diff -u libvob/src/trans/Coorder.cxx:1.4 libvob/src/trans/Coorder.cxx:1.5
--- libvob/src/trans/Coorder.cxx:1.4 Tue Apr 1 10:06:52 2003
+++ libvob/src/trans/Coorder.cxx Wed Apr 23 09:09:56 2003
@@ -2,12 +2,13 @@
#include <vob/Coorder.hxx>
#include <vob/VecGL.hxx>
+#include <vob/Debug.hxx>
-#define DBG(cname) if(!cname);else (std::cout << "CallGL: ")
-static bool dbg;
namespace Vob {
+DBGVAR(dbg_coorder, "Coorder");
+
using namespace VecGL;
@@ -31,7 +32,7 @@
ZPt res = lerp(cs1.transform(p),
cs2.transform(p),
fract);
- DBG(dbg) << "PointInterp: "<<p<<": "<<fract<<" "<<
+ DBG(dbg_coorder) << "PointInterp: "<<p<<": "<<fract<<" "<<
cs1.transform(p) << " " << cs2.transform(p) << " "
<< res<<"\n";
return res;
@@ -74,12 +75,12 @@
cs2.performGL();
glGetFloatv(GL_MODELVIEW_MATRIX, mat2);
- DBG(dbg) << "PointInterp PerformGL!\n";
- if(dbg) {
- for(int i=0; i<16; i++) DBG(dbg) << mat1[i] << " ";
- DBG(dbg) << "\n";
- for(int i=0; i<16; i++) DBG(dbg) << mat2[i] << " ";
- DBG(dbg) << "\n";
+ DBG(dbg_coorder) << "PointInterp PerformGL!\n";
+ if(dbg_coorder) {
+ for(int i=0; i<16; i++) DBG(dbg_coorder) << mat1[i] << " ";
+ DBG(dbg_coorder) << "\n";
+ for(int i=0; i<16; i++) DBG(dbg_coorder) << mat2[i] << " ";
+ DBG(dbg_coorder) << "\n";
}
for(int i=0; i<16; i++)
((float *)mat)[i] = lerp(mat1[i], mat2[i], fract);
@@ -118,7 +119,7 @@
transformFactory(fac), cs1_tmp(0), cs2_tmp(0) {
}
Coorder::~Coorder() {
- DBG(dbg) << "Deleting coordset "<<this<<" "<<cs1_tmp<<" "<<cs2_tmp<<"\n";
+ DBG(dbg_coorder) << "Deleting coordset "<<this<<" "<<cs1_tmp<<"
"<<cs2_tmp<<"\n";
clean();
if(cs1_tmp) { delete cs1_tmp; cs1_tmp = 0; }
if(cs2_tmp) { delete cs2_tmp; cs2_tmp = 0; }
@@ -126,7 +127,7 @@
// Once types are checked, this method checks the parents.
bool Coorder::shouldInterpolate(int cs1, int cs2, int nprev) {
- DBG(dbg) << "Shouldinterp "<<cs1<<" "<<cs2<<" "<<nprev<<"\n";
+ DBG(dbg_coorder) << "Shouldinterp "<<cs1<<" "<<cs2<<" "<<nprev<<"\n";
for(int i=0; i<nprev; i++) {
int par1 = inds1[cs1+1+i];
if(!cs[par1]) return false;
@@ -135,7 +136,7 @@
int par1interpsto = (par1 > 0 ? interpinds[par1] : 0);
if(par1interpsto != par2) return false;
}
- DBG(dbg) << "DO interpolate\n";
+ DBG(dbg_coorder) << "DO interpolate\n";
return true;
}
@@ -144,7 +145,7 @@
int *interpinds,
int *inds2, float *points2,
float fract, bool show1) {
- DBG(dbg) << "Set points "<<ninds<<" "
+ DBG(dbg_coorder) << "Set points "<<ninds<<" "
<< inds1 << " "
<< points1 << " "
<< interpinds << " "
@@ -161,23 +162,23 @@
ASG(points2)
params.resize(0);
- DBG(dbg) << "Resized\n";
+ DBG(dbg_coorder) << "Resized\n";
params.reserve(3*ninds);
- DBG(dbg) << "Reserved\n";
+ DBG(dbg_coorder) << "Reserved\n";
cs.resize(ninds);
- DBG(dbg) << "Resized2\n";
+ DBG(dbg_coorder) << "Resized2\n";
cs[0] = new RootCoords();
- DBG(dbg) << "setroot\n";
+ DBG(dbg_coorder) << "setroot\n";
int lastIndSize = 1;
- DBG(dbg) << "Removing tmps "<<this<<" "<<cs1_tmp<<" "<<cs2_tmp<<"\n";
+ DBG(dbg_coorder) << "Removing tmps "<<this<<" "<<cs1_tmp<<"
"<<cs2_tmp<<"\n";
if(cs1_tmp) { delete cs1_tmp; cs1_tmp = 0; }
if(cs2_tmp) { delete cs2_tmp; cs2_tmp = 0; }
this->maxcs = ninds;
for(int i=1; i<ninds; i+=lastIndSize) {
- DBG(dbg) << "loop "<<i<<"\n";
+ DBG(dbg_coorder) << "loop "<<i<<"\n";
int parind = params.size();
int tp = inds1[i] & ~CSFLAGS;
@@ -198,7 +199,7 @@
ind1 = inds1[i+1+nprev];
csind2 = ((interpinds && i < interpinds[0]) ? interpinds[i] : -1);
- DBG(dbg) << "inds: "<<parind<<" typ:"<<tp<<" npars:"<<npars<<
+ DBG(dbg_coorder) << "inds: "<<parind<<" typ:"<<tp<<" npars:"<<npars<<
" ind1:"<<ind1<<" "<<csind2<<"\n";
@@ -228,7 +229,7 @@
}
} else {
for(int j = 0; j<npars; j++) {
- DBG(dbg) << "Interpolating "
+ DBG(dbg_coorder) << "Interpolating "
<<(ind1+j)<<" " <<(ind2+j)<<" = "
<< points1[ind1+j]<<" "<< points2[ind2+j]<<"\n";
params.push_back(
@@ -242,12 +243,12 @@
int parent = inds1[i+1+j];
Transform *parentcs = cs[parent];
if(parentcs == 0) {
- DBG(dbg) << "Parent "<<j<<" not interp\n";
+ DBG(dbg_coorder) << "Parent "<<j<<" not interp\n";
goto nextInd; // If parent's not interpolating, neither are
we.
}
prev[j] = parentcs;
}
- DBG(dbg) << "CS assigned "<<tp<<"\n";
+ DBG(dbg_coorder) << "CS assigned "<<tp<<"\n";
/** Finally, creates a new coordsys of demanded type and sets its
parents and
* params. If the initialized coordsys (according to its
initialized attributes)
@@ -259,7 +260,7 @@
} else {
interpolatePointwise:
// Now, the hairy case.
- DBG(dbg) << "It got hairy now: "<<tp<<" "<<t2<<"\n";
+ DBG(dbg_coorder) << "It got hairy now: "<<tp<<" "<<t2<<"\n";
if(!cs1_tmp) {
cs1_tmp = new Coorder(transformFactory);
cs1_tmp->setPoints(ninds, inds1, points1,
@@ -286,7 +287,7 @@
cs[i] = c;
if (!cs[i]->shouldBeDrawn()) {
- DBG(dbg) << "CS should not be drawn... freeing it with delete.\n";
+ DBG(dbg_coorder) << "CS should not be drawn... freeing it with
delete.\n";
delete cs[i]; // Must be deleted, because created with "new" in
factories.
cs[i] = NULL;
}
@@ -294,7 +295,7 @@
nextInd:
if(tmp_c) delete tmp_c;
}
- DBG(dbg) << "end: "<<cs1_tmp<<" "<<cs2_tmp<<"\n";
+ DBG(dbg_coorder) << "end: "<<cs1_tmp<<" "<<cs2_tmp<<"\n";
}
Coorder::iterator Coorder::begin() {
Index: libvob/test/vob/gl/irregu.test
diff -u libvob/test/vob/gl/irregu.test:1.4 libvob/test/vob/gl/irregu.test:1.5
--- libvob/test/vob/gl/irregu.test:1.4 Tue Apr 22 16:00:03 2003
+++ libvob/test/vob/gl/irregu.test Wed Apr 23 09:09:56 2003
@@ -37,7 +37,7 @@
for i in range(0,20):
if i % 5 == 0:
java.lang.System.gc()
- vob.gl.GL.freeQueue()
+ vob.gl.GL.freeQueue()
irregu = IrreguFrame(-2, -1.5, 2, 1.5, 0.2, 1.0, type="ellipse")
irregu2 = IrreguFrame(-2, -1.5, 2, 1.5, 0.2, 1.0)
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Gzz-commits] libvob include/vob/irregu/Irregu.hxx src/trans/...,
Tuomas J. Lukka <=