gzz-commits
[Top][All Lists]
Advanced

[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: Fri, 29 Nov 2002 09:18:45 -0500

CVSROOT:        /cvsroot/gzz
Module name:    gzz
Changes by:     Asko Soukka <address@hidden>    02/11/29 09:18:45

Modified files:
        .              : TODO 
        gzz/client     : AbstractUpdateManager.java 

Log message:
        just a little doc about SimpleCalculator

CVSWeb URLs:
http://savannah.gnu.org/cgi-bin/viewcvs/gzz/gzz/TODO.diff?tr1=1.427&tr2=1.428&r1=text&r2=text
http://savannah.gnu.org/cgi-bin/viewcvs/gzz/gzz/gzz/client/AbstractUpdateManager.java.diff?tr1=1.22&tr2=1.23&r1=text&r2=text

Patches:
Index: gzz/TODO
diff -u gzz/TODO:1.427 gzz/TODO:1.428
--- gzz/TODO:1.427      Fri Nov 29 08:29:03 2002
+++ gzz/TODO    Fri Nov 29 09:18:45 2002
@@ -190,6 +190,9 @@
        + speed up tests: currently too much execfile().. could
          pre-compile and exec compiled in the same globals().
     humppake:
+       - small documentation with examples for current uml.py
+         - under Documentation/?, using rst, .mp, .uml
+            -> makefile to generate HTML
        - opengl demo, which uses view (made in python)
         - rethink interfaces between PlainVanishing and VobScene
          eg. correct implementation of LollipopCellView needs
@@ -237,7 +240,6 @@
        + 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.22 
gzz/gzz/client/AbstractUpdateManager.java:1.23
--- gzz/gzz/client/AbstractUpdateManager.java:1.22      Thu Nov 28 03:41:48 2002
+++ gzz/gzz/client/AbstractUpdateManager.java   Fri Nov 29 09:18:45 2002
@@ -41,7 +41,7 @@
  */
 
 public abstract class AbstractUpdateManager implements Runnable {
-public static final String rcsid = "$Id: AbstractUpdateManager.java,v 1.22 
2002/11/28 08:41:48 humppake Exp $";
+public static final String rcsid = "$Id: AbstractUpdateManager.java,v 1.23 
2002/11/29 14:18:45 humppake Exp $";
     public static boolean dbg = false;
     private static void pa(String s) { System.err.println(s); }
 
@@ -260,7 +260,17 @@
        }
     }
     static public class SimpleCalculator implements FractCalculator {
-       protected static float r = 2f, n = 0.4f;
+       /**
+        * Multiplicates x in Math.cos(); determines the amount of
+        * 'waves' when interpolating between two view states.
+        */
+       protected static n = 0.4f;
+       /**
+        * Multiplicates x in Math.exp(); determines how fast animation
+        * slows down, how fast it reduces 'waving'.
+        */
+       protected static float r = 2f;
+
        int millis = 0; // see defaultAnimationTime
        protected long startTime = 0;
        public void eventAt(long time) {
@@ -278,11 +288,14 @@
            float x = (time-startTime)/((float)millis);
            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.
+                   /** XXX: If animation time was either 'too fast' or 'too 
slow', 
+                    * we recalibrate r and n. This is probably irrelevant for 
now on. 
+                    * Although, current values for n and r are found with 
this. But
+                    * if we want to change values of r or n, this will help us 
to keep
+                    * the defaultAnimationTime.
                     */
                    if (dbg) pa("x: " + x + " r: " + r + " n: " + n +
-                               " millis: " + (time - startTime));
+                               " millis: " + (time - startTime) + " 
recalibrating...");
                    r *= x; n *= x;
                }
                return true;




reply via email to

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