diff options
author | rcoh <rcoh@mit.edu> | 2010-12-08 16:39:50 -0500 |
---|---|---|
committer | rcoh <rcoh@mit.edu> | 2010-12-08 16:39:50 -0500 |
commit | b335b746523ffd59db1402b097a802b3fd99eaac (patch) | |
tree | 74333be1820f3d2666358c3b009beb14bf929256 /pixelmappers | |
parent | 353ab16db64c86122c0fcb9e1852b85c14b354b8 (diff) |
Code for the demo. Everything works afaik. Contains a couple more optimizations. Contains modify param behavior. Improved support for recursive hooks. Modifications to SmootCoreObject to get us closer to a fully multi-threaded system. This should be the last commit directly to master. All further commits should be on subranches and get merged.
Diffstat (limited to 'pixelmappers')
-rw-r--r-- | pixelmappers/GaussianMapper.py | 5 |
1 files changed, 1 insertions, 4 deletions
diff --git a/pixelmappers/GaussianMapper.py b/pixelmappers/GaussianMapper.py index 1cf9e88..04bd447 100644 --- a/pixelmappers/GaussianMapper.py +++ b/pixelmappers/GaussianMapper.py @@ -2,15 +2,12 @@ from operationscore.PixelMapper import * import Util class GaussianMapper(PixelMapper): def mappingFunction(self, eventLocation, screen): - returnPixels = [] + returnPixels = [] #TODO: consider preallocation and trimming [x,y] = eventLocation for (x,pixel) in screen.pixelsInRange(x-self['CutoffDist'], \ x+self['CutoffDist']): pixelDist = Util.dist(pixel.location, eventLocation) if pixelDist < self['CutoffDist']: w = Util.gaussian(pixelDist, self['Height'], 0, self['Width']) - if w>1: - #pdb.set_trace() - pass returnPixels.append((pixel, w)) return returnPixels |