aboutsummaryrefslogtreecommitdiff
path: root/operationscore
diff options
context:
space:
mode:
authorGravatar rcoh <rcoh@mit.edu>2011-01-22 13:31:56 -0500
committerGravatar rcoh <rcoh@mit.edu>2011-01-22 13:31:56 -0500
commit7f88db7003a03b50dc500bf7bd711407f1a640de (patch)
tree64c08cf2bfd6fb30ccbfc3f4a9fb2435f417abdf /operationscore
parenta223608dda0751551c6e8688c0c0e1c9a1d4e69c (diff)
Bouncing behavior. Working out a weird bug. Threading may be involved?
Diffstat (limited to 'operationscore')
-rw-r--r--operationscore/Input.py1
-rw-r--r--operationscore/PixelAssembler.py2
-rw-r--r--operationscore/PixelMapper.py4
-rw-r--r--operationscore/Renderer.py4
4 files changed, 7 insertions, 4 deletions
diff --git a/operationscore/Input.py b/operationscore/Input.py
index 2ee3c3c..69375d3 100644
--- a/operationscore/Input.py
+++ b/operationscore/Input.py
@@ -14,7 +14,6 @@ class Input(ThreadedSmootCoreObject):
def init(self):
self.eventQueue = []
if not 'RefreshInterval' in self.argDict:
- print 'RefreshInterval not defined. Defaulting to .5s.'
self.argDict['RefreshInterval'] = 500
self.parentScope = self.argDict['parentScope']
self.inputInit()
diff --git a/operationscore/PixelAssembler.py b/operationscore/PixelAssembler.py
index 6878f8a..84f3b0b 100644
--- a/operationscore/PixelAssembler.py
+++ b/operationscore/PixelAssembler.py
@@ -23,6 +23,8 @@ class PixelAssembler(SmootCoreObject):
between adjacent pixels must be less than \
pixelToPixelSpacing.')
locations.append(newLocation)
+ if self['Reverse']:
+ locations.reverse()
return locations
def initLayout(self):
pass
diff --git a/operationscore/PixelMapper.py b/operationscore/PixelMapper.py
index 1f94fa5..7e2b0af 100644
--- a/operationscore/PixelMapper.py
+++ b/operationscore/PixelMapper.py
@@ -1,4 +1,5 @@
from operationscore.SmootCoreObject import *
+from logger import main_log
import pdb
class PixelMapper(SmootCoreObject):
def init(self):
@@ -8,7 +9,8 @@ class PixelMapper(SmootCoreObject):
def mapEvent(self, eventLocation, screen):
self.totalCalls += 1
if self.totalCalls % 100 == 0:
- print self['Id'], self.cachehits / float(self.totalCalls)
+ main_log.info('Cache percentage for :', self['Id'], self.cachehits /\
+ float(self.totalCalls))
if eventLocation in self.mem:
self.cachehits += 1
return self.mem[eventLocation]
diff --git a/operationscore/Renderer.py b/operationscore/Renderer.py
index ed88a8c..b422304 100644
--- a/operationscore/Renderer.py
+++ b/operationscore/Renderer.py
@@ -3,8 +3,8 @@
#Inheriting classes may define initRenderer which is called after the dictionary
#is pulled from config.
#TODO: multithreaded-rendering
-from operationscore.ThreadedSmootCoreObject import *
-class Renderer(ThreadedSmootCoreObject):
+from operationscore.SmootCoreObject import *
+class Renderer(SmootCoreObject):
def init(self):
self.initRenderer()
def render(lightSystem):