[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Gzz-commits] gzz/gzz/modules/pp PPMouseEvents.java
From: |
Matti Katila |
Subject: |
[Gzz-commits] gzz/gzz/modules/pp PPMouseEvents.java |
Date: |
Wed, 22 Jan 2003 10:01:05 -0500 |
CVSROOT: /cvsroot/gzz
Module name: gzz
Changes by: Matti Katila <address@hidden> 03/01/22 10:01:05
Modified files:
gzz/modules/pp : PPMouseEvents.java
Log message:
fix culling fixes. cull's parent etc..
CVSWeb URLs:
http://savannah.gnu.org/cgi-bin/viewcvs/gzz/gzz/gzz/modules/pp/PPMouseEvents.java.diff?tr1=1.25&tr2=1.26&r1=text&r2=text
Patches:
Index: gzz/gzz/modules/pp/PPMouseEvents.java
diff -u gzz/gzz/modules/pp/PPMouseEvents.java:1.25
gzz/gzz/modules/pp/PPMouseEvents.java:1.26
--- gzz/gzz/modules/pp/PPMouseEvents.java:1.25 Wed Jan 15 05:16:49 2003
+++ gzz/gzz/modules/pp/PPMouseEvents.java Wed Jan 22 10:01:05 2003
@@ -8,6 +8,7 @@
import gzz.*;
import gzz.vob.VobScene;
import gzz.vob.impl.*;
+import gzz.gfx.gl.GLVobCoorder;
import gzz.view.AbstractViewContext;
import gzz.client.AbstractUpdateManager;
@@ -25,12 +26,11 @@
-
/** Executes something for PP when in specified coordsystem a mouse event
turns up.
*/
public class PPMouseEvents {
-public static final String rcsid = "$Id: PPMouseEvents.java,v 1.25 2003/01/15
10:16:49 mudyc Exp $";
+public static final String rcsid = "$Id: PPMouseEvents.java,v 1.26 2003/01/22
15:01:05 mudyc Exp $";
public static boolean dbg = false;
private static void pa(String s) { System.out.println(s); }
@@ -103,6 +103,8 @@
// KLUDGE!!!
// there are no good way in gzz to handle events :/
if (p_state.getCS() == kingCS && notEmptyFrame(kingCS, p_state)) {
+ if (dbg) pa("kludge");
+
m_ev.hit = new float[3];
int objCS = getTouchedCS(kingCS, p_state, m_ev.hit);
@@ -158,8 +160,6 @@
/** uncomment if you need this in demo
* ----------------------------------
*/
-
-// /*
try {
/*
JFileChooser fc = new JFileChooser();
@@ -196,7 +196,6 @@
} catch (Exception e) { pa(e.getMessage()); }
AbstractUpdateManager.chg();
-// */
}
}
@@ -316,6 +315,12 @@
float[] hit = new float[2];
int vobcs = vs.coords.getCSAt( frameCS, ev.getX(), ev.getY(), hit);
+
+ /** remember the accursed has already been setted in somewhere
+ *
+ pa("vobcs: "+vobcs);
+ ((DefaultVobMatcher)vs.matcher).dumpByParent(vobcs);
+ */
if(vobcs < 0) {
// No hit --> go to root paper cell, set pan
context.setAccursed(context.getAccursed().h(ppv.d.contains));
@@ -442,7 +447,9 @@
private int getTouchedCS(int frameCS, EventHandling.MousePressState
p_state, float[] hit) {
- return vs.coords.getCSAt( frameCS, p_state.getX(), p_state.getY(), hit);
+ int cs = vs.coords.getCSAt( frameCS, p_state.getX(), p_state.getY(),
hit);
+ // remember culling - so we need to come one cs backwards..
+ return ((GLVobCoorder)vs.coords).getParent(cs);
}