[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Gzz-commits] gzz ./TODO gzz/client/AbstractUpdateManager.java
From: |
Asko Soukka |
Subject: |
[Gzz-commits] gzz ./TODO gzz/client/AbstractUpdateManager.java |
Date: |
Thu, 28 Nov 2002 03:41:49 -0500 |
CVSROOT: /cvsroot/gzz
Module name: gzz
Changes by: Asko Soukka <address@hidden> 02/11/28 03:41:48
Modified files:
. : TODO
gzz/client : AbstractUpdateManager.java
Log message:
Recalibrated and embedded recalibrator. Since I don't still understand
how
SimpleCalculator works exactly, I don't know is this a really good idea.
Seems to work, though.
CVSWeb URLs:
http://savannah.gnu.org/cgi-bin/viewcvs/gzz/gzz/TODO.diff?tr1=1.424&tr2=1.425&r1=text&r2=text
http://savannah.gnu.org/cgi-bin/viewcvs/gzz/gzz/gzz/client/AbstractUpdateManager.java.diff?tr1=1.21&tr2=1.22&r1=text&r2=text
Patches:
Index: gzz/TODO
diff -u gzz/TODO:1.424 gzz/TODO:1.425
--- gzz/TODO:1.424 Thu Nov 28 01:59:21 2002
+++ gzz/TODO Thu Nov 28 03:41:48 2002
@@ -70,8 +70,6 @@
- when a gl window is closed, call Binder.windowClosed()
mudyc:
-fix documentation script
- humppake:
- + try to doc/fix SimpleCalculator in AbstractUpdateManager:
tjl:
- return ANKOS to Agora
- demo movie of irregu general stuff
@@ -240,6 +238,7 @@
+ better algorithm for CullingCoordSys. Uses now parallel
bounding boxes. Fast, but not very efficient.
+ implement Paper TexGenEmboss::setUp_explicit
+ + try to understand/doc SimpleCalculator in AbstractUpdateManager
tjl:
+ xupdf: distorted multi-page PDF view with xu links
+ adjustable zoom / distortion area by mouse
Index: gzz/gzz/client/AbstractUpdateManager.java
diff -u gzz/gzz/client/AbstractUpdateManager.java:1.21
gzz/gzz/client/AbstractUpdateManager.java:1.22
--- gzz/gzz/client/AbstractUpdateManager.java:1.21 Wed Sep 18 21:20:05 2002
+++ gzz/gzz/client/AbstractUpdateManager.java Thu Nov 28 03:41:48 2002
@@ -41,7 +41,7 @@
*/
public abstract class AbstractUpdateManager implements Runnable {
-public static final String rcsid = "$Id: AbstractUpdateManager.java,v 1.21
2002/09/19 01:20:05 tjl Exp $";
+public static final String rcsid = "$Id: AbstractUpdateManager.java,v 1.22
2002/11/28 08:41:48 humppake Exp $";
public static boolean dbg = false;
private static void pa(String s) { System.err.println(s); }
@@ -171,7 +171,7 @@
}
}
- static public int defaultAnimationTime = 2500;
+ static public int defaultAnimationTime = 1000;
private int animationtime = defaultAnimationTime;
public static void setNoAnimation() {
@@ -260,7 +260,7 @@
}
}
static public class SimpleCalculator implements FractCalculator {
- protected float r = 10, n = 2;
+ protected static float r = 2f, n = 0.4f;
int millis = 0; // see defaultAnimationTime
protected long startTime = 0;
public void eventAt(long time) {
@@ -276,8 +276,18 @@
}
public boolean isOver(long time) {
float x = (time-startTime)/((float)millis);
- x = x + x*x;
- return -x*r < Math.log(0.02);
+ if (-(x + x*x)*r < Math.log(0.02)) {
+ if (Math.abs(time-startTime-millis) > 100) {
+ /** If animation time was either 'too fast' or
+ * 'too slow', we recalibrate r and n.
+ */
+ if (dbg) pa("x: " + x + " r: " + r + " n: " + n +
+ " millis: " + (time - startTime));
+ r *= x; n *= x;
+ }
+ return true;
+ }
+ return false;
}
public void callRender(long time, Window w) {
- [Gzz-commits] gzz ./TODO gzz/client/AbstractUpdateManager.java,
Asko Soukka <=