[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Gzz-commits] libvob ./rules.mk include/vob/Vec23.hxx include...
From: |
Tuomas J. Lukka |
Subject: |
[Gzz-commits] libvob ./rules.mk include/vob/Vec23.hxx include... |
Date: |
Fri, 16 May 2003 11:13:10 -0400 |
CVSROOT: /cvsroot/libvob
Module name: libvob
Changes by: Tuomas J. Lukka <address@hidden> 03/05/16 11:13:10
Modified files:
. : rules.mk
include/vob : Vec23.hxx
include/vob/vobs: Paper.hxx
Log message:
Proofing paperquads against singular cs
CVSWeb URLs:
http://savannah.gnu.org/cgi-bin/viewcvs/libvob/libvob/rules.mk.diff?tr1=1.20&tr2=1.21&r1=text&r2=text
http://savannah.gnu.org/cgi-bin/viewcvs/libvob/libvob/include/vob/Vec23.hxx.diff?tr1=1.6&tr2=1.7&r1=text&r2=text
http://savannah.gnu.org/cgi-bin/viewcvs/libvob/libvob/include/vob/vobs/Paper.hxx.diff?tr1=1.9&tr2=1.10&r1=text&r2=text
Patches:
Index: libvob/include/vob/Vec23.hxx
diff -u libvob/include/vob/Vec23.hxx:1.6 libvob/include/vob/Vec23.hxx:1.7
--- libvob/include/vob/Vec23.hxx:1.6 Tue Apr 1 10:06:52 2003
+++ libvob/include/vob/Vec23.hxx Fri May 16 11:13:10 2003
@@ -40,6 +40,10 @@
template <class T>class Vector;
template <class T>class Vector3;
+ inline float finitize(float f) {
+ return finitef(f) ? f : 0;
+ }
+
/** A 2D vector.
*/
template <class T>class Vector {
@@ -59,6 +63,13 @@
/** Create from an array.
*/
Vector(T *v) : x(v[0]), y(v[1]) { }
+
+ /** Making all components finite.
+ */
+ Vector finitized() const {
+ return Vector(finitize(x), finitize(y));
+ }
+
/** Multiplication by scalar.
*/
Vector operator*(const double &s) const { return Vector(s * x, s * y); }
@@ -117,6 +128,12 @@
/** From a 2D vector and an optional Z-component.
*/
Vector3(const Vector<T> &v, float z = 0) : x(v.x), y(v.y), z(z) { }
+
+ /** Making all components finite.
+ */
+ Vector3 finitized() const {
+ return Vector3(finitize(x), finitize(y), finitize(z));
+ }
/** Multiplication by scalar.
*/
Index: libvob/include/vob/vobs/Paper.hxx
diff -u libvob/include/vob/vobs/Paper.hxx:1.9
libvob/include/vob/vobs/Paper.hxx:1.10
--- libvob/include/vob/vobs/Paper.hxx:1.9 Wed May 14 18:03:30 2003
+++ libvob/include/vob/vobs/Paper.hxx Fri May 16 11:13:10 2003
@@ -53,7 +53,7 @@
int append(Pt p) {
DBG(dbg_paperquad) << "DiceTester append "<<p<<"\n";
int ind = points.size();
- points.push_back(T2V3Vert(p, t.transform(p)));
+ points.push_back(T2V3Vert(p, t.transform(p).finitized()));
DBG(dbg_paperquad) << "DiceTester append ret "<<ind<<"\n";
return ind;
}
@@ -137,7 +137,7 @@
v.points[i].final +
v.points[j].final +
v.points[k].final );
- ZPt tc = v.t.transform(ctr);
+ ZPt tc = v.t.transform(ctr).finitized();
if( (tc-ctrt).xylength() < dicelen1) {
DBG(dbg_paperquad) << "NO SPLIT\n";
return -1;
Index: libvob/rules.mk
diff -u libvob/rules.mk:1.20 libvob/rules.mk:1.21
--- libvob/rules.mk:1.20 Tue Apr 29 21:00:14 2003
+++ libvob/rules.mk Fri May 16 11:13:10 2003
@@ -26,7 +26,7 @@
OPTIMIZE = -O0
CPPFLAGS = -I../include -I../../libvob-depends -I../../include $(EXTRAINCLUDE)
-I../../callgl/include -I../../../callgl/include
-I../../callgl/include/glwrapper -I../../../callgl/include/glwrapper
-I../../glmosaictext/include -I../../../glmosaictext/include
-I/usr/include/freetype2 `gdk-pixbuf-config --cflags`
-CXXFLAGS = -g -Wall $(OPTIMIZE) $(CPPFLAGS)
+CXXFLAGS = -g -Wall $(OPTIMIZE) $(CPPFLAGS)
CCFLAGS = -g -Wall
SHARED = -shared
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Gzz-commits] libvob ./rules.mk include/vob/Vec23.hxx include...,
Tuomas J. Lukka <=