gzz-commits
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Gzz-commits] libvob ./rules.mk include/vob/geom/Fillets2.hxx...


From: Tuomas J. Lukka
Subject: [Gzz-commits] libvob ./rules.mk include/vob/geom/Fillets2.hxx...
Date: Wed, 04 Jun 2003 01:00:14 -0400

CVSROOT:        /cvsroot/libvob
Module name:    libvob
Changes by:     Tuomas J. Lukka <address@hidden>        03/06/04 01:00:14

Modified files:
        .              : rules.mk 
        include/vob/geom: Fillets2.hxx 
        include/vob/vobs: Fillet.hxx 
        src/jni        : Main.cxx 
        vob/demo/multifil: multifil.py 

Log message:
        Fillets2 nearly there

CVSWeb URLs:
http://savannah.gnu.org/cgi-bin/viewcvs/libvob/libvob/rules.mk.diff?tr1=1.21&tr2=1.22&r1=text&r2=text
http://savannah.gnu.org/cgi-bin/viewcvs/libvob/libvob/include/vob/geom/Fillets2.hxx.diff?tr1=1.3&tr2=1.4&r1=text&r2=text
http://savannah.gnu.org/cgi-bin/viewcvs/libvob/libvob/include/vob/vobs/Fillet.hxx.diff?tr1=1.7&tr2=1.8&r1=text&r2=text
http://savannah.gnu.org/cgi-bin/viewcvs/libvob/libvob/src/jni/Main.cxx.diff?tr1=1.15&tr2=1.16&r1=text&r2=text
http://savannah.gnu.org/cgi-bin/viewcvs/libvob/libvob/vob/demo/multifil/multifil.py.diff?tr1=1.5&tr2=1.6&r1=text&r2=text

Patches:
Index: libvob/include/vob/geom/Fillets2.hxx
diff -u libvob/include/vob/geom/Fillets2.hxx:1.3 
libvob/include/vob/geom/Fillets2.hxx:1.4
--- libvob/include/vob/geom/Fillets2.hxx:1.3    Tue Jun  3 08:52:40 2003
+++ libvob/include/vob/geom/Fillets2.hxx        Wed Jun  4 01:00:14 2003
@@ -174,7 +174,12 @@
            ZVec pt = fcenter + frad * dirVec(lerp(astart, aend, fract));
            ZVec proj = conn.projectToConnLine(pt);
            pt.z = proj.z;
-           if(intern) *intern = proj;
+           if(intern) {
+               if(fract > .94)
+                   *intern = node.ctr;
+               else
+                   *intern = proj;
+           }
            return pt;
        }
 
@@ -238,14 +243,14 @@
     template<class S1, class S2> struct LerpFilletSpan {
        const S1 &s1;
        const S2 &s2;
-       float fract;
-       LerpFilletSpan(const S1 &s1, const S2 &s2, float fract) : s1(s1), 
s2(s2), fract(fract) { }
+       float lerpfract;
+       LerpFilletSpan(const S1 &s1, const S2 &s2, float lerpfract) : s1(s1), 
s2(s2), lerpfract(lerpfract) { }
 
        ZVec point(float fract, ZVec *intern = 0) const {
            ZVec i1, i2;
-           ZVec res = lerp(s1.point(fract, &i1), s2.point(fract, &i2), fract);
+           ZVec res = lerp(s1.point(fract, &i1), s2.point(fract, &i2), 
lerpfract);
            if(intern)
-               *intern = lerp(i1, i2, fract);
+               *intern = lerp(i1, i2, lerpfract);
            return res;
        }
     };
Index: libvob/include/vob/vobs/Fillet.hxx
diff -u libvob/include/vob/vobs/Fillet.hxx:1.7 
libvob/include/vob/vobs/Fillet.hxx:1.8
--- libvob/include/vob/vobs/Fillet.hxx:1.7      Tue Jun  3 08:52:41 2003
+++ libvob/include/vob/vobs/Fillet.hxx  Wed Jun  4 01:00:14 2003
@@ -389,9 +389,12 @@
            LinearConnectionHalf vc2(node, va2, d2, th2, -1, lerp(p0.z, p2.z, 
.5));
            CircleCircleFillet vf2(node, vc2);
 
-           LinearConnectionHalf vc1(node, va1, d1, th1, -1, lerp(p0.z, p1.z, 
.5));
+           LinearConnectionHalf vc1(node, va1, d1, th1, 1, lerp(p0.z, p1.z, 
.5));
            CircleCircleFillet vf1(node, vc1);
 
+           DBG(dbg_vfillets) << "P cleave: "<< w1<<" "<<w2<<" "
+                   << ab<<" "<<fract<<" "<<va1<<" "<<va2<<
+                       "\n";
            renderSpan(
                    makeLerpFilletSpan(
                        FilletBlend(f1, vf2),
Index: libvob/rules.mk
diff -u libvob/rules.mk:1.21 libvob/rules.mk:1.22
--- libvob/rules.mk:1.21        Fri May 16 11:13:10 2003
+++ libvob/rules.mk     Wed Jun  4 01:00:14 2003
@@ -1,4 +1,4 @@
-GCCVER=3.2
+GCCVER=3.3
 
 .SUFFIXES: $(SUFFIXES) .dep .cxx .vobgenobj .transgenobj .vobdep .transdep 
.vobjniobj .transjniobj .vobgenjni .transgenjni .vobjnidep .transjnidep
 
Index: libvob/src/jni/Main.cxx
diff -u libvob/src/jni/Main.cxx:1.15 libvob/src/jni/Main.cxx:1.16
--- libvob/src/jni/Main.cxx:1.15        Thu May 29 04:00:20 2003
+++ libvob/src/jni/Main.cxx     Wed Jun  4 01:00:14 2003
@@ -24,6 +24,7 @@
  * Written by Tuomas J. Lukka
  */
 
+#include <assert.h>
 #include <callgl.hxx>
 
 #include <vob/jni/Types.hxx>
Index: libvob/vob/demo/multifil/multifil.py
diff -u libvob/vob/demo/multifil/multifil.py:1.5 
libvob/vob/demo/multifil/multifil.py:1.6
--- libvob/vob/demo/multifil/multifil.py:1.5    Tue Jun  3 08:52:41 2003
+++ libvob/vob/demo/multifil/multifil.py        Wed Jun  4 01:00:14 2003
@@ -53,14 +53,14 @@
 
        def pc(conns):
            vs.put(conns, [a,  b, c, d])
+           vs.put(GLRen.createDebugSwitch("Fillets", 1));
+           vs.put(GLRen.createDebugSwitch("VFillets", 1));
            vs.put(conns, [b,  a, d, e]);
+           vs.put(GLRen.createDebugSwitch("Fillets", 0));
+           vs.put(GLRen.createDebugSwitch("VFillets", 0));
            vs.put(conns, [c,  a]);
            vs.put(conns, [d,  a, b]);
-           #vs.put(GLRen.createDebugSwitch("Fillets", 1));
-           #vs.put(GLRen.createDebugSwitch("VFillets", 1));
            vs.put(conns, [e,  b]);
-           #vs.put(GLRen.createDebugSwitch("Fillets", 0));
-           #vs.put(GLRen.createDebugSwitch("VFillets", 0));
 
 
 




reply via email to

[Prev in Thread] Current Thread [Next in Thread]