aboutsummaryrefslogtreecommitdiff
path: root/pixelmappers/SimpleMapper.py
diff options
context:
space:
mode:
authorGravatar rcoh <rcoh@mit.edu>2010-12-22 14:27:33 -0500
committerGravatar rcoh <rcoh@mit.edu>2010-12-22 14:27:33 -0500
commitc581408f028d5b8ceadc53c68d7c1252fbe09e6d (patch)
tree8724862d05bde3bb3427cdff378cdb08da8babd2 /pixelmappers/SimpleMapper.py
parenta1d9b85320c9b07d62470d78ef0c5f9015baf813 (diff)
About halfway done with support for pixel regions. Modified the component registry a bit. Added
support for multiple pixel mappers (and along with that, default components). RCOH
Diffstat (limited to 'pixelmappers/SimpleMapper.py')
-rw-r--r--pixelmappers/SimpleMapper.py4
1 files changed, 2 insertions, 2 deletions
diff --git a/pixelmappers/SimpleMapper.py b/pixelmappers/SimpleMapper.py
index fdcf8b9..6b414ea 100644
--- a/pixelmappers/SimpleMapper.py
+++ b/pixelmappers/SimpleMapper.py
@@ -1,12 +1,12 @@
from operationscore.PixelMapper import *
-import Util
+import util.Geo as Geo
class SimpleMapper(PixelMapper):
def mappingFunction(self, eventLocation, screen):
if type(eventLocation) == type(tuple()):
bestDist = 10**10 #don't kill me, I'm lazy
bestPixel = None
for pixel in screen:
- pixelDist = Util.dist(pixel.location, eventLocation)
+ pixelDist = Geo.dist(pixel.location, eventLocation)
if pixelDist < bestDist:
bestPixel = pixel
bestDist = pixelDist