[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[ff-cvs] libvob org/nongnu/libvob/buoy/BuoyViewMainNode....
From: |
Matti Katila |
Subject: |
[ff-cvs] libvob org/nongnu/libvob/buoy/BuoyViewMainNode.... |
Date: |
Mon, 25 Aug 2003 17:59:06 -0400 |
CVSROOT: /cvsroot/libvob
Module name: libvob
Branch:
Changes by: Matti Katila <address@hidden> 03/08/25 17:59:05
Modified files:
org/nongnu/libvob/buoy: BuoyViewMainNode.java
vob/buoy : buoymanager.py
Log message:
cleaning the topmostimainnode
CVSWeb URLs:
http://savannah.gnu.org/cgi-bin/viewcvs/libvob/libvob/org/nongnu/libvob/buoy/BuoyViewMainNode.java.diff?tr1=1.6&tr2=1.7&r1=text&r2=text
http://savannah.gnu.org/cgi-bin/viewcvs/libvob/libvob/vob/buoy/buoymanager.py.diff?tr1=1.65&tr2=1.66&r1=text&r2=text
Patches:
Index: libvob/org/nongnu/libvob/buoy/BuoyViewMainNode.java
diff -u libvob/org/nongnu/libvob/buoy/BuoyViewMainNode.java:1.6
libvob/org/nongnu/libvob/buoy/BuoyViewMainNode.java:1.7
--- libvob/org/nongnu/libvob/buoy/BuoyViewMainNode.java:1.6 Sun Aug 17
07:33:09 2003
+++ libvob/org/nongnu/libvob/buoy/BuoyViewMainNode.java Mon Aug 25 17:59:05 2003
@@ -57,7 +57,7 @@
* @param y The mouse event's y point.
* @param zout If non-null, the window z coord of the hit will be stored
here.
* If some main nodes overlap, this can be used to determine
- * which got the eventm
+ * which got the event.
*/
boolean hasMouseHit(VobScene oldVobScene, int x, int y, float[] zout);
Index: libvob/vob/buoy/buoymanager.py
diff -u libvob/vob/buoy/buoymanager.py:1.65 libvob/vob/buoy/buoymanager.py:1.66
--- libvob/vob/buoy/buoymanager.py:1.65 Mon Aug 25 03:02:33 2003
+++ libvob/vob/buoy/buoymanager.py Mon Aug 25 17:59:05 2003
@@ -172,23 +172,10 @@
self.animationCS_buoy = [cs, link, self.vs]
self.animationCS_main = [self.mainCS, link, self.vs]
-
pa( "Following link", link)
self.mainNode = link[0].createMainNode(link[1], link[2])
- def followLinkFromManager(self, link, mgr):
- """
- If the link isn't from this manager, follow the link,
- but don't animate own center to buoy.
- """
- if mgr == self: return self.followLink(link)
-
- cs = link[3]
- self.animationCS_buoy = [cs, link, self.vs]
- #self.animationCS_main = [self.mainCS, link, self.vs]
- self.mainNode = link[0].createMainNode(link[1], link[2])
-
def followLinkByAnchor(self, anchor):
pa("Searching for anchor", anchor)
@@ -242,29 +229,21 @@
def findTopmostMainNode(self, vs, x, y):
"""Get the topmost main node at x, y.
-
- XXX Clean up the code, it's dreadful.
"""
- hits = []
- for i in self.singles: hits.append(jarray.zeros(1, 'f'))
# Fall through if no link - need main node
# See if anyone hit.
- for i in range(0, len(self.singles)):
- if not self.singles[i].mainNode. \
- hasMouseHit(vs, x, y, hits[i]):
- hits[i] = None
-
-
- # See if something is upper than another.
- theMostUpMainNode = None
- mostUpDepth = -9999999999.9
- for i in range(len(hits)):
- if hits[i]:
- if mostUpDepth < hits[i][0]:
- self.lastIndex = i
- mostUpDepth = hits[i][0]
- theMostUpMainNode = self.singles[i].mainNode
+ hit = jarray.zeros(1, 'f')
+ theTopMostMainNode = None
+ depth = None
+ for single in range(self.singles):
+ if single.mainNode.hasMouseHit(vs, x, y, hit):
+ if not depth:
+ depth = hit[0]
+ theTopMostMainNode = single.mainNode
+ else:
+ if depth < hit[0]:
+ theTopMostMainNode = single.mainNode
return theMostUpMainNode
def findIfBuoyHit(self, vs, x, y):
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [ff-cvs] libvob org/nongnu/libvob/buoy/BuoyViewMainNode....,
Matti Katila <=