[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Gzz-commits] libvob/org/nongnu/libvob/impl OrthoCoorder.java
From: |
Matti Katila |
Subject: |
[Gzz-commits] libvob/org/nongnu/libvob/impl OrthoCoorder.java |
Date: |
Mon, 07 Apr 2003 06:07:41 -0400 |
CVSROOT: /cvsroot/libvob
Module name: libvob
Changes by: Matti Katila <address@hidden> 03/04/07 06:07:41
Modified files:
org/nongnu/libvob/impl: OrthoCoorder.java
Log message:
throw ball back to jvk ;)
CVSWeb URLs:
http://savannah.gnu.org/cgi-bin/viewcvs/libvob/libvob/org/nongnu/libvob/impl/OrthoCoorder.java.diff?tr1=1.8&tr2=1.9&r1=text&r2=text
Patches:
Index: libvob/org/nongnu/libvob/impl/OrthoCoorder.java
diff -u libvob/org/nongnu/libvob/impl/OrthoCoorder.java:1.8
libvob/org/nongnu/libvob/impl/OrthoCoorder.java:1.9
--- libvob/org/nongnu/libvob/impl/OrthoCoorder.java:1.8 Mon Apr 7 06:00:43 2003
+++ libvob/org/nongnu/libvob/impl/OrthoCoorder.java Mon Apr 7 06:07:41 2003
@@ -35,7 +35,7 @@
*/
public class OrthoCoorder extends VobCoorder {
-public static final String rcsid = "$Id: OrthoCoorder.java,v 1.8 2003/04/07
10:00:43 jvk Exp $";
+public static final String rcsid = "$Id: OrthoCoorder.java,v 1.9 2003/04/07
10:07:41 mudyc Exp $";
public static boolean dbg = false;
private static void p(String s) { if(dbg) pa(s); }
private static void pa(String s) { System.out.println("OrthoCoorder::"+s);
}
@@ -160,8 +160,11 @@
// if len is longer than rad - do nothing.
int cs = anchor;
+
// project and translate buoy
if (len <= rad) {
+ float boxSize = max - (max-min)*(len/rad);
+
float ux = x - px;
float uy = y - py;
float vx = px - cx;
@@ -169,10 +172,13 @@
float A = ux * ux / rad + uy * uy / rad;
float B = ux * vx / rad + uy * vy / rad;
float C = vx * vx / rad + vy * vy / rad;
- float t = (-B + Math.sqrt(B * B - A * C)) / A;
+ float t = (float)(-B + Math.sqrt(B * B - A * C)) / A;
x = px + t * ux;
y = py + t * uy;
+
+ cs = orthoBox(0, (len/rad)*99f, // most close go up - others down.
+ x, y, 1,1, boxSize,boxSize );
}
return cs;
}
- [Gzz-commits] libvob/org/nongnu/libvob/impl OrthoCoorder.java, Matti Katila, 2003/04/05
- [Gzz-commits] libvob/org/nongnu/libvob/impl OrthoCoorder.java, Matti Katila, 2003/04/05
- [Gzz-commits] libvob/org/nongnu/libvob/impl OrthoCoorder.java, Matti Katila, 2003/04/07
- [Gzz-commits] libvob/org/nongnu/libvob/impl OrthoCoorder.java, Janne V. Kujala, 2003/04/07
- [Gzz-commits] libvob/org/nongnu/libvob/impl OrthoCoorder.java,
Matti Katila <=
- [Gzz-commits] libvob/org/nongnu/libvob/impl OrthoCoorder.java, Matti Katila, 2003/04/07
- [Gzz-commits] libvob/org/nongnu/libvob/impl OrthoCoorder.java, Matti Katila, 2003/04/08
- [Gzz-commits] libvob/org/nongnu/libvob/impl OrthoCoorder.java, Tuomas J. Lukka, 2003/04/23
- [Gzz-commits] libvob/org/nongnu/libvob/impl OrthoCoorder.java, Tuomas J. Lukka, 2003/04/23
- [Gzz-commits] libvob/org/nongnu/libvob/impl OrthoCoorder.java, Matti Katila, 2003/04/28